Enable verbose output from CI debug environment variables.#56
Merged
Conversation
Automatically enable verbose output when a CI provider is running in debug mode, e.g. GitHub Actions re-run with "Enable debug logging" (RUNNER_DEBUG=1). Also supports GitLab CI, Buildkite, Azure Pipelines, and an explicit SUS_VERBOSE toggle. Assisted-By: devx/0e90505d-10c5-4dfa-be04-c43abc87164a
Add an env: parameter to Config.load so tests can supply an isolated environment, preventing failures when sus itself is run in CI debug mode. Assisted-By: devx/0e90505d-10c5-4dfa-be04-c43abc87164a
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
When a CI provider is re-run in debug/verbose mode, sus now automatically enables verbose output (equivalent to passing
--verbose). The most common case is GitHub Actions: re-running a workflow with "Enable debug logging" setsRUNNER_DEBUG=1, which we now detect.Supported environment variables
SUS_VERBOSEtrueRUNNER_DEBUG1CI_DEBUG_TRACEtrueBUILDKITE_AGENT_DEBUGtrueSYSTEM_DEBUGtrue--verbosecontinues to work as before; the environment check is an additional trigger.Tests
Added coverage for
Config.verbose_from_environment?(each provider, defaults, unrelated values) andConfig#verbose?(the--verboseargument). Full suite passes (287 tests).