Skip to content

Upload-charm action fails to upload logs when packing in destructive mode #107

Description

@lengau

Bug Description

When packing in destructive mode, charmcraft writes its logs to ~/.local/state/charmcraft/log, but the action checks for the log in /root/snap/charmcraft/[...]

See more details

To Reproduce

See: https://github.com/canonical/mongodb-k8s-operator/actions/runs/6534209543/job/17753492452

Environment

stable channel, on github hosted runners

Relevant log output

/usr/bin/sudo charmcraft pack --quiet --destructive-mode
Parts processing error: Failed to run the build script for part 'charm'.
Full execution log: '/root/.local/state/charmcraft/log/charmcraft-20231016-201530.992500.log'
Error: The process '/usr/bin/sudo' failed with exit code 1
Error: Error: The process '/usr/bin/sudo' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/canonical/charming-actions/2.3.0/dist/upload-charm/index.js:3763:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/canonical/charming-actions/2.3.0/dist/upload-charm/index.js:3746:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/canonical/charming-actions/2.3.0/dist/upload-charm/index.js:3640:27)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
/usr/bin/sudo test -d /root/snap/charmcraft/common/cache/charmcraft/log
No charmcraft logs generated, skipping artifact upload.

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions