feat: display juju debug-log in integration test runs#360
feat: display juju debug-log in integration test runs#360PietroPasotti wants to merge 34 commits into
Conversation
lucabello
left a comment
There was a problem hiding this comment.
To re-review this PR, I would like:
- convert the PR title to conventional commits format, like we practice everywhere
- test the branch with some repository (if you don't know which one, use https://github.com/canonical/o11y-tester-operator) and link a successful run here
- consider updating the diagram here and see how it looks like (adding another box under integration tests maybe)?
|
@lucabello ready for another round, all points addressed |
|
@copilot please make comment suggestions that would make the workflows lint pass. |
Agent-Logs-Url: https://github.com/canonical/observability/sessions/f549ed24-695e-4774-81db-5a5c87f2f1a5 Co-authored-by: lucabello <36242061+lucabello@users.noreply.github.com>
Fixed in 07b4840. The issue was a shellcheck SC2193 warning on the |
There was a problem hiding this comment.
Pull request overview
This PR extends the charm CI reusable workflows to surface integration test logs in GitHub Actions output and as downloadable artifacts, making debugging (e.g., Juju debug-log) easier across charm repositories.
Changes:
- Adds a new
log-pathworkflow input (default.logs) to control where integration test logs are collected from. - Updates the quality-checks workflow to display
*.txtlogs in the job output and upload the log directory as an artifact. - Updates the README Mermaid workflow diagram to include the new log display/upload steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| README.md | Documents the additional “Display logs” / “Upload logs” steps in the workflow diagram. |
| .github/workflows/charm-pull-request.yaml | Introduces log-path input and forwards it into the reusable quality-checks workflow. |
| .github/workflows/_charm-quality-checks.yaml | Adds log-path input and implements log display + upload behavior for integration runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Luca Bello <36242061+lucabello@users.noreply.github.com>
- Security: pass inputs via env vars instead of direct interpolation in run scripts to prevent script injection - Add log display and upload steps to sequential integration job (integration-mono) for consistent behavior across modes - Add 'if: always()' to log steps so they run even on test failure - Add 'shopt -s nullglob' to handle empty glob when no .txt files exist - Connect displaylogs/uploadlogs nodes in Mermaid diagram Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change to
_charm-quality-checks.yaml(integration tests part) adding two steps:for each file found in
./.logs:the idea is, we can put our juju debug-log output in there, and the CI will display them and upload as artifact.
Context: canonical/pytest-jubilant#11
Tandem PR to demonstrate the workflow in action: https://github.com/canonical/o11y-tester-operator/actions/runs/16414197049