Add -vvv briefcase logging in debug-mode CI reruns (#221) - #394
Merged
freakboy3742 merged 2 commits intoAug 30, 2026
Conversation
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.
… 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
approved these changes
Aug 30, 2026
freakboy3742
left a comment
Member
There was a problem hiding this comment.
Second time is the charm!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Briefcase diagnostic verbosity (
-vvv) to theapp-create-verifyandapp-build-verifyCI actions when a workflow run has debug logging enabled, so CI-only failures are easier to diagnose (Refs #221).Changes
BRIEFCASE_VERBOSITY(-vvvor empty) from theRUNNER_DEBUGenvironment variable in the first step ofapp-build-verify.yml, and export it viaGITHUB_ENVfor use by later steps in the job.${BRIEFCASE_VERBOSITY}to everybriefcase create/build/run/packageinvocation inapp-build-verify.yml, and tobriefcase newin theapp-createcomposite action (used byapp-create-verify.yml).Upload Failure Logsstep 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 — therunnercontext is not available injobs.<job_id>.envexpressions, only injobs.<job_id>.steps.env. This broke every consumer repository that calls these reusable workflows (e.g. failed withUnrecognized named-value: 'runner').This version avoids the issue entirely by reading the real
RUNNER_DEBUGenvironment variable directly inside a step, rather than evaluatingrunner.debugas an expression in a disallowed scope.A second issue was caught during consumer-repo testing (see below): Briefcase performs a positional scan of
argvto detect<platform>/<format>before building its argument parser, so-vvvmust be placed after those tokens, not before the subcommand (briefcase create web static -vvv, notbriefcase -vvv create web static). All invocations have been corrected accordingly.Test Consumer project to use and trigger this CI:
PR Checklist:
Assisted-by: Github Copilot (Claude Sonnet 5)