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

Maintain go.mod and go.sum as part of continuous intergration. #233

Closed
Sriep opened this issue May 3, 2021 · 6 comments
Closed

Maintain go.mod and go.sum as part of continuous intergration. #233

Sriep opened this issue May 3, 2021 · 6 comments
Assignees

Comments

@Sriep
Copy link
Contributor

Sriep commented May 3, 2021

go.mod and go.sum are essentially generated files, and as such maintaining them is best left up to the continuous integration process.

Suggestion: Add a Github pull request / merge action that automatically updates these files.
There is a go-mod component to the makefile which might prove useful.

@shravanshetty1
Copy link
Contributor

In case of go.mod, I dont think we should do this - we want to use dependencies at a specific commit however if we were to generate go.mod file it will always use dependencies from latest commit. This can introduce breaking changes.

@Sriep
Copy link
Contributor Author

Sriep commented Jun 7, 2021

Why do we want to use dependencies from a specific commit?

@shravanshetty1
Copy link
Contributor

Why do we want to use dependencies from a specific commit?

What if a dependency makes a breaking change? we will inherit the breaking change and our software will stop working. This is the reason why go.mod forces you to manually update dependencies. When you add a new dependency it adds the dependency from the last stable commit available at the time of adding the dependency. If new stable releases are available - you must manually update due to the above issue.

@Sriep
Copy link
Contributor Author

Sriep commented Jul 16, 2021

We can write a script to merge the go mod tidy result with a manual set of exceptions. Maybe run a sequence of

go get github.com/<some commit we want>

or just have the CI directly edit the go.mod file.

The key is to minimise developer involvement.

@ma2b0043
Copy link

@Sriep @mohsenno1 when can we expect to close this issue?

@dabasov
Copy link
Member

dabasov commented May 11, 2022

agree with @shravanshetty1 this process better left for developers

@dabasov dabasov closed this as completed May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants