Repository navigation
Use one stable go sdk version to execute CI steps. - #4087
Merged
Merged
Conversation
This fixes a catch22 where the fact that we switched between a stable and dev version of the Go SDK could create impossible to solve situations if we made a backwards incompatible API change. Signed-off-by: Erik Sipsma <[email protected]>
gerhard
approved these changes
Dec 5, 2022
gerhard
left a comment
Contributor
There was a problem hiding this comment.
Love the simpler approach, make-prod felt awkward since the beginning. I'm glad that we were able to clarify these interactions.
👍 🚀
This was referenced Dec 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After trying many different approaches that all had very subtle flaws which eventually doomed them, I ended up with this majorly stripped down change from what I was originally going for. However, it is still a step in the right direction.
I realize everything involving the current state of our CI is confusing, so trying to over-explain it a bit here, hope it's helpful to keep everyone in sync.
Goals
go.modin the magefile directory. We no longer switch back and forth between running the same mage code on different versions of the go sdk.Major Changes
internal/mage/go.modwhich is what we now use to run all the mage code on the host.ExperimentalPrivlegedNestingat all anymore#2above)./hack/make-prodentirely for now#2above where it's just not yet possible to do this in any sane way due to a bug./hack/makedoesn't call./hack/devanymore; they are just independentDiagrams
Made modifications to the one worked on with @gerhard earlier:
Before
flowchart TD make(./hack/make sdk:go:test) dev(./hack/dev go run main.go sdk:go:test) dev -.- sdk -.- test StableGoSDK(Go SDK: dagger.io/dagger v0.4.1) ==> dev sdk(Go SDK) --> |mount| docker-container://test-dagger-engine make --> dev ==> |provision ghcr.io/dagger/dagger:v0.3.6| docker-container://dagger-engine-sha256 build --> tar(/tmp/dagger-engine-export) tar --> |load & run| docker-container://test-dagger-engine subgraph Docker subgraph docker-container://dagger-engine-sha256 build end subgraph docker-container://test-dagger-engine subgraph buildkit-exec binary(DAGGER_HOST=bin:///.dagger_engine_session) socket(DAGGER_RUNNER_HOST=unix:///dagger-runner.sock) test(go test) end end endAfter
flowchart TD make(./hack/make sdk:go:test) make --> test StableGoSDK(Go SDK: dagger.io/dagger v0.4.2) ==> make make ==> |provision ghcr.io/dagger/dagger:v0.3.7| docker-container://dagger-engine-sha256 build --> tar(/tmp/dagger-engine-export) tar --> |load & run| docker-container://test-dagger-engine sdk(Go SDK) --> |mount| docker-container://test-dagger-engine dockersock(/var/run/docker.sock) --> |mount| buildkit-exec subgraph Docker subgraph docker-container://dagger-engine-sha256 build end subgraph docker-container://test-dagger-engine subgraph buildkit-exec binary(DAGGER_HOST=bin:///.dagger_engine_session) socket(DAGGER_RUNNER_HOST=unix:///dagger-runner.sock) test(go test) end end endFollow-ups
The biggest follow up will be to implement the refined engine session interface: #3830
That will allow us to run the full default provisioning codepath in execs, which means we can address this issue (among others): #4065
At that time we can re-add something like the equivalent of
./hack/make-prod(but with a more clear name this time).