-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing "debug" and "environment" keys in runner context #79
Open
kachick
wants to merge
2
commits into
actions:main
Choose a base branch
from
kachick:fix-missing-runner-context
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+40
−2
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sorry for the false-approval, I misclicked 🥴 )
Shouldn't this be
"0"
by default? 🤔My reasoning is that it will only be
"1"
if a workflow is run with a secret/variableACTIONS_RUNNER_DEBUG
set totrue
in context1 (or when ticking the "Enable debug logging" checkbox when re-running jobs)...Footnotes
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging#enabling-runner-diagnostic-logging ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reviewing. 🙏 I referred https://github.com/github/docs/blob/0208d54f08a79b92ba27a010722c87eb327e1c61/data/reusables/actions/runner-debug-description.md?plain=1#L1 for this value, and I understood the debug will be
1
orempty / undefined
instead of0
.I have checked the current ubuntu-24.04 runner behavior in https://github.com/kachick/example-actions-languageservices-78
In normal run
https://github.com/kachick/example-actions-languageservices-78/actions/runs/11745248730/job/32722225773
In debug mode
https://github.com/kachick/example-actions-languageservices-78/actions/runs/11745575165/job/32723371875#step:2:6
So I still guessing
debug
should never become0
.However in this test,
ACTIONS_RUNNER_DEBUG
in repository secrets/variables setting does not change the injected ENV.It looks only depend on the run is debug mode or not.
And I'm guessing actual source of truth is written in https://github.com/actions/runner/blob/6ef5803f24724b77a8d3599a478d06018da5d7c6/src/Runner.Worker/JobRunner.cs#L155-L158.
Whichever the default value, In my understanding, these values are not actually used in this extension; only the keys are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on
section is not includingpull_request
, accessinggithub.event.pull_request.assignee
alertsContext access might be invalid: pull_request
.runner.debug
does not consider whether the runner is actually in debug mode or not.I have no idea how to realize the polite behavior. 🙇♂️