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

correct perf-send-to-helix on windows #42235

Merged
merged 9 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/common/templates/steps/perf-send-to-helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parameters:
steps:
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml
parameters:
osGroup: ${{ variables['Agent.Os'] }}
osGroup: $(Agent.OS)
Copy link
Member

Choose a reason for hiding this comment

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

YAML identifiers should be case insensitive. I think you need to use variables['Agent.Os'] but use a different substitution syntax. I'll look it up after our team meeting, I think it's something like $[[ (instead of ${{) that expands later so that it "waits" until the variable gets populated. @DrewScoggins might remember the syntax off the top of his head.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible if we directly use this variable as variables['Agent.Os'] in

- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:

instead of passing it as a parameter?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be $[ variables('Agent.Os') ], at least I hope so

Copy link
Member

Choose a reason for hiding this comment

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

Well, the problem is that the inner-step is called from three different scripts, we would need to double-check that variables['Agent.Os'] work everywhere, it can likely break for cross-targeting builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sending the doc! I'll test $[ variables('Agent.Os') ] first

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the log it seems the $[ variables['Agent.Os'] ] is not expanded before evaluating the condition:

Begin evaluating template '/eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml'
Evaluating: eq(parameters['osGroup'], 'Windows_NT')
Expanded: eq('$[ variables[''Agent.Os''] ]', 'Windows_NT')
Result: False
Evaluating: ne(parameters['osGroup'], 'Windows_NT')
Expanded: ne('$[ variables[''Agent.Os''] ]', 'Windows_NT')
Result: True

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that the problem is.. the variable won't be populated until runtime but the condition evaluation happens at compile time? I was thinking we might want to try using runtime expression here $[ ] instead of compile expression

- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
@trylek

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found another place that uses this condition

- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:

but in this case it works because the variable's ready at compile time

sendParams: $(Build.SourcesDirectory)/eng/common/performance/${{ parameters.ProjectFile }} /restore /t:Test /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
trylek marked this conversation as resolved.
Show resolved Hide resolved
displayName: ${{ parameters.DisplayNamePrefix }}
condition: ${{ parameters.condition }}
Expand Down
19 changes: 18 additions & 1 deletion eng/pipelines/coreclr/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,24 @@ trigger:
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT

pr: none
pr:
branches:
include:
- master
paths:
include:
- '*'
- src/libraries/System.Private.CoreLib/*
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT

jobs:
#
Expand Down