Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: add target to run go mod tidy in all submodules #6535

Merged
merged 7 commits into from
Sep 27, 2023

Conversation

pysel
Copy link
Member

@pysel pysel commented Sep 25, 2023

Closes: #6531

What is the purpose of the change

Add a makefile target that runs a script that tidies all submodules by parsing go.work file. To run the script, cd into the root of the repository and run make tidy-workspace

In addition, this PR includes the changes made by this new target

Testing and Verifying

Manually tested, changes included in this PR

Documentation and Release Note

Changelog

@github-actions
Copy link
Contributor

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be
updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

@pysel
Copy link
Member Author

pysel commented Sep 25, 2023

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

Ignoring since the changes in submodules are the updates of go modules themselves

@pysel pysel added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v19.x backport patches to v19.x branch labels Sep 25, 2023
@pysel
Copy link
Member Author

pysel commented Sep 25, 2023

devbot add changelog feat makefile: add target that tidies all submodules at once

@pysel pysel marked this pull request as ready for review September 25, 2023 18:07
@pysel pysel requested review from a team, mattverse and nicolaslara as code owners September 25, 2023 18:07
Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why go.mod would have changed by any chance?

@pysel
Copy link
Member Author

pysel commented Sep 26, 2023

I suppose it is because somebody updated import paths in a module without updating go.mod

Copy link
Member

@p0mvn p0mvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Would be great to add this to devbot CC: @ValarDragon

Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK! Thanks for the quick PR!

@mattverse mattverse merged commit 3db3efd into main Sep 27, 2023
1 check passed
@mattverse mattverse deleted the pysel/make-gomod-global branch September 27, 2023 07:45
mergify bot pushed a commit that referenced this pull request Sep 27, 2023
* add script

* global go mod tidy rule makefile

* add run result

* update changelog

* remove unnecessary echo to reduce size of logs emitted

* tidy workspace after main merge

---------

Co-authored-by: devbot-wizard <[email protected]>
(cherry picked from commit 3db3efd)

# Conflicts:
#	CHANGELOG.md
#	tests/cl-genesis-positions/go.sum
pysel added a commit that referenced this pull request Sep 27, 2023
* add script

* global go mod tidy rule makefile

* add run result

* update changelog

* remove unnecessary echo to reduce size of logs emitted

* tidy workspace after main merge

---------

Co-authored-by: devbot-wizard <[email protected]>
p0mvn pushed a commit that referenced this pull request Sep 27, 2023
…6535) (#6552)

* makefile: add target to run `go mod tidy` in all submodules (#6535)

* add script

* global go mod tidy rule makefile

* add run result

* update changelog

* remove unnecessary echo to reduce size of logs emitted

* tidy workspace after main merge

---------

Co-authored-by: devbot-wizard <[email protected]>
(cherry picked from commit 3db3efd)

# Conflicts:
#	CHANGELOG.md
#	tests/cl-genesis-positions/go.sum

* resolve merge conflict

* tidy workspace after conflict resolution

---------

Co-authored-by: Ruslan Akhtariev <[email protected]>
Co-authored-by: Ruslan Akhtariev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v19.x backport patches to v19.x branch T:build V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Make Command for running go mod tidy in for all go.mod
4 participants