charmed-hpc / slurm-charms

Juju charms for automating the Day 0 to Day 2 operations of the Slurm workload manager ⚖️🐧
Apache License 2.0
1 stars 5 forks source link

Release workflow is busted due to Ubuntu version mismatch #39

Closed NucciTheBoss closed 4 days ago

NucciTheBoss commented 1 week ago

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 :see_no_evil:

Environment

ubuntu-24.04 GitHub runner image.

Relevant log output

Run canonical/charming-actions/upload-charm@2.5.0-rc
/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 commented 4 days ago

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.