Skip to content

Use new helix sdk/runtime functionality #31448

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

Merged
merged 81 commits into from
Apr 19, 2021
Merged

Use new helix sdk/runtime functionality #31448

merged 81 commits into from
Apr 19, 2021

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Apr 1, 2021

No description provided.

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Apr 1, 2021
Base automatically changed from darc-main-2c400715-e553-48d8-8d43-983dc7aa4b7d to main April 2, 2021 01:18
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

I bet correlation root is read only. Probably need to include just-built Microsoft.AspNetCore.App.Ref (if built) and Microsoft.AspNetCore.App.Runtime layouts in correlation payload for all platforms. Then, can exclude those packages from work item payloads.

@HaoK
Copy link
Member Author

HaoK commented Apr 2, 2021

Surprisingly all the tests are green, I'll run against the full helix matrix just to make sure there's no weirdness on any of the less used queues.

@@ -1,5 +1,10 @@
# We only want to run full helix matrix on main
pr: none
pr:
Copy link
Member Author

Choose a reason for hiding this comment

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

remove

@HaoK
Copy link
Member Author

HaoK commented Apr 2, 2021

So its only the docker queues that seem to have read-only correlation directories, and its only the project template tests that likely need them there, seeing if there's a way to look for the template hive in a different directory

@HaoK
Copy link
Member Author

HaoK commented Apr 2, 2021

Well everything is green now including helix matrix but I'm suspicious, @dougbu would we notice anything being broken immediately if the right aspnet runtime bits weren't installed for the template tests?

@dougbu
Copy link
Contributor

dougbu commented Apr 2, 2021

would we notice anything being broken immediately if the right aspnet runtime bits weren't installed for the template tests?

I'm not sure. May only see problems after the templates (and their tests) are changed to take advantage of a runtime change.

@HaoK
Copy link
Member Author

HaoK commented Apr 2, 2021

Should i just file an issue for that for now and get this change in since everything seems to be working? Its going to be hard for me to test whether anything I add works if the tests don't fail :/

@dougbu
Copy link
Contributor

dougbu commented Apr 2, 2021

Should i just file an issue for that for now and get this change in since everything seems to be working?

Makes sense if you think adding the just-built Microsoft.AspNetCore.App.Runtime bits will be in the correlation payload before we something that breaks the template test.

@HaoK
Copy link
Member Author

HaoK commented Apr 2, 2021

#31494 to track asp runtime bits potential issue

@HaoK HaoK changed the title Try new helix functionality Use new helix sdk/runtime functionality Apr 2, 2021
@HaoK HaoK marked this pull request as ready for review April 2, 2021 22:47
@HaoK HaoK requested a review from a team as a code owner April 2, 2021 22:47
@HaoK HaoK requested a review from MattGal April 2, 2021 22:47
@HaoK
Copy link
Member Author

HaoK commented Apr 12, 2021

@MattGal is there an easy way for me to see where a correlation payload got installed?

So we still need to add our own correlation payload to install some aspnet runtime shared bits, I see the correlation payload in the logs, but it doesn't tell me where it gets installed to, and I don't see it in the right place. I verified that it has all the binaries we want, I was trying to get it installed alongside the new dotnet-cli payloads in: /home/helixbot/work/CB3D0A95/p/dotnet-cli/shared/Microsoft.AspNetCore.App/6.0.0-ci which I tried to do using Destination on the HelixCorrelationPayload here:

<HelixCorrelationPayload Include="$(OutputPath)\AspNetCoreAppRuntimeHelix.zip" Destination="$(DotNetCliDestination)\shared\Microsoft.AspNetCore.App\$(SharedFxVersion)" />

-04-12T06:40:11.758Z	INFO   	executor(191)	_download_and_unpack	Downloading https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/AspNetCoreAppRuntimeHelix.zip to /home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip
2021-04-12T06:40:11.759Z	INFO   	executor(329)	_download_to	requesting https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/AspNetCoreAppRuntimeHelix.zip
2021-04-12T06:40:11.824Z	INFO   	saferequests(87)	request_with_retry	Response complete with status code '200'
2021-04-12T06:40:11.824Z	INFO   	executor(335)	_download_request	response received. Status: 200 Elapsed time: 0:00:00.063105
2021-04-12T06:40:11.872Z	INFO   	executor(521)	_get_unpacked_file_paths	Reading archive file:/home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip.partial
2021-04-12T06:40:11.873Z	INFO   	executor(418)	_unpack_zipfile	Unpacking /home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip.partial
2021-04-12T06:40:11.972Z	INFO   	executor(464)	_is_valid_archive	Validating unpacked payload: 

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-aspnetcore-refs-pull-31448-merge-becc2bd7ffd74cd68f/Microsoft.AspNetCore.App.UnitTests--net6.0/7a8be216-ed2c-416a-827b-c70fc0511846.log?sv=2019-07-07&se=2021-05-02T06%3A27%3A02Z&sr=c&sp=rl&sig=i3w9Fw0xLZ6DjhE8lNXjHoH30v6hsY8k%2BKyLO%2BxG3sg%3D

@MattGal
Copy link
Member

MattGal commented Apr 12, 2021

@MattGal is there an easy way for me to see where a correlation payload got installed?

So we still need to add our own correlation payload to install some aspnet runtime shared bits, I see the correlation payload in the logs, but it doesn't tell me where it gets installed to, and I don't see it in the right place. I verified that it has all the binaries we want, I was trying to get it installed alongside the new dotnet-cli payloads in: /home/helixbot/work/CB3D0A95/p/dotnet-cli/shared/Microsoft.AspNetCore.App/6.0.0-ci which I tried to do using Destination on the HelixCorrelationPayload here:

<HelixCorrelationPayload Include="$(OutputPath)\AspNetCoreAppRuntimeHelix.zip" Destination="$(DotNetCliDestination)\shared\Microsoft.AspNetCore.App\$(SharedFxVersion)" />

-04-12T06:40:11.758Z	INFO   	executor(191)	_download_and_unpack	Downloading https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/AspNetCoreAppRuntimeHelix.zip to /home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip
2021-04-12T06:40:11.759Z	INFO   	executor(329)	_download_to	requesting https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/AspNetCoreAppRuntimeHelix.zip
2021-04-12T06:40:11.824Z	INFO   	saferequests(87)	request_with_retry	Response complete with status code '200'
2021-04-12T06:40:11.824Z	INFO   	executor(335)	_download_request	response received. Status: 200 Elapsed time: 0:00:00.063105
2021-04-12T06:40:11.872Z	INFO   	executor(521)	_get_unpacked_file_paths	Reading archive file:/home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip.partial
2021-04-12T06:40:11.873Z	INFO   	executor(418)	_unpack_zipfile	Unpacking /home/helixbot/work/CB3D0A95/w/AspNetCoreAppRuntimeHelix.zip.partial
2021-04-12T06:40:11.972Z	INFO   	executor(464)	_is_valid_archive	Validating unpacked payload: 

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-aspnetcore-refs-pull-31448-merge-becc2bd7ffd74cd68f/Microsoft.AspNetCore.App.UnitTests--net6.0/7a8be216-ed2c-416a-827b-c70fc0511846.log?sv=2019-07-07&se=2021-05-02T06%3A27%3A02Z&sr=c&sp=rl&sig=i3w9Fw0xLZ6DjhE8lNXjHoH30v6hsY8k%2BKyLO%2BxG3sg%3D

It's true we don't log all the destination files (would bloat these logs quite a bit, the work item payload is bad enough) but you can easily figure this out by getting the job's list file (can get these URLs from the Helix API)

Relevant bits are in every work item:

    "CorrelationPayloadUrisWithDestinations": {
      "https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/6041cd2d-ece9-4baa-b818-2dc760fb55ec.zip?sv=2019-07-07&se=2021-05-02T06%3A24%3A07Z&sr=c&sp=rl&sig=0mpLMarPGmwQCUIzF6%2FMy9uT8bcaxse9UotK7HOPSJ0%3D": "",
      "https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/AspNetCoreAppRuntimeHelix.zip?sv=2019-07-07&se=2021-05-02T06%3A24%3A07Z&sr=c&sp=rl&sig=0mpLMarPGmwQCUIzF6%2FMy9uT8bcaxse9UotK7HOPSJ0%3D": "dotnet-cli\\shared\\Microsoft.AspNetCore.App\\6.0.0-ci",
      "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/6.0.0-preview.4.21211.1/dotnet-runtime-6.0.0-preview.4.21211.1-linux-x64.tar.gz": "dotnet-cli",
      "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.100-preview.3.21168.19/dotnet-sdk-6.0.100-preview.3.21168.19-linux-x64.tar.gz": "dotnet-cli",
      "https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/6e283202-422b-4ce9-987f-19f3ea9156f8.zip?sv=2019-07-07&se=2021-05-02T06%3A24%3A07Z&sr=c&sp=rl&sig=0mpLMarPGmwQCUIzF6%2FMy9uT8bcaxse9UotK7HOPSJ0%3D": "",
      "https://helixde8s23ayyeko0k025g8.blob.core.windows.net/helix-job-153c50bf-ac51-4103-b653-2df3524f9331d9fbd4eb61440989a/d561ce6d-3380-44b9-880d-f0556f7005bc.zip?sv=2019-07-07&se=2021-05-02T06%3A24%3A07Z&sr=c&sp=rl&sig=0mpLMarPGmwQCUIzF6%2FMy9uT8bcaxse9UotK7HOPSJ0%3D": ""
    },

I'd guess one problem may be coming from having destination paths like dotnet-cli\\shared\\Microsoft.AspNetCore.App\\6.0.0-ci on a linux machine, since that actually makes a folder named "dotnet-cli\shared\Microsoft.AspNetCore.App\6.0.0-ci" and not any form of subfolders.

Another common thing to do while developing and updating new work in Helix stuff would be to just recursively list the files in $HELIX_CORRELATION_PAYLOAD and don't remove the line that does that til you like what's happening.

@HaoK
Copy link
Member Author

HaoK commented Apr 12, 2021

Yuck, so we need to set the destination path differently based on OS, or does windows handle '/' correctly? Do you have any advice for the best way for me to have this install into the cli payloads? Basically we just want to unpack this dll into a directory alongside the other correlation payloads (but inside)

@HaoK
Copy link
Member Author

HaoK commented Apr 12, 2021

Or I guess I can package the zip to have the right sub structure and have it just go to dotnet-cli like the other payloads

@MattGal
Copy link
Member

MattGal commented Apr 12, 2021

Or I guess I can package the zip to have the right sub structure and have it just go to dotnet-cli like the other payloads

I think this is the better idea, but to your other question most (but not all) Windows APIs and consoles and such don't care about forward-slashes so you can often get away with only using /.

@HaoK
Copy link
Member Author

HaoK commented Apr 14, 2021

@dougbu looks like the unit tests failures are due to the local aspnetcore.app directory not containing the data/RunTimeList.xml which is in the nupkg. I'm going to just switch back to unzipping the nupkgs for now since that was working immediately and actually took less lines of msbuild magic. I can file a followup issue for tracking if this is something that you think is worth changing in the future.

@HaoK
Copy link
Member Author

HaoK commented Apr 14, 2021

Actually maybe @wtgodbe can just point me to where the RuntimeList.xml can be harvested from, looks like we explicitly dropped these in 6.0 in this change? fc45191

The App tests seem to need this file, so @wtgodbe do you know where can I get this to include in the helix payloads now?

@wtgodbe
Copy link
Member

wtgodbe commented Apr 14, 2021

This is where we specify the location of that file:

<FrameworkListFileName>RuntimeList.xml</FrameworkListFileName>
<FrameworkListOutputPath>$(ArtifactsObjDir)$(FrameworkListFileName)</FrameworkListOutputPath>

it'll be available there after the SharedFx is built

@HaoK
Copy link
Member Author

HaoK commented Apr 14, 2021

@wtgodbe so I tried building Microsoft.AspNetCore.App.Runtime and I don't see it get produced in the artifacts directory, or am I supposed to build a different directory to see it get dropped?

@HaoK
Copy link
Member Author

HaoK commented Apr 15, 2021

Finally green again, @dougbu is there anything left that you want addressed in this iteration? I'll remove the helix matrix run now

@dougbu
Copy link
Contributor

dougbu commented Apr 15, 2021

I'll review after lunch @HaoK

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Mostly nits but please at least double-check the last comment I made.

<Copy SourceFiles="@(_appRuntimeFiles)" DestinationFolder="$(OutputPath)\AspNetCoreAppRuntimeHelix\shared\Microsoft.AspNetCore.App\$(SharedFxVersion)" />
<Unzip Condition="Exists('$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Ref.$(SharedFxVersion).nupkg')"
SourceFiles="$(RepoRoot)artifacts\packages\$(Configuration)\Shipping\Microsoft.AspNetCore.App.Ref.$(SharedFxVersion).nupkg"
DestinationFolder="$(OutputPath)\AspNetCoreAppRuntimeHelix\packs\Microsoft.AspNetCore.App.Ref\$(SharedFxVersion)" />
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Without the include list approach you took with the Runtime, this will include the .nuspec file, _rels folder, and package folder. Suggest doing a similar thing here but with $(RecursiveDir) in the <Copy /> task to handle the multiple folders you do want in the Ref case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Does it hurt to include those files? This mimics what we were doing before anyways, we used to just unzip everything into the folder in the test runner so I'd rather not tweak things any if its harmless for verification purposes. My preference would be to just use unzip for both of these, but the runtime tests are currently written to expect a flattened hierarchy where the RuntimeList.xml isn't in the package folder. Since the main purpose of this PR is to just get us switched onto the correlation payload functionality, I don't want to mess around with the app unit tests anymore since everything is passing. I can file an issue to clean up this area for tracking purposes if you feel this is important in the future, but I don't want to tweak the msbuild anymore in this PR

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
@HaoK
Copy link
Member Author

HaoK commented Apr 16, 2021

Thanks for being patient and reviewing this and getting this work done @dougbu @MattGal

I won't merge this until after we branch for preview 4 since I don't want to destabilize things on the CI for preview 4

@HaoK HaoK merged commit 9f96be4 into main Apr 19, 2021
@HaoK HaoK deleted the haok/payload branch April 19, 2021 16:23
@ghost ghost added this to the 6.0-preview5 milestone Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helix add built AspnetCore.App as a correlation payload
4 participants