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

feat(dev-ux): go.mod update tool #4266

Closed
Tracked by #4620
p0mvn opened this issue Feb 9, 2023 · 0 comments · Fixed by #4291
Closed
Tracked by #4620

feat(dev-ux): go.mod update tool #4266

p0mvn opened this issue Feb 9, 2023 · 0 comments · Fixed by #4291

Comments

@p0mvn
Copy link
Member

p0mvn commented Feb 9, 2023

Background

Currently, when we update one of:

  • osmoutils
  • osmomath
  • x/ibc-hooks

our local tests pick up the changes from the modules right away. Howevever, the e2e test depends on the go.mod being correctly tagged with the latest version.

As a result, an engineer has to manually run the following command to update the root go.mod:

go get < module > @< commit hash >

go mod tidy

We need a way to automate this process.

Suggested Design

The end goal of this is the following:

  • detect if osmoutils, osmomath and x/ibc-hooks modules were updated in a PR
  • if so, auto-open PR to your branch with global go.mod updated to the deps in your branch

I propose splitting this into the following steps / PRs:

  1. Create a script that when run, does the following:
# detect current branch

go get github.com/osmosis-labs/osmosis/osmomath@< branch hash >
go get github.com/osmosis-labs/osmosis/osmoutils@< branch hash >
go get github.com/osmosis-labs/osmosis/x/ibc-hooks@< branch hash >

go mod tidy

Note that for this to work, the current branch must be pushed to remote.

  1. Create a CI job that detects if any of osmomath, osmoutils, x/ibc-hooks` had any changes.
    • If so, it runs the script and opens a PR against your branch with the changes from script 1 applied.

Acceptance Criteria

  • The process of updating go.mod is fully automated
  • Successfully executes every time when an update to osmomath, ``osmoutilsorx/ibc-hooks` is made
  • Auto-opens a PR against developer's branch with the go.mod changes
@github-project-automation github-project-automation bot moved this to Needs Review 🔍 in Osmosis Chain Development Feb 9, 2023
@p0mvn p0mvn changed the title go.mod update tool feat(dev-ux): go.mod update tool Feb 9, 2023
@pysel pysel self-assigned this Feb 11, 2023
@github-project-automation github-project-automation bot moved this from Needs Triage 🔍 to Done ✅ in Osmosis Chain Development Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants