Skip to content

Fix package installer tests #26843

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 2 commits into from
Jul 29, 2022
Merged

Conversation

marcpopMSFT
Copy link
Member

Revert my prior change that removed the package installer tests from configuring the nuget cache.
The actual issue is that helix machines are reused without a full reimage. This means that the caches from prior runs are still configured in nuget but the folders may not exist anymore (causing these tests to fail).

This is an alternative solution of adding a nuget.config file to the folder that dotnet is being run from. Alternatively, we may need it at the root of the test folder itself but from viewing output, there is already one there that runs a clear and likely isn't being picked up.

@marcpopMSFT
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcpopMSFT marcpopMSFT requested a review from joeloff July 28, 2022 16:34
@joeloff
Copy link
Member

joeloff commented Jul 28, 2022

This still just keeps adding sources, correct? So eventually an agent could run out of disk space if they are not removed?

@marcpopMSFT
Copy link
Member Author

FYI, I ran the tests locally and confirmed that a nuget.config file in the location of the dotnet test execution successfully works here (or at least a bad one causes the same failures and if there's a bad global config, it fixes the tests).

@marcpopMSFT
Copy link
Member Author

This still just keeps adding sources, correct? So eventually an agent could run out of disk space if they are not removed?

@joeloff , this adds the source to a local nuget.config file that exists for this particular test run and is not persisted between runs as far as I know. For example, I dug up the logs from one test in this run and you can see that the script is running in a random directory name.

The way I had it before was adding to the global nuget config which could eventually run out of space if the computer weren't reset (though I don't think helix machines would last that long).

C:\h\w\A4C7090B\w\AC500943\e>dotnet new nugetconfig 
The template "NuGet Config" was created successfully.

C:\h\w\A4C7090B\w\AC500943\e>dotnet nuget add source C:\h\w\A4C7090B\p\d\.nuget --configfile nuget.config 
Package source with Name: Package source 1 added successfully.

A different test for this same PR ran in a different directory. It looks like helix creates one random directory name per PR and then another random directory name for the test itself.
C:\h\w\A4C7090B\w\A11F0918\e

@marcpopMSFT marcpopMSFT merged commit eb42503 into main Jul 29, 2022
@marcpopMSFT marcpopMSFT deleted the marcpopMSFT-fixpackageinstallertests branch July 29, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants