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

[wasm] Fix perf pipeline errors #75406

Merged
merged 3 commits into from
Sep 13, 2022
Merged

Conversation

radical
Copy link
Member

@radical radical commented Sep 11, 2022

Build SizeOnDisk, and Startup tools for net7.0 instead of net6.0.

It current fails with:

error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 6.0.10)
error NU1102:   - Found 2073 version(s) in dotnet6 [ Nearest version: 6.0.2-servicing.1.22101.5 ]
error NU1102:   - Found 1520 version(s) in dotnet7 [ Nearest version: 7.0.0-alpha.1.21417.28 ]
error NU1102:   - Found 1120 version(s) in dotnet5 [ Nearest version: 6.0.0-alpha.1.20420.3 ]
error NU1102:   - Found 76 version(s) in dotnet3.1 [ Nearest version: 3.1.1-servicing.19602.11 ]
error NU1102:   - Found 52 version(s) in dotnet-public [ Nearest version: 7.0.0-preview.1.22076.8 ]
error NU1102:   - Found 1 version(s) in dotnet-eng [ Nearest version: 5.0.0-alpha.1.19618.1 ]
error NU1102:   - Found 0 version(s) in benchmark-dotnet-prerelease
error NU1102:   - Found 0 version(s) in dotnet-tools
error NU1102:   - Found 0 version(s) in dotnet3.1-transport
error NU1102:   - Found 0 version(s) in dotnet5-transport

We are building with 8.0 sdk now, but for tfm=net7.0 and that confuses

the setup script. So, explicitly pass --dotnet-versions 8.0.0, so it
can resolve to the available sdk.

Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 357, in <module>
    __main(sys.argv[1:])
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 310, in __main
    dotnet_version = dotnet.get_dotnet_version(target_framework_moniker, args.cli) if args.dotnet_versions == [] else args.dotnet_versions[0]
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/dotnet.py", line 568, in get_dotnet_version
    "Unable to determine the .NET SDK used for {}".format(framework)
RuntimeError: Unable to determine the .NET SDK used for net7.0

Use test-main.js from 7.0 branch for perf pipeline

Since we use a sdk+workload for running the perf benchmarks, and build
the projects for tfm=net7.0, it uses the 7.0 runtime pack, which has
some differences. So, use the 7.0 test-main.js .

Fails with:

[2022/09/11 01:06:47][INFO] test-main.js:262: TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]             .withExitOnUnhandledError()
[2022/09/11 01:06:47][INFO]              ^
[2022/09/11 01:06:47][INFO] TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]     at run (test-main.js:262:14)
[2022/09/11 01:06:47][INFO]
[2022/09/11 01:06:47][INFO] 1 pending unhandled Promise rejection(s) detected.

Fixes #75398 .

@radical radical added NO-REVIEW Experimental/testing PR, do NOT review it arch-wasm WebAssembly architecture area-Infrastructure-mono perf-pipeline Issues with dotnet-runtime-perf, or runtime-wasm-perf pipelines labels Sep 11, 2022
@ghost ghost assigned radical Sep 11, 2022
@ghost
Copy link

ghost commented Sep 11, 2022

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: radical
Assignees: -
Labels:

NO-REVIEW, arch-wasm, area-Infrastructure-mono, perf-pipeline

Milestone: -

@radical
Copy link
Member Author

radical commented Sep 11, 2022

/azp run runtime-wasm-perf

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@radical
Copy link
Member Author

radical commented Sep 11, 2022

/azp run runtime-wasm-perf

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Build SizeOnDisk, and Startup tools for `net7.0` instead of `net6.0`.

It current fails with:

```
error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 6.0.10)
error NU1102:   - Found 2073 version(s) in dotnet6 [ Nearest version: 6.0.2-servicing.1.22101.5 ]
error NU1102:   - Found 1520 version(s) in dotnet7 [ Nearest version: 7.0.0-alpha.1.21417.28 ]
error NU1102:   - Found 1120 version(s) in dotnet5 [ Nearest version: 6.0.0-alpha.1.20420.3 ]
error NU1102:   - Found 76 version(s) in dotnet3.1 [ Nearest version: 3.1.1-servicing.19602.11 ]
error NU1102:   - Found 52 version(s) in dotnet-public [ Nearest version: 7.0.0-preview.1.22076.8 ]
error NU1102:   - Found 1 version(s) in dotnet-eng [ Nearest version: 5.0.0-alpha.1.19618.1 ]
error NU1102:   - Found 0 version(s) in benchmark-dotnet-prerelease
error NU1102:   - Found 0 version(s) in dotnet-tools
error NU1102:   - Found 0 version(s) in dotnet3.1-transport
error NU1102:   - Found 0 version(s) in dotnet5-transport
```
We are building with 8.0 sdk now, but for tfm=net7.0 and that confuses
the setup script. So, explicitly pass `--dotnet-versions 8.0.0`, so it
can resolve to the available sdk.

```
Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 357, in <module>
    __main(sys.argv[1:])
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/ci_setup.py", line 310, in __main
    dotnet_version = dotnet.get_dotnet_version(target_framework_moniker, args.cli) if args.dotnet_versions == [] else args.dotnet_versions[0]
  File "/mnt/vss/_work/1/s/Payload/performance/scripts/dotnet.py", line 568, in get_dotnet_version
    "Unable to determine the .NET SDK used for {}".format(framework)
RuntimeError: Unable to determine the .NET SDK used for net7.0
```
Since we use a sdk+workload for running the perf benchmarks, and build
the projects for tfm=net7.0, it uses the 7.0 runtime pack, which has
some differences. So, use the 7.0 test-main.js .

Fails with:

```
[2022/09/11 01:06:47][INFO] test-main.js:262: TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]             .withExitOnUnhandledError()
[2022/09/11 01:06:47][INFO]              ^
[2022/09/11 01:06:47][INFO] TypeError: dotnet.withVirtualWorkingDirectory(...).withEnvironmentVariables(...).withDiagnosticTracing(...).withExitOnUnhandledError is not a function
[2022/09/11 01:06:47][INFO]     at run (test-main.js:262:14)
[2022/09/11 01:06:47][INFO]
[2022/09/11 01:06:47][INFO] 1 pending unhandled Promise rejection(s) detected.
```
@radical radical marked this pull request as ready for review September 11, 2022 20:15
@radical radical removed the NO-REVIEW Experimental/testing PR, do NOT review it label Sep 12, 2022
@radical
Copy link
Member Author

radical commented Sep 13, 2022

this needs an approval. Without this dotnet-runtime-perf is broken on main.

echo " --alpine Set for runs on Alpine"
echo " --iosmono Set for ios Mono/Maui runs"
echo " --iosllvmbuild Set LLVM for iOS Mono/Maui runs"
echo " --mauiversion Set the maui version for Mono/Maui runs"
echo ""
exit 0
exit 1
Copy link
Member

Choose a reason for hiding this comment

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

Why did we change this to 1?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you pass an unknown argument to the script then it will show help, and exit. But the build will keep going, even though it is missing crucial setup configuration. With exit 1, the build will stop at that point.

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense, this should be a good change.

@@ -162,7 +163,7 @@ jobs:
displayName: Performance Setup (Unix)
condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
continueOnError: ${{ parameters.continueOnError }}
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
- script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) ${{ parameters.additionalSetupParameters }}
Copy link
Member

Choose a reason for hiding this comment

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

It is mentioned that the additionalSetupParameters is passed to performance-setup, although is being passed to ci_setup here. Along with the changes to performance-setup, it looks like this should be added to the lines above this one.

Copy link
Member Author

Choose a reason for hiding this comment

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

For run-perfomance-job the comments in perf-wasm-jobs.yml say:
additionalSetupParameters: '--dotnet-versions 8.0.0' # passed to ci_setup.py

For run-scenarios-job the comment says:
additionalSetupParameters: '--dotnetversions 8.0.0' # passed to performance-setup.sh

That matches what the ymls are doing. Please correct me if I'm missing something.

@@ -354,6 +360,10 @@ if [[ -n "$mono_dotnet" && "$monoaot" == "false" ]]; then
mv $mono_dotnet $mono_dotnet_path
fi

if [[ -n "$dotnet_versions" ]]; then
setup_arguments="$setup_arguments --dotnet-versions $dotnet_versions"
Copy link
Member

Choose a reason for hiding this comment

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

Is there a corresponding change to ci_setup in the perf repo to use this setup argument? I didn't see anything already implemented.

Copy link
Member Author

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 see, I missed the dotnet parser args being added to the ci_setup parser.

@ghost ghost added needs-author-action An issue or pull request that requires more info or actions from the author. and removed needs-author-action An issue or pull request that requires more info or actions from the author. labels Sep 13, 2022
Copy link
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

LGTM

@radical radical merged commit 8293726 into dotnet:main Sep 13, 2022
@radical radical deleted the fix-perf-pipeline branch September 13, 2022 17:13
@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Infrastructure-mono perf-pipeline Issues with dotnet-runtime-perf, or runtime-wasm-perf pipelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wasm] perf pipeline: All wasm jobs broken with RuntimeError: Unable to determine the .NET SDK used for net7.0
2 participants