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

delete nonexistent feeds #40067

Closed
wants to merge 2 commits into from
Closed

delete nonexistent feeds #40067

wants to merge 2 commits into from

Conversation

kasperk81
Copy link
Contributor

from ci:


C:\h\w\B4440955\w\A54F0946\e>dotnet nuget remove source dotnet6-internal-transport --configfile C:\h\w\B4440955\t\dotnetSdkTests\udyk1dp3.krc\nuget.config 
error: Unable to find any package source(s) matching name: dotnet6-internal-transport.


Usage: dotnet nuget remove source [arguments] [options]

Arguments:
  name  Name of the source.

Options:
  --configfile  The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior.
  -h|--help     Show help information

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Apr 9, 2024
@kasperk81
Copy link
Contributor Author

from ci:


C:\h\w\B4440955\w\A54F0946\e>dotnet nuget remove source dotnet6-internal-transport --configfile C:\h\w\B4440955\t\dotnetSdkTests\udyk1dp3.krc\nuget.config 
error: Unable to find any package source(s) matching name: dotnet6-internal-transport.


Usage: dotnet nuget remove source [arguments] [options]

Arguments:
  name  Name of the source.

Options:
  --configfile  The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior.
  -h|--help     Show help information

ux nit: this kind of error should not print usage. if the error relates to "unknown option" only then it makes sense to print usage (or simply use --help to find more info)

@baronfel
Copy link
Member

baronfel commented Apr 9, 2024

from ci:


C:\h\w\B4440955\w\A54F0946\e>dotnet nuget remove source dotnet6-internal-transport --configfile C:\h\w\B4440955\t\dotnetSdkTests\udyk1dp3.krc\nuget.config 
error: Unable to find any package source(s) matching name: dotnet6-internal-transport.


Usage: dotnet nuget remove source [arguments] [options]

Arguments:
  name  Name of the source.

Options:
  --configfile  The NuGet configuration file. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior.
  -h|--help     Show help information

ux nit: this kind of error should not print usage. if the error relates to "unknown option" only then it makes sense to print usage (or simply use --help to find more info)

Totally agree with this nit - unfortunately we'll need to do a little digging to see if nuget itself is printing the usage or if that's being added by the SDK CLI in our generic error handler middleware.

Would you mind writing up an issue for this?

@kasperk81
Copy link
Contributor Author

Would you mind writing up an issue for this?

#40069

@marcpopMSFT
Copy link
Member

I believe that our internal codeflow PRs automatically add these two "nonexistent" feeds. They just aren't available publicly. Not sure if there's a way for us to condition the removal to only internal builds.

CC @mmitche ?

@mmitche
Copy link
Member

mmitche commented Apr 16, 2024

@marcpopMSFT these are automatically added on internal builds (via SetupNuGetSources.ps1), not by codeflow PRs. I would recommend passing an additional switch if running on the internal project, e.g. /p:RemoveInternalSources=true.

@marcpopMSFT
Copy link
Member

Not sure we have the ability to read a passed in switch in these particular helix launch files. They are run on the helix machines so it would need to be an environment variable we could detect for internal versus public.

@mmitche
Copy link
Member

mmitche commented Apr 18, 2024

Not sure we have the ability to read a passed in switch in these particular helix launch files. They are run on the helix machines so it would need to be an environment variable we could detect for internal versus public.

It does look like those scripts do get passed some parameter:

src/Tests/UnitTests.proj:      <HelixPreCommands Condition="!$(IsPosixShell)">call %HELIX_CORRELATION_PAYLOAD%\t\RunTestsOnHelix.cmd $(TestFullMSBuild);$(HelixPreCommands)</HelixPreCommands>

So you can probably add another based on whether to clean out feeds. Alternatively, maybe you could pipe the command output to null?

@marcpopMSFT
Copy link
Member

@kasperk81 thoughts on the options Matt suggested since this is your PR? Those feeds do exist in our internal builds and part of the goal of removing them was to reduce friction we've seen with Azdo in the past where we query too frequently and get throttled (2k packages downloaded during our tests times 20 feeds is a lot of Azdo queries per leg).

piping the output of those lines to null would probably be the simpler change that trying to include another input argument.

@kasperk81
Copy link
Contributor Author

i don't really understand why piping to null instead of deleting the lines in SetupNugetSources is preferred. i'll close this pr and let Matt or someone else take a look.

@kasperk81 kasperk81 closed this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants