Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Properly set the nuget cache for the repo #24505

Merged

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 3.0 milestone May 9, 2019
@RussKeldorph
Copy link

Confirmed /sourcelink appears on the csc command line. Thanks!

@AaronRobinsonMSFT
Copy link
Member Author

I believe the failure for CoreFX is from the following:

./eng/Version.Details.xml

    <!-- This dependency should be added, but it causes the github PR legs to not launch. -->
    <!-- Dependency Name="microsoft.dotnet.build.tasks.feed" Version="2.2.0-beta.19229.8">
      <Uri>https://github.com/dotnet/arcade</Uri>
      <Sha>a7a250e9c13147134543c35fef2fb81f19592edf</Sha>
    </Dependency-->

@AaronRobinsonMSFT
Copy link
Member Author

@RussKeldorph I have no idea why the CoreFX leg is failing. I tried uncommenting the XML mentioned above to not effect and attempted to bump the version number, also no observed impact. Any suggestions on who can help with this facet of the pipeline?

@tommcdon
Copy link
Member

@mikem8361

@hoyosjs
Copy link
Member

hoyosjs commented May 10, 2019

@AaronRobinsonMSFT That's indeed the error, however the XML file is just for information. Add the following property to eng/Versions.props:

<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.19229.8</MicrosoftDotNetBuildTasksFeedVersion>

@AaronRobinsonMSFT
Copy link
Member Author

@hoyosjs I guess the extension is supposed to indicate that? I updated both files with the suggested version and resolved some conflicts. Thanks for the suggestion.

@AaronRobinsonMSFT
Copy link
Member Author

@hoyosjs The set version is now being respected during discovery - yay, but the package for some reason isn't being pulled down. Any thoughts here?

@hoyosjs
Copy link
Member

hoyosjs commented May 10, 2019

Taking a look now

@hoyosjs
Copy link
Member

hoyosjs commented May 10, 2019

I think I found the issue: we just never call the common engineering files to perform restore properly

@RussKeldorph
Copy link

Yeah, I'm seeing the missing package being restored to the wrong place. The different steps don't agree on the package root.

@AaronRobinsonMSFT
Copy link
Member Author

I think I found the issue: we just never call the common engineering files to perform restore properly

I don't understand how this was ever working then. I want to understand what we are missing in a bit more detail. Any links to relevant doc or code that illustrates the missing call?

@hoyosjs
Copy link
Member

hoyosjs commented May 10, 2019

I'm honestly not sure how this fixes SourceLink entirely, although I have a good guess. As for how this used to work, no idea. I left the comment of the package restore missing on the review for CoreFX testing. I assumed some part of the restore logic in arcade had run at an earlier step. Try adding this in between Build tests and Send tests to Helix steps in test-job.yml, just a bit more debt until we fully move to arcade.

    - ${{ if eq(parameters.corefxTests, true) }}:
      - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
        - script: eng/common/build.sh -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true -projects $(Build.SourcesDirectory)\eng\empty.proj
        displayName: Build product
      - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
          - script: powershell eng\common\build.ps1 -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true -projects $(Build.SourcesDirectory)\eng\empty.proj

@RussKeldorph
Copy link

RussKeldorph commented May 10, 2019

I don't understand...

@AaronRobinsonMSFT I don't think anyone does at this point. We should just try to increase our understanding each time we find these, and try to prevent others from tripping over the same thing.

The proliferation of NUGET_PACKAGES references inside the eng folder suggests that .packages is a better choice for NuGetPackageRoot than packages. I can hear the remaining BuildTools dependencies licking their lips right now.

@AaronRobinsonMSFT
Copy link
Member Author

Yay! Confirmed the package not being found in the CoreFX leg has been addressed. +1 for progress.

@AaronRobinsonMSFT
Copy link
Member Author

The CoreFX leg passed! 😂

@hoyosjs
Copy link
Member

hoyosjs commented May 10, 2019

Looks like the restore happened in

- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# TODO: Remove and consolidate this when we move to arcade via init-tools.cmd.
- powershell: eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -ci -restore -projects $(Build.SourcesDirectory)\eng\empty.proj
displayName: Restore blob feed tasks
${{ if ne(parameters.condition, '') }}:
condition: ${{ parameters.condition }}
and I didn't see it. It all makes sense. Also, the only place that concerned me from the usage of a package directory was solved by @jkoritzinsky with #24347. :shipit: :

@AaronRobinsonMSFT
Copy link
Member Author

Docker image timeout. All other legs pass as expected.

Results will be available from https://mc.dot.net/#/user/coreclr-ci/pr~2Fdotnet~2Fcoreclr~2Frefs~2Fpull~2F24505~2Fmerge/test~2Ffunctional~2Fcli~2F/20190510.722

Details from Job 58aa7264-c462-4d24-a226-809c97b88b62
ExitCode: 999
Ran on Machine: DDARM64S-008

Executed on DDARM64S-008 using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-0a0ebdd-20190312220351
running $HELIX_CORRELATION_PAYLOAD/scripts/394fc4f4873a4d0d9af55974078ce4d2/execute.sh in /home/helixbot/work/58aa7264-c462-4d24-a226-809c97b88b62/Work/32c7ea27-e496-4a24-b12e-0fb86dbd23e7/Exec max 1800 seconds

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 44d22bd into dotnet:master May 10, 2019
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the set_nuget_cache_for_repo branch May 10, 2019 21:07
@RussKeldorph
Copy link

arm64 failure is dotnet/core-eng#6295

picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Properly set the nuget cache for the repo

* Change coreclr NuGet package cache from "./packages" to "./.packages"


Commit migrated from dotnet/coreclr@44d22bd
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants