-
Notifications
You must be signed in to change notification settings - Fork 33
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 atomfs with fixed umount, update golang to 1.22 #654
move to atomfs with fixed umount, update golang to 1.22 #654
Conversation
Converted to draft because we shouldn't merge this, we should wait until atomfs merges atomfs#27 and then update to the main repo |
7eb9274
to
81a78db
Compare
81a78db
to
15b4b28
Compare
this should work now but will need a change to the first commit to bring in the real atomfs repo once project-machine/atomfs#27 is merged. |
bc09e19
to
9f04ece
Compare
atomfs 1.1.3 has a new API for mounting that changes it to store metadata about the mounted molecules in a known location. It also cleans up the unmount code path and added a lot of tests to atomfs. This moves to the new atomfs version and removes an obsolete mount option. atomfs also has a min golang version of 1.22, which we adopt for stacker here too because 1.21 is EOL at this time. This requires a go mod bump and tweaks to a few github CI yamls. note the build.yaml stackerfile now exports GOTOOLCHAIN=auto, which is the default set in $GOROOT/go.env if you install go via the tgz at go.dev/dl, but apparently the alpine package doesn't do that. We want auto, in order to have go respect the `toolchain` directive in go.mod. This does download a new go toolchain during the build, though, so one could argue that the right thing here would be to just update the alpine package, but we can do that at a later time. It also fixes a typo in atomfs.bats - this test case is also now run in the atomfs repo itself and the typos were fixed there, but we leave it here for extra coverage. Signed-off-by: Michael McCracken <[email protected]>
2eab97f
to
78064f8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #654 +/- ##
===========================================
+ Coverage 13.08% 60.45% +47.37%
===========================================
Files 35 59 +24
Lines 5084 6446 +1362
===========================================
+ Hits 665 3897 +3232
+ Misses 4309 1903 -2406
- Partials 110 646 +536 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for working through the CI. Only change I think needed is ensuring we get the x/net bump to v0.33.0; I think you need 1.22.8 toolchain. The rest are some questions.
A previous test bug would have been caught by linting the bats test code, so let's do that now. That error was using an undefined variable in a test. ($last_layer_hash in atomfs.bats) It had been defined in a different test in the same file, but was undefined in the test in question. Unfortunately because of the way bats does bash, shellcheck only identifies that as an INFO level possible error SC2031. So this adds a new `lintbats` target that first checks for JUST SC2031, then checks separately for only error level issues. This commit also fixes a few error level issues in other files: - asterisk and whiteout : use glob instead of looping over ls. /shrug - bom: [ -n "${ZOT_HOST}:${ZOT_PORT}" ] will always be true because of the colon in there, so this commit eliminates the colon. - config.bats had a complaint about the indentation of the EOF because it's in yaml in another here doc? OK then. Also add the shellcheck package to the build deps. Signed-off-by: Michael McCracken <[email protected]>
this is testing import of squash images then building tar on top, we can test that without also testing zothub.io's nine fives. Signed-off-by: Michael McCracken <[email protected]>
Instead of using `go get` which now does nothing after moving to 1.22, or `go install` which fails in github CI, let's just clone and build umoci ourselves. Signed-off-by: Michael McCracken <[email protected]>
two tests had bare image names, causing problems with dockerhub rate limiting. move instead to AWS also clarifies a skip message which was a little confusing because most of the test is actually completed. Signed-off-by: Michael McCracken <[email protected]>
also bumps the golang toolchain to latest current toolchain as of right... now Signed-off-by: Michael McCracken <[email protected]>
78064f8
to
49f7a6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
see project-machine/atomfs#27
The MetadataPath field in the MountOCIOpts struct is not needed anymore, if left empty it will use /run/atomfs/ for all mounts.
The atomfs.bats file is not passing locally even though the equivalent test does pass in atomfs#27. Creating this PR to see if it passes in jenkins. It is something about the base image's verity device being in use. I suspect another test is not unmounting the shared base busybox image - maybe we need to isolate the tests better here, or just delete the atomfs test in stacker because it's covered in atomfs now
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.