-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Enhancement: added defaults shell and working-directory to composite #1803
base: main
Are you sure you want to change the base?
Enhancement: added defaults shell and working-directory to composite #1803
Conversation
ExecutionContext.StepTelemetry.HasRunsStep = hasRunsStep; | ||
ExecutionContext.StepTelemetry.HasUsesStep = hasUsesStep; | ||
ExecutionContext.StepTelemetry.StepCount = steps.Count; | ||
} | ||
ExecutionContext.StepTelemetry.Type = "composite"; | ||
|
||
// save job defaults run to be restored after the composite run | ||
IDictionary<string, string> jobDefaultsRun = new Dictionary<string, string>(); | ||
if (ExecutionContext.Global.JobDefaults.ContainsKey("run")) |
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.
Lets not overwrite job defaults, let's use a new key called CompositeDefaults
, to minimize risk of these changes and make it clearer to read the code where these values are coming from.
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.
I changed it but I am not sure if this is what you have meant.
@@ -133,7 +137,7 @@ | |||
"working-directory": "string-steps-context", | |||
"shell": { | |||
"type": "string-steps-context", | |||
"required": true | |||
"required": false |
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.
we should still fail here if composite defaults aren't set and a shell isn't set for that step. Do we currently do that?
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.
Would love to see this PR make it over the finish line 😄 |
actions#2052) Co-authored-by: Octavia Stancu <[email protected]>
…tions#2069) * Include step context name in telemetry. * .
…ions#2062) * escaping key and quoting it to avoid key based command injection * extracted creation of flags to DockerUtil, with testing included
* Update releaseNote.md * Update runnerversion
…actions#2547) * Rename AcquireJobRequest::StreamID to AcquireJobRequest::JobMessageID to match corresponding server-side update. * appeased the linter * Added unit tests to prove AcquireJobRequest serialization/deserialization is as-expected. * Distinguish unit test variations. * Incorporated PR Feedback.
* Only upload to Results with new job message type * No need to have separate websocketFeedServer * Linting fix * Update src/Runner.Common/JobServerQueue.cs Co-authored-by: Tingluo Huang <[email protected]> * add connection timeout * Consolidate initializing webclient to result client * Retry websocket delivery for console logs * Linter fix * Do not give up for good, reconnect again in 10 minutes * Has to reset delivered * Only first time retry 3 times to connect to websocket --------- Co-authored-by: Tingluo Huang <[email protected]>
* Add orchestrationId to useragent for better correlation. * .
* handle conflict errors from run service * nit: formatting * fix formatting
* send annotations to run-service * skip message deletion * actually don't skip deletion * enum as numbers * fix enum * linting * remove unncessary file * feedback
Co-authored-by: Tingluo Huang <[email protected]>
…ctions#2311) * [1742] Ensure multiple composite annoations are correctly written. This implementation uses a collector pattern to allow embedded ExecutionContexts to stash Issue objects for later processing by a non-embedded ancestor ExecutionContext. Also: - Provide explicit constructor implementations for ExecutionContext - Leverage explicit constructors to solidify immutability of several ExecutionContext class members. - Fixed erroneous call to ExecutionContext.Complete in CompositeActionHandler.cs - Use a consistent timestamp for FinishTime in ExecutionContext::Complete * Ensure collected issues are processed only by a non-embedded ExecutionContext. This was already implicit. Now, just making it explicit. * Provide a clear mechanism that allows callers to opt-in/opt-out of ExecutionContext::AddIssue's logging behavior. * Addressed deserialization inconsistencies in TimelineRecord.cs * Added TimelineRecord unit tests. * Refined unit tests related to TimelineRecord::Variables case-insensitivity * Add a unit test that verifies ExecutionContextLogOptions::LogMessageOverride has the desired effect. * Responded to PR feedback. * Don't allow embedded ExecutionContexts to add Issues to a TimelineRecord
…#2443) * Add --no-default-labels option Signed-off-by: Gabriel Adrian Samfira <[email protected]> * Add tests Signed-off-by: Gabriel Adrian Samfira <[email protected]> * . --------- Signed-off-by: Gabriel Adrian Samfira <[email protected]> Co-authored-by: Tingluo Huang <[email protected]>
…tructure Error Flagging (actions#2488) * adding extra catch for download failure in composite actions * Adding infra error * Adding error handling centralizing * updating try catch bubbling * cleaning up commits * cleaning up commits * cleaning up commits * updating bubbler * cleaning up test files * Fixing linting errors * updating exception bubble * reverting composite * updating catch to not exclude other exceptions * removing uneeded import * Update src/Runner.Worker/ActionRunner.cs Co-authored-by: Tingluo Huang <[email protected]> * Update src/Runner.Worker/ActionManager.cs Co-authored-by: Tingluo Huang <[email protected]> * Update src/Runner.Worker/ActionManager.cs Co-authored-by: Tingluo Huang <[email protected]> * Update src/Runner.Worker/ActionManager.cs Co-authored-by: Tingluo Huang <[email protected]> * Update src/Runner.Worker/ActionManager.cs Co-authored-by: Tingluo Huang <[email protected]> * moving download out of for loop; reverting exception wrap * Update src/Runner.Worker/ActionManager.cs Co-authored-by: Tingluo Huang <[email protected]> * Adding blank lines back * Adding blank lines back * removing uneeded catch for download fail * adding var back for consistency * formatting clean --------- Co-authored-by: Tingluo Huang <[email protected]>
src/Runner.Common/Logging.cs
Outdated
} | ||
|
||
string line = $"{DateTime.UtcNow.ToString("O")} {message}"; | ||
_pageWriter.WriteLine(line); | ||
_resultsBlockWriter.WriteLine(line); |
Check failure
Code scanning / CodeQL
Clear text storage of sensitive information
29b7a63
to
ab0f3e1
Compare
Closes #836
This also removes the required shell parameter. That would not break existing workflows but will execute using default behaviour if
shell
anddefaults
are not specified.