Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
51e1c4b
jdl show
PietroPasotti Jul 7, 2025
ff8b379
lint
PietroPasotti Jul 7, 2025
706ba5a
lint
PietroPasotti Jul 7, 2025
e0bccf9
replace .pytest_jubilant_jdl with .logs
PietroPasotti Jul 7, 2025
24cad08
no references to juju debug-log
PietroPasotti Jul 7, 2025
af60010
pr comments
PietroPasotti Jul 11, 2025
c92b376
echo pwd for debugging
PietroPasotti Jul 11, 2025
0e9cc17
echo pwd for debugging
PietroPasotti Jul 11, 2025
157caef
minor lint
PietroPasotti Jul 14, 2025
08ba49b
minor lint
PietroPasotti Jul 14, 2025
ed42b55
printf lint
PietroPasotti Jul 14, 2025
19f2c95
dollars
PietroPasotti Jul 14, 2025
0f89835
Merge branch 'main' into feat/jdl-upload
PietroPasotti Jul 14, 2025
07e6f65
.logs without prefix
PietroPasotti Jul 14, 2025
d4eabcf
.logs without prefix
PietroPasotti Jul 14, 2025
51af1bd
merge cm
PietroPasotti Jul 21, 2025
c4d473c
include hidden files
PietroPasotti Jul 21, 2025
3efe189
unique names and lifted path to var
PietroPasotti Jul 21, 2025
0f42f3a
added abspath support
PietroPasotti Jul 21, 2025
7573884
echo the path
PietroPasotti Jul 22, 2025
3941a91
reecho the path
PietroPasotti Jul 23, 2025
1e584ba
wrap log path in expression
PietroPasotti Jul 23, 2025
1af4b03
add matrix suite to log upload file name
PietroPasotti Jul 23, 2025
1761712
Merge remote-tracking branch 'origin/main' into feat/jdl-upload
PietroPasotti Aug 26, 2025
ee57f07
graph update
PietroPasotti Aug 26, 2025
fbd1783
Merge branch 'main' into feat/jdl-upload
lucabello Apr 23, 2026
07b4840
fix: use case statement to avoid shellcheck SC2193 in log path detection
Copilot Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/_charm-quality-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
type: string
required: false
default: .
log-path:
type: string
description: |
Path to a directory where the .txt logfiles for an integration testing run will be stored.
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: use "log files" instead of "logfiles".

Suggested change
Path to a directory where the .txt logfiles for an integration testing run will be stored.
Path to a directory where the .txt log files for an integration testing run will be stored.

Copilot uses AI. Check for mistakes.
Relative and absolute file paths are both allowed.
Relative paths are rooted against the charm repository root.
Paths that begin with a wildcard character should be quoted to avoid being
Comment on lines +14 to +16
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log-path description says relative paths are rooted against the "charm repository root", but the implementation later prepends inputs.charm-path for relative paths. Please clarify the wording so callers know whether the base is the repository root or the charm directory (charm-path).

Suggested change
Relative and absolute file paths are both allowed.
Relative paths are rooted against the charm repository root.
Paths that begin with a wildcard character should be quoted to avoid being
Relative and absolute file paths are both allowed.
Relative paths are rooted against the charm directory specified by `charm-path`
(which defaults to the repository root, `.`).
Paths that begin with a wildcard character should be quoted to avoid being

Copilot uses AI. Check for mistakes.
interpreted as YAML aliases.
required: false
default: .logs
Comment on lines +10 to +19
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security: the workflow later interpolates ${{ inputs.log-path }} / derived outputs directly into run: bash scripts. If a caller supplies a value containing $()/backticks/newlines, it can lead to script-injection. Prefer passing the input via env: (e.g., LOG_PATH: ${{ inputs.log-path }}) and then using "$LOG_PATH" inside the script, which treats the value as data rather than code.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +19
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log display/upload steps appear to be added only to the parallel integration job. If parallelize-integration is disabled (sequential integration run), logs won’t be shown or uploaded; consider applying the same log handling to the sequential integration job as well so behavior is consistent across integration modes.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +19
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the implementation of this log-path feature, the subsequent steps are intended to help debug failing integration tests. Ensure the log display + artifact upload steps are configured to run even when the integration test step fails (e.g., if: always()), and ensure the "show logs" loop does not fail the job when the directory exists but contains no matching *.txt files (bash will otherwise iterate the literal glob and cat will error).

Copilot uses AI. Check for mistakes.
provider:
type: string
description: "The provider to choose for integration tests ('machine', 'microk8s', or 'k8s')"
Expand Down Expand Up @@ -403,3 +413,36 @@ jobs:
with:
timeout-minutes: 30
limit-access-to-actor: true
- name: Determine log files location
id: get_log_path
run: |
# if the user gave us a relative path, interpret it from the charm-path root.
# if path starts with / it's absolute, else it's relative, and we prepend the (absolute) charm-path to it
case "${{ inputs.log-path }}" in
/*) log_path="${{ inputs.log-path }}" ;;
*) log_path="${{ inputs.charm-path }}/${{ inputs.log-path }}" ;;
esac
echo "log path is: $log_path"
echo "log_path=$log_path" >> "$GITHUB_OUTPUT"
- name: Show logs
run: |
if test -d "${{ steps.get_log_path.outputs.log_path }}"; then
for filename in ${{ steps.get_log_path.outputs.log_path }}/*.txt; do
# begin collapsible log group for each file found in the folder;
# this is github CI markup
# cfr: https://github.com/go-task/task/issues/647
printf '\n::group:: %s\n' "$filename"
cat "$filename"
printf "\n::endgroup::\n"
done
else
echo "${{ steps.get_log_path.outputs.log_path }} not found"
fi
- name: Upload logs
uses: actions/upload-artifact@v4
# defaults to 'warn' on failure
with:
name: charm-logs${{ (inputs.charm-path && inputs.charm-path != '.') && format('-{0}', inputs.charm-path) || '' }}-${{ matrix.suite }}
include-hidden-files: true
# we assume that log_path is never going to be an empty string; but it may well be a non-existing directory.
path: ${{ steps.get_log_path.outputs.log_path }}
11 changes: 11 additions & 0 deletions .github/workflows/charm-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
default: '.'
required: false
type: string
log-path:
type: string
description: |
Path to a directory where the .txt logfiles for an integration testing run will be stored.
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: use "log files" instead of "logfiles".

Suggested change
Path to a directory where the .txt logfiles for an integration testing run will be stored.
Path to a directory where the .txt log files for an integration testing run will be stored.

Copilot uses AI. Check for mistakes.
Relative and absolute file paths are both allowed.
Relative paths are rooted against the charm repository root.
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log-path description says relative paths are rooted against the "charm repository root", but the called workflow’s implementation prepends inputs.charm-path for relative paths. Please align this description with the actual behavior so callers don’t misplace logs.

Suggested change
Relative paths are rooted against the charm repository root.
Relative paths are resolved relative to `charm-path`.

Copilot uses AI. Check for mistakes.
Paths that begin with a wildcard character should be quoted to avoid being
interpreted as YAML aliases.
required: false
default: .logs
provider:
description: "The provider to choose for either machine or k8s tests ('machine', 'microk8s', or 'k8s')"
default: 'k8s'
Expand Down Expand Up @@ -128,6 +138,7 @@ jobs:
secrets: inherit
with:
charm-path: ${{ inputs.charm-path }}
log-path: ${{ inputs.log-path }}
provider: ${{ inputs.provider }}
charmcraft-channel: ${{ inputs.charmcraft-channel }}
juju-channel: ${{ inputs.juju-channel }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ block-beta
qualitychecksslow["<b>Quality Checks (integration)</b>"]
pack["Pack the charm"]
integration["Integration tests"]
displaylogs["Display logs"]
uploadlogs["Upload logs zipfile"]
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: "zipfile" → "zip file" in the diagram label.

Suggested change
uploadlogs["Upload logs zipfile"]
uploadlogs["Upload logs zip file"]

Copilot uses AI. Check for mistakes.
Comment on lines +63 to +64
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Mermaid workflow diagram, displaylogs and uploadlogs are added but not connected to the existing flow. Consider adding edges (e.g., integration --> displaylogs --> uploadlogs) so the diagram reflects when these steps run.

Copilot uses AI. Check for mistakes.
end


Expand Down