Skip to content

Add -vvv briefcase logging in debug-mode CI reruns (#221) - #394

Merged
freakboy3742 merged 2 commits into
beeware:mainfrom
BabuDip:add-ci-verbose-logging-221-v2
Aug 30, 2026
Merged

Add -vvv briefcase logging in debug-mode CI reruns (#221)#394
freakboy3742 merged 2 commits into
beeware:mainfrom
BabuDip:add-ci-verbose-logging-221-v2

Conversation

@BabuDip

@BabuDip BabuDip commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Briefcase diagnostic verbosity (-vvv) to the app-create-verify and app-build-verify CI actions when a workflow run has debug logging enabled, so CI-only failures are easier to diagnose (Refs #221).

Changes

  • Compute BRIEFCASE_VERBOSITY (-vvv or empty) from the RUNNER_DEBUG environment variable in the first step of app-build-verify.yml, and export it via GITHUB_ENV for use by later steps in the job.
  • Pass ${BRIEFCASE_VERBOSITY} to every briefcase create/build/run/package invocation in app-build-verify.yml, and to briefcase new in the app-create composite action (used by app-create-verify.yml).
  • Failure-log upload to the CI run already existed via the Upload Failure Logs step in both workflows — no changes needed there.

Why the previous attempt was reverted

The previous version (#392, reverted in #393) computed the verbosity flag in a job-level env: block using ${{ runner.debug == '1' && ... }}, which is invalid — the runner context is not available in jobs.<job_id>.env expressions, only in jobs.<job_id>.steps.env. This broke every consumer repository that calls these reusable workflows (e.g. failed with Unrecognized named-value: 'runner').

This version avoids the issue entirely by reading the real RUNNER_DEBUG environment variable directly inside a step, rather than evaluating runner.debug as an expression in a disallowed scope.

A second issue was caught during consumer-repo testing (see below): Briefcase performs a positional scan of argv to detect <platform>/<format> before building its argument parser, so -vvv must be placed after those tokens, not before the subcommand (briefcase create web static -vvv, not briefcase -vvv create web static). All invocations have been corrected accordingly.

image

Test Consumer project to use and trigger this CI:

image

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Github Copilot (Claude Sonnet 5)

Set BRIEFCASE_VERBOSITY to -vvv when RUNNER_DEBUG is enabled, and pass
it to every briefcase invocation in app-build-verify.yml and to
'briefcase new' in the app-create action (used by app-create-verify.yml).

The previous attempt (beeware#392, reverted in beeware#393) computed this in a
job-level env: block using `runner.debug`, which is invalid -- the
runner context is not available there per GitHub's context
availability rules [https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#context-availability] (only steps.env can use it). This version computes
the value in the first step of the job by reading the RUNNER_DEBUG
environment variable directly, and exports it via GITHUB_ENV for use
by later steps.
@BabuDip BabuDip changed the title Add -vvv briefcase logging in debug-mode CI reruns (#221) Add -vvv briefcase logging in debug-mode CI reruns (#221) [DO NOT MERGE] Aug 30, 2026
@BabuDip BabuDip changed the title Add -vvv briefcase logging in debug-mode CI reruns (#221) [DO NOT MERGE] [DO NOT MERGE] Add -vvv briefcase logging in debug-mode CI reruns (#221) Aug 30, 2026
@BabuDip BabuDip changed the title [DO NOT MERGE] Add -vvv briefcase logging in debug-mode CI reruns (#221) Add -vvv briefcase logging in debug-mode CI reruns (#221) Aug 30, 2026
… them

Briefcase performs a positional scan of argv for <platform>/<format>
before building its argparse parser; placing -vvv (or any flag) before
them shifts that scan and breaks parsing (e.g. 'briefcase -vvv create
web static' fails with 'unrecognized arguments: web static', silently
falling back to the default macOS/app subcommand). Move
BRIEFCASE_VERBOSITY to the end of each invocation instead.

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Second time is the charm!

@freakboy3742
freakboy3742 merged commit bdaa082 into beeware:main Aug 30, 2026
148 of 150 checks passed
@BabuDip
BabuDip deleted the add-ci-verbose-logging-221-v2 branch August 31, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants