Provide CHECKBOX_RUNTIME environment variable during job execution only (BugFix)#2362
Provide CHECKBOX_RUNTIME environment variable during job execution only (BugFix)#2362
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2362 +/- ##
==========================================
+ Coverage 57.63% 57.66% +0.03%
==========================================
Files 465 465
Lines 47165 47166 +1
Branches 8397 8398 +1
==========================================
+ Hits 27182 27198 +16
+ Misses 19108 19088 -20
- Partials 875 880 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@tomli380576 Here is the patch I was talking about yesterday. I've built some snaps (check the PR description) and ran some tests with a UC24 VM, and it looks like it's working. I've attached the submission.json from that run here if you want to investigate, but I'd appreciate if you could run the snaps on your testing environment and report back. One thing to note is that |
|
I've been wanting to purge that findmnt monstrosity for a while. Thanks. Please fix black formatting but this lgtm |
|
ubuntu desktop: USB: https://certification.canonical.com/hardware/202503-36476/submission/476198/ I'll do another test with ubutu core on a real machine next Monday but I think the changes look good! |
4a3cd1c to
51006b8
Compare
|
|
51006b8 to
b592ed7
Compare
Description
Providing
$CHECKBOX_RUNTIMEwhen executing the snap (in a wrapper script) is hackish and often does not work because of the problems described in #2295 .Instead, it is now provided by Checkbox during the job execution phase (similarly to
$PLAINBOX_SESSION_SHAREand the like).This means that it cannot be used directly from the Shell (when entering
snap run --shell checkbox.checkbox-cliorcheckbox.shell), but it should work as expected when running a job that relies on$CHECKBOX_RUNTIME.Resolved issues
Fix #2295
Fix CHECKBOX-2164
Tests
Apart from adding some unit tests for the get_execution_environment function, I built snaps from this branch and used the checkbox24_amd64 artifact to run a spread test using @Hook25 's new shiny tool, checkbox_snap_spread:
tests/run-canary/launcher.confto not exclude anything and run thecom.canonical.certification::misc-client-cert-automatedtest plan (since this one has some fwts-related tests)checkbox24_7.1.0-dev27_amd64.snapat the root of the directory, and ranimage-garden.spread -artifacts=artifacts ubuntu-core-24When running jobs that run an fwts command, I can see that the CHECKBOX_RUNTIME has been set to the right thing. For example, with the
miscellanea/oopsjob: