-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Move to golang modules instead of git submodules #572
Comments
@roidelapluie Is the only problem you're having the lack of reproducibility or is there anything else? I was planning to solve the reproducibility issue, and I was likely going to use git modules for it, however the plan was to add those mod files into a subdir such as go.mod. and a If you'd like to write such a script, that's welcome. |
Our pipelines internally use go mod, so that would be the easiest for us. Also normally we do go mod vendor and commit vendor/ in our internal repo. Submodules would mean we need to mirror X repos internally, not that easy. |
Hi there, speaking as someone that only just today cloned The maturity of Go modules has improved since this issue was raised; at the time Go 1.13 had only just come out, and then it wasn't until 1.14 dropped in Feb 2020 that they actively encouraged users to migrate. Keeping |
@jlucktay Can you describe specifically, in technical terms "my single biggest source of frustration in getting a binary built." ? |
It centred around the I couldn't find any git submodule maintenance commands defined in the Makefile or the helper scripts either, so beyond the one initial I can take a swing at a PR with a Go module initialised, if it would be of any help? |
So the goal for git master is to be git master. This keeps it stable every day for development, rather than having to all of a sudden on release day update 100 deps. There's an FAQ entry about this. Releases are a different story.
We'd like to do this for tagged release versions. This was discussed in a few places including in: #580 and #610
It would definitely help. The one caveat is that we want this wrapped in a shell script/Makefile so that the go.mod stuff is stored in a separate directory and not the root. This way, when I cut a release I can "build" one of these files (with your script) and if I want to use a specific one, then I can "restore" one of these (with your script). If this makes sense, please let me know! We're happy to mentor the patch. This would let us get closer to reproducible builds, and also make it easier for you if you want to build that way. |
After reading through that FAQ entry and the linked issues, the philosophy/approach taken here does make sense; use currently-available dependencies at build time and eat the breakages, weighed against ongoing maintenance. If a In starting to set it up however, I've hit an inconsistency with mgmt/engine/resources/docker_container_test.go Lines 72 to 73 in 76ede10
In the filters package, In |
Great!
I don't understand this comment. But my goal is to have git master have all git master deps other than what we must pin (because their git masters are broken) and for release tags to have an associated snapshot of all the git master deps from when I run
Correct.
Awesome, can you work on the patch please?
I don't know what's up here, but I'm confident they're easy to solve. Only the bash scripting and dealing with the golang tools sucks (because I'm not psyched about how the golang tooling works).
This might all be due to the random hack I did here: https://github.com/purpleidea/docker/tree/445197336ebfc341fe1c922410324422b5722328 I can fix this up if it's blocking your patch from being merged once you post an initial version and I'll see how it's failing/etc LMK what else you need! |
WIP of trying to move to go mod is here: https://github.com/purpleidea/mgmt/tree/feat/go-mod-without-consent If someone who knows what they're doing wants to add some additional patches onto this, I'll squash it all and merge it. /cc @roidelapluie @frebib |
I'm not seeing any .gitmodules file in a fresh checkout. This issue is probably solved? |
Yeah, Go modules is used for dependency management |
@purpleidea This should be closed |
I would really love to see git modules go away in favour of golang modules.
I am trying to build mgmt inside $customer infra and will have to maintain an internal fork of mgmt with modules to be able to build it.
Go modules enable more reproducible builds, and they are pushed by golang upstream, we should use them.
The text was updated successfully, but these errors were encountered: