-
Notifications
You must be signed in to change notification settings - Fork 971
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
Composite Run Steps Refactoring #591
Conversation
Current Progress on how UI Shows Composite Steps (each step is delayed for 5 secs): |
experimenting to see if I can get my new commits to show in this PR... |
@@ -92,26 +92,11 @@ public async Task RunAsync(IExecutionContext jobContext) | |||
var envContext = new CaseSensitiveDictionaryContextData(); | |||
#endif | |||
|
|||
// Global env | |||
foreach (var pair in step.ExecutionContext.EnvironmentVariables) |
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.
These changes are to revert the workaround we used to flow Env to composite actions. This is now handled in the Composite Steps Runner.
* Add basic framework for baby steps runner * Basic logic for adding steps / invoking composite action steps * Composite Steps Runner MVP * Fix null object reference error * intialize composiute * Comment out code that is handled by stepsrunner * Add composite clean up step * Remove previous 'workarounds' from StepsRunner. Clean Up PR * Remove todo * Remove todo * Fix using unitialized object yikes * Remove time delay * Format handler * Move output handler into action handler * Add try to evaluate display name * Remove while loop yikes * Abstract away the windows encoding check during step running * Github context set to {ScopeName}.{ContextName} or {ContextName} if ScopeName is null * Remove setting result to sucess since result defaults to sucess * Fix windows error * Fix windows * revert: * Windows fix * Fix Windows Error in Abstraction * Remove Composite Steps Runner => consolidate into Composite Steps Runner * Remove unn. attribute in ExecutionContext * Change protection levels, plus change function name to more clear meaning * Remove location param * location pt.2 fix * Remove outputs step * Remove temp directory * new line * Add arguitl not null * better comment * Change encoding name * Check count > 0 for composite steps, import System.Threading * Change function header encodingutil * Add TODO * Add await * Handle Failed Step * Move over SetAllCompositeOutputs to the handler * Remove timeout-minutes setting in steps-level * Use only ExecutionContext * Move using to the top * Remove redundant check * Change function name * Remove testing code * Consolidate error code * Consolidate code * Change HandleOutput => ProcessCompositeActionOutputs * Remove set the timeout comment * Add Cancelling functionality + Remove unn. parameter
* Add basic framework for baby steps runner * Basic logic for adding steps / invoking composite action steps * Composite Steps Runner MVP * Fix null object reference error * intialize composiute * Comment out code that is handled by stepsrunner * Add composite clean up step * Remove previous 'workarounds' from StepsRunner. Clean Up PR * Remove todo * Remove todo * Fix using unitialized object yikes * Remove time delay * Format handler * Move output handler into action handler * Add try to evaluate display name * Remove while loop yikes * Abstract away the windows encoding check during step running * Github context set to {ScopeName}.{ContextName} or {ContextName} if ScopeName is null * Remove setting result to sucess since result defaults to sucess * Fix windows error * Fix windows * revert: * Windows fix * Fix Windows Error in Abstraction * Remove Composite Steps Runner => consolidate into Composite Steps Runner * Remove unn. attribute in ExecutionContext * Change protection levels, plus change function name to more clear meaning * Remove location param * location pt.2 fix * Remove outputs step * Remove temp directory * new line * Add arguitl not null * better comment * Change encoding name * Check count > 0 for composite steps, import System.Threading * Change function header encodingutil * Add TODO * Add await * Handle Failed Step * Move over SetAllCompositeOutputs to the handler * Remove timeout-minutes setting in steps-level * Use only ExecutionContext * Move using to the top * Remove redundant check * Change function name * Remove testing code * Consolidate error code * Consolidate code * Change HandleOutput => ProcessCompositeActionOutputs * Remove set the timeout comment * Add Cancelling functionality + Remove unn. parameter
* Add basic framework for baby steps runner * Basic logic for adding steps / invoking composite action steps * Composite Steps Runner MVP * Fix null object reference error * intialize composiute * Comment out code that is handled by stepsrunner * Add composite clean up step * Remove previous 'workarounds' from StepsRunner. Clean Up PR * Remove todo * Remove todo * Fix using unitialized object yikes * Remove time delay * Format handler * Move output handler into action handler * Add try to evaluate display name * Remove while loop yikes * Abstract away the windows encoding check during step running * Github context set to {ScopeName}.{ContextName} or {ContextName} if ScopeName is null * Remove setting result to sucess since result defaults to sucess * Fix windows error * Fix windows * revert: * Windows fix * Fix Windows Error in Abstraction * Remove Composite Steps Runner => consolidate into Composite Steps Runner * Remove unn. attribute in ExecutionContext * Change protection levels, plus change function name to more clear meaning * Remove location param * location pt.2 fix * Remove outputs step * Remove temp directory * new line * Add arguitl not null * better comment * Change encoding name * Check count > 0 for composite steps, import System.Threading * Change function header encodingutil * Add TODO * Add await * Handle Failed Step * Move over SetAllCompositeOutputs to the handler * Remove timeout-minutes setting in steps-level * Use only ExecutionContext * Move using to the top * Remove redundant check * Change function name * Remove testing code * Consolidate error code * Consolidate code * Change HandleOutput => ProcessCompositeActionOutputs * Remove set the timeout comment * Add Cancelling functionality + Remove unn. parameter
* Add basic framework for baby steps runner * Basic logic for adding steps / invoking composite action steps * Composite Steps Runner MVP * Fix null object reference error * intialize composiute * Comment out code that is handled by stepsrunner * Add composite clean up step * Remove previous 'workarounds' from StepsRunner. Clean Up PR * Remove todo * Remove todo * Fix using unitialized object yikes * Remove time delay * Format handler * Move output handler into action handler * Add try to evaluate display name * Remove while loop yikes * Abstract away the windows encoding check during step running * Github context set to {ScopeName}.{ContextName} or {ContextName} if ScopeName is null * Remove setting result to sucess since result defaults to sucess * Fix windows error * Fix windows * revert: * Windows fix * Fix Windows Error in Abstraction * Remove Composite Steps Runner => consolidate into Composite Steps Runner * Remove unn. attribute in ExecutionContext * Change protection levels, plus change function name to more clear meaning * Remove location param * location pt.2 fix * Remove outputs step * Remove temp directory * new line * Add arguitl not null * better comment * Change encoding name * Check count > 0 for composite steps, import System.Threading * Change function header encodingutil * Add TODO * Add await * Handle Failed Step * Move over SetAllCompositeOutputs to the handler * Remove timeout-minutes setting in steps-level * Use only ExecutionContext * Move using to the top * Remove redundant check * Change function name * Remove testing code * Consolidate error code * Consolidate code * Change HandleOutput => ProcessCompositeActionOutputs * Remove set the timeout comment * Add Cancelling functionality + Remove unn. parameter
In this PR, we consolidate the Composite Output Handler and the StepsRunner code all into the composite action handler as well as remove as much code as possible for ExecutionContext!
Previously, we built another steps runner for processing composite actions but that made us realized we actually don't need one and we can fit all the StepsRunner logic in the handler!
This provides a variety of benefits. Namely,
Our main goal is to 1) refactor codebase so that Composite Actions has its own StepsRunner 2) Make sure this works with our previous built in functionalities for composite run steps.
In another PR, we'll build off of this PR to add on additional support for continue-on-error and timeout-minutes. After that, we'll start building support for nested actions of all types. We can also explore abstracting Execution Context for Composite Actions.
Based off of exploration here: #584
Previous composite changes for reference: https://github.com/actions/runner/commits?author=ethanchewy
One tangible benefit you can directly see from this PR, is that the UI shows the nested steps proceeding in order in an intuitive fashion now: https://drive.google.com/file/d/1JzAWi0qOHQSOK-fBMp8Q_AFwPkkRqvDl/view?usp=sharing
Old ScreenRecording for Reference (We don't update the timeline name for every step in the newest PR version):