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

raise error for set-env, block set node_options. #784

Merged
merged 2 commits into from Nov 2, 2020

Conversation

TingluoHuang
Copy link
Member

@TingluoHuang TingluoHuang commented Nov 2, 2020

  • create error instead of warning when the customer uses deprecated commands.
  • block set NODE_OPTIONS using ::set-env::

image

Copy link
Contributor

@hross hross left a comment

Choose a reason for hiding this comment

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

Approving but I think you should fix the error message based on the block

@TingluoHuang TingluoHuang merged commit 2778849 into main Nov 2, 2020
@TingluoHuang TingluoHuang deleted the users/tihuang/nodeoptions branch November 2, 2020 19:09
TingluoHuang added a commit that referenced this pull request Nov 2, 2020
* raise error for set-env, block set node_options.

* feedback.
@juliobbv juliobbv requested review from juliobbv and removed request for juliobbv November 2, 2020 19:22
Copy link
Contributor

@juliobbv juliobbv left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

issue.Data[Constants.Runner.InternalTelemetryIssueDataKey] = $"{Constants.Runner.UnsupportedCommand}_{envName}";
context.AddIssue(issue);

return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: this return; statement was surprising to me to read at first.

I'm guessing that if we ever add more items to _setEnvBlockList, we want the runner to report an error on the first offending env var, instead of all of them, @TingluoHuang?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was just want to make sure we don't run

context.Global.EnvironmentVariables[envName] = command.Data;
context.SetEnvContext(envName, command.Data);
context.Debug($"{envName}='{command.Data}'");

AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
* raise error for set-env, block set node_options.

* feedback.
TingluoHuang added a commit that referenced this pull request Apr 21, 2021
* raise error for set-env, block set node_options.

* feedback.
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.

None yet

3 participants