Skip to content
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

Use Global.Variables instead of JobContext and include action path/ref in the message. #2214

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

TingluoHuang
Copy link
Member

@TingluoHuang TingluoHuang commented Oct 19, 2022

We should not use JobContext for carrying runner internal data.

image

Copy link
Contributor

@JoannaaKL JoannaaKL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be a bit better performance wise if we just appended the new warnings to the old ones? This way we just have to convert to json the new ones. :)
Sorry I was not able to edit the whole block so I just appended my suggestion at the bottom. 😃

@@ -137,13 +138,25 @@ public async Task RunAsync(ActionRunStage stage)

if (Data.NodeVersion == "node12" && (ExecutionContext.Global.Variables.GetBoolean(Constants.Runner.Features.Node12Warning) ?? false))
{
if (!ExecutionContext.JobContext.ContainsKey("Node12ActionsWarnings"))
var repoAction = Action as RepositoryPathReference;
var warningActions = new HashSet<string>();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using HashSet so we can remove duplication on the error message.

@TingluoHuang TingluoHuang merged commit 4adaf9c into main Nov 2, 2022
@TingluoHuang TingluoHuang deleted the users/tihuang/usevariables branch November 2, 2022 13:40
nikola-jokic pushed a commit to nikola-jokic/runner that referenced this pull request May 12, 2023
…f in the message. (actions#2214)

* Use Global.Variables instead of JobContext and include action path/ref in the message.

* encoding

* .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants