Merged
Conversation
…ner beforehand for each step)
ethanchewy
commented
Jul 22, 2020
| { | ||
| if (stage == ActionRunStage.Post) | ||
| // We don't want to display the internal workings if composite (similar/equivalent information can be found in debug) | ||
| if (!ExecutionContext.InsideComposite) |
Contributor
Author
There was a problem hiding this comment.
All I did was wrap all the existing code in this if statement
Member
There was a problem hiding this comment.
add the if check to the caller of PrintActionDetails to reduce diff?
Member
There was a problem hiding this comment.
or should we print all these info using ExecutionContext.Debug() instead of ExecutionContext.Output()?
ericsciple
reviewed
Jul 22, 2020
| public override void PrintActionDetails(ActionRunStage stage) | ||
| { | ||
| if (stage == ActionRunStage.Post) | ||
| // We don't want to display the internal workings if composite (similar/equivalent information can be found in debug) |
Collaborator
There was a problem hiding this comment.
var writeDetails = ExecutionContext.InsideComposite ? ExecutionContext.Debug : ExecutionContext.Output as Action<string>;
...
writeDetails($"##[group]Run {firstLine}");
Contributor
Author
There was a problem hiding this comment.
I tried using delegate stuff but couldn't figure it out / maybe it's impossible (???).
I'm just going to do this instead since it accomplishes the same thing and may be easier to read:
void writeDetails(string message)
{
if (ExecutionContext.InsideComposite)
{
ExecutionContext.Debug(message);
}
else
{
ExecutionContext.Output(message);
}
}
ericsciple
approved these changes
Jul 22, 2020
fabianishere
pushed a commit
to fabianishere/runner
that referenced
this pull request
Aug 24, 2020
* Remove redundant code (display name is already evaluated in ActionRunner beforehand for each step) * remove * Remove nesting information for composite steps. * put messages in debug logs if composite. if not, put these messages as outputs * Fix group issue * Fix end group issue
fabianishere
pushed a commit
to fabianishere/runner
that referenced
this pull request
Sep 23, 2020
* Remove redundant code (display name is already evaluated in ActionRunner beforehand for each step) * remove * Remove nesting information for composite steps. * put messages in debug logs if composite. if not, put these messages as outputs * Fix group issue * Fix end group issue
AdamOlech
pushed a commit
to antmicro/runner
that referenced
this pull request
Jan 28, 2021
* Remove redundant code (display name is already evaluated in ActionRunner beforehand for each step) * remove * Remove nesting information for composite steps. * put messages in debug logs if composite. if not, put these messages as outputs * Fix group issue * Fix end group issue
TingluoHuang
pushed a commit
that referenced
this pull request
Apr 21, 2021
* Remove redundant code (display name is already evaluated in ActionRunner beforehand for each step) * remove * Remove nesting information for composite steps. * put messages in debug logs if composite. if not, put these messages as outputs * Fix group issue * Fix end group issue
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.
In this PR, I remove all of the "extra" information for each run step inside of the composite action.
It's easier to see through an example:
As you can see, our existing code has the equivalent information written to the debugging console as the "extra" information node.
Before Changes:

After Changes:
