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

NuGet tasks: Warn if there are problems getting location, instead of failing #2137

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"loc.messages.NotARegularFile": "%s i not a solution file. Check the 'path to solution or packages.config' property of the NuGetInstaller task.",
"loc.messages.UnknownRestoreMode": "Unknown restore mode '%s'",
"loc.messages.CouldNotFindNuGetService": "Could not find the NuGet service. This task will be unable to authenticate to feeds hosted in your Team Services account/TFS project collection.",
"loc.messages.ErrorPreventsAuth": "An error occurred while locating the Team Services/TFS NuGet service. Will not be able to authenticate to Team Services/TFS-hosted feeds.",
"loc.messages.NGCommon_IgnoringNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable). Extensions are ignored when using the built-in NuGet client",
"loc.messages.NGCommon_DetectedNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable): %s",
"loc.messages.NGCommon_UnableToFindTool": "Unable to find tool %s",
Expand Down
5 changes: 4 additions & 1 deletion Tasks/NuGetInstaller/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ locationHelpers.getNuGetConnectionData(serviceUri, accessToken)
return <string[]>[];
}

throw err;
// for now, make this a warning, since we're getting customers broken trying to call location service
tl.warning(tl.loc("ErrorPreventsAuth"));
tl.warning(err);
return [];
})
.then(urlPrefixes => {
tl.debug("discovered URL prefixes: " + urlPrefixes.join(';'))
Expand Down
3 changes: 2 additions & 1 deletion Tasks/NuGetInstaller/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "1.83.0",
"groups": [
Expand Down Expand Up @@ -117,6 +117,7 @@
"NotARegularFile": "%s i not a solution file. Check the 'path to solution or packages.config' property of the NuGetInstaller task.",
"UnknownRestoreMode": "Unknown restore mode '%s'",
"CouldNotFindNuGetService": "Could not find the NuGet service. This task will be unable to authenticate to feeds hosted in your Team Services account/TFS project collection.",
"ErrorPreventsAuth": "An error occurred while locating the Team Services/TFS NuGet service. Will not be able to authenticate to Team Services/TFS-hosted feeds.",

"NGCommon_IgnoringNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable). Extensions are ignored when using the built-in NuGet client",
"NGCommon_DetectedNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable): %s",
Expand Down
3 changes: 2 additions & 1 deletion Tasks/NuGetInstaller/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"minimumAgentVersion": "1.83.0",
"groups": [
Expand Down Expand Up @@ -117,6 +117,7 @@
"NotARegularFile": "ms-resource:loc.messages.NotARegularFile",
"UnknownRestoreMode": "ms-resource:loc.messages.UnknownRestoreMode",
"CouldNotFindNuGetService": "ms-resource:loc.messages.CouldNotFindNuGetService",
"ErrorPreventsAuth": "ms-resource:loc.messages.ErrorPreventsAuth",
"NGCommon_IgnoringNuGetExtensionsPath": "ms-resource:loc.messages.NGCommon_IgnoringNuGetExtensionsPath",
"NGCommon_DetectedNuGetExtensionsPath": "ms-resource:loc.messages.NGCommon_DetectedNuGetExtensionsPath",
"NGCommon_UnableToFindTool": "ms-resource:loc.messages.NGCommon_UnableToFindTool",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"loc.messages.NotARegularFile": "%s is not a solution file. Check the 'path to solution or packages.config' property of the NuGetInstaller task.",
"loc.messages.UnknownFeedType": "Unknown feed type '%s'",
"loc.messages.CouldNotFindNuGetService": "Could not find the NuGet service. This task will be unable to authenticate to feeds hosted in your Team Services account/TFS project collection.",
"loc.messages.ErrorPreventsAuth": "An error occurred while locating the Team Services/TFS NuGet service. Will not be able to authenticate to Team Services/TFS-hosted feeds.",
"loc.messages.NGCommon_IgnoringNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable). Extensions are ignored when using the built-in NuGet client",
"loc.messages.NGCommon_DetectedNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable): %s",
"loc.messages.NGCommon_UnableToFindTool": "Unable to find tool %s",
Expand Down
5 changes: 4 additions & 1 deletion Tasks/NugetPublisher/nugetpublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ locationHelpers.getNuGetConnectionData(serviceUri, accessToken)
return <string[]>[];
}

throw err;
// for now, make this a warning, since we're getting customers broken trying to call location service
tl.warning(tl.loc("ErrorPreventsAuth"));
tl.warning(err);
return [];
})
.then(urlPrefixes => {
tl.debug("discovered URL prefixes: " + urlPrefixes.join(';'))
Expand Down
3 changes: 2 additions & 1 deletion Tasks/NugetPublisher/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"demands": [
"Cmd"
Expand Down Expand Up @@ -122,6 +122,7 @@
"NotARegularFile": "%s is not a solution file. Check the 'path to solution or packages.config' property of the NuGetInstaller task.",
"UnknownFeedType": "Unknown feed type '%s'",
"CouldNotFindNuGetService": "Could not find the NuGet service. This task will be unable to authenticate to feeds hosted in your Team Services account/TFS project collection.",
"ErrorPreventsAuth": "An error occurred while locating the Team Services/TFS NuGet service. Will not be able to authenticate to Team Services/TFS-hosted feeds.",

"NGCommon_IgnoringNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable). Extensions are ignored when using the built-in NuGet client",
"NGCommon_DetectedNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable): %s",
Expand Down
3 changes: 2 additions & 1 deletion Tasks/NugetPublisher/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"demands": [
"Cmd"
Expand Down Expand Up @@ -121,6 +121,7 @@
"NotARegularFile": "ms-resource:loc.messages.NotARegularFile",
"UnknownFeedType": "ms-resource:loc.messages.UnknownFeedType",
"CouldNotFindNuGetService": "ms-resource:loc.messages.CouldNotFindNuGetService",
"ErrorPreventsAuth": "ms-resource:loc.messages.ErrorPreventsAuth",
"NGCommon_IgnoringNuGetExtensionsPath": "ms-resource:loc.messages.NGCommon_IgnoringNuGetExtensionsPath",
"NGCommon_DetectedNuGetExtensionsPath": "ms-resource:loc.messages.NGCommon_DetectedNuGetExtensionsPath",
"NGCommon_UnableToFindTool": "ms-resource:loc.messages.NGCommon_UnableToFindTool",
Expand Down