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

Release workflow is busted due to Ubuntu version mismatch #39

Closed
NucciTheBoss opened this issue Nov 18, 2024 · 1 comment · Fixed by #42 or #47
Closed

Release workflow is busted due to Ubuntu version mismatch #39

NucciTheBoss opened this issue Nov 18, 2024 · 1 comment · Fixed by #42 or #47
Labels
bug Something isn't working

Comments

@NucciTheBoss
Copy link
Member

NucciTheBoss commented Nov 18, 2024

Bug Description

The release workflow fails because the provided GitHub runner image is 24.04, but the charms are packed for 22.04. This wouldn't be an issue if charmcraft was using LXD to provide the packing instance, but the release workflow uses --destructive packing instead.

If using destructive packing, the host OS version must match the platform/bases version of the charm being packed. Since 22.04 != 24.04, charmcraft pack --destructive will fail in the runner VM.

To Reproduce

Merge a new PR or push to main 🙈

Environment

ubuntu-24.04 GitHub runner image.

Relevant log output

Run canonical/charming-actions/[email protected]
/usr/bin/sudo snap install charmcraft --classic --channel latest/stable
2024-11-18T18:40:58Z INFO Waiting for automatic snapd restart...
charmcraft 3.2.1 from Canonical** installed
/usr/bin/sudo charmcraft pack --quiet --destructive-mode
Ubuntu 22.04 builds cannot be performed on this Ubuntu 24.04 system.
Recommended resolution: Run a managed build, or run on a compatible host.
Full execution log: '/root/.local/state/charmcraft/log/charmcraft-20241118-184126.461852.log'
Error: The process '/usr/bin/sudo' failed with exit code 78
Error: Error: The process '/usr/bin/sudo' failed with exit code 78
    at ExecState._setResult (/home/runner/work/_actions/canonical/charming-actions/2.5.0-rc/dist/upload-charm/index.js:3950:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/canonical/charming-actions/2.5.0-rc/dist/upload-charm/index.js:3933:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/canonical/charming-actions/2.5.0-rc/dist/upload-charm/index.js:3827:27)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
/usr/bin/sudo test -d /root/snap/charmcraft/common/cache/charmcraft/log
No charmcraft logs generated, skipping artifact upload.

Additional context

This should be fixed alongside our onboarding of charmcraftcache for faster CI builds. This way we don't need to wait 45 minutes for integration tests to complete.

@NucciTheBoss
Copy link
Member Author

Extra PR #47 is necessary to fully resolve this issue as upload-charm does not initialize LXD even if destructive-mode is set to false.

@NucciTheBoss NucciTheBoss linked a pull request Nov 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant