You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Breaking deprecated tasks after they complete
* Bumped versions
* Added str to DownloadPackageV0's english reources.resjson
* Added str to english reources.resjson
* Removed non pre-existing DownloadPackageV0 L0 tests
* Checking 2nd error NuGetInstallerV0 throws
* L0 tests check for 2 errors: 1 for deprecation + 1 for failure
* Updated expected error message
* Made error messages clearer
* Updated removal date
* Make strings match
* Added feature flag to breaking tasks
* Changed logic to fail when ff is on
* Added env var to tests
* Made sure FF check only passes when true
* Updated generated files
---------
Co-authored-by: Abby Powell (from Dev Box) <[email protected]>
Copy file name to clipboardExpand all lines: Tasks/DownloadPackageV0/Strings/resources.resjson/en-US/resources.resjson
+2-1
Original file line number
Diff line number
Diff line change
@@ -22,5 +22,6 @@
22
22
"loc.messages.RetryingOperation": "Error: in %s, so retrying => retries pending: %s",
23
23
"loc.messages.OperationFailed": "Failed in %s with error: %s",
24
24
"loc.messages.Info_ResolvedToolFromCache": "Resolved from tool cache: %s",
25
-
"loc.messages.UnsupportedProjectScopedFeeds": "Project-scoped feeds are not supported by this version of the \"Download Package\" task. Please use version 1 or higher."
25
+
"loc.messages.UnsupportedProjectScopedFeeds": "Project-scoped feeds are not supported by this version of the \"Download Package\" task. Please use version 1 or higher.",
26
+
"loc.messages.DeprecatedTask": "This task is deprecated. Please switch to using DownloadPackage@1 https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1"
Copy file name to clipboardExpand all lines: Tasks/DownloadPackageV0/task.json
+4-3
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@
9
9
"author": "ms-vscs-rm",
10
10
"version": {
11
11
"Major": 0,
12
-
"Minor": 231,
12
+
"Minor": 232,
13
13
"Patch": 0
14
14
},
15
15
"demands": [],
16
16
"minimumAgentVersion": "2.144.0",
17
17
"deprecated": true,
18
-
"removalDate": "2023-11-27",
18
+
"removalDate": "2023-12-11",
19
19
"inputs": [
20
20
{
21
21
"name": "feed",
@@ -112,6 +112,7 @@
112
112
"RetryingOperation": "Error: in %s, so retrying => retries pending: %s",
113
113
"OperationFailed": "Failed in %s with error: %s",
114
114
"Info_ResolvedToolFromCache": "Resolved from tool cache: %s",
115
-
"UnsupportedProjectScopedFeeds": "Project-scoped feeds are not supported by this version of the \"Download Package\" task. Please use version 1 or higher."
115
+
"UnsupportedProjectScopedFeeds": "Project-scoped feeds are not supported by this version of the \"Download Package\" task. Please use version 1 or higher.",
116
+
"DeprecatedTask": "This task is deprecated. Please switch to using DownloadPackage@1 https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/download-package-v1"
Copy file name to clipboardExpand all lines: Tasks/NuGetInstallerV0/Strings/resources.resjson/en-US/resources.resjson
+2-1
Original file line number
Diff line number
Diff line change
@@ -42,5 +42,6 @@
42
42
"loc.messages.NGCommon_RemovingSources": "Preparing to set credentials in NuGet.config",
43
43
"loc.messages.NGCommon_AddingSources": "Setting credentials in NuGet.config",
44
44
"loc.messages.NGCommon_NoSourcesFoundInConfig": "No package sources were found in the NuGet.config file at %s",
45
-
"loc.messages.NGCommon_UnabletoDetectNuGetVersion": "Unknown NuGet version selected."
45
+
"loc.messages.NGCommon_UnabletoDetectNuGetVersion": "Unknown NuGet version selected.",
46
+
"loc.messages.DeprecatedTask": "This task is deprecated. Please switch to using NuGetCommand@2's 'restore' or 'custom' option https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/nuget-command-v2"
Copy file name to clipboardExpand all lines: Tasks/NuGetInstallerV0/Tests/L0.ts
+27-19
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,10 @@ describe('NuGetInstaller Suite', function () {
16
16
assert(tr.ran('c:\\from\\tool\\installer\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\single.sln'),'it should have run NuGet');
17
17
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
18
18
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
19
-
assert(tr.succeeded,'should have succeeded');
20
19
assert(tr.invokedToolCount==1,'should have run NuGet');
21
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
20
+
assert(tr.failed,'should have failed');
21
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
22
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
22
23
done();
23
24
}).timeout(20000);
24
25
@@ -31,10 +32,10 @@ describe('NuGetInstaller Suite', function () {
31
32
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
32
33
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
33
34
assert(tr.stdout.indexOf('credProviderPath = ')>=0,"should have found credential provider path");
34
-
assert(tr.succeeded,'should have succeeded');
35
35
assert(tr.invokedToolCount==1,'should have run NuGet');
36
-
assert.equal(tr.warningIssues[0],"This task is deprecated. Builds that use it will break on 11-27-2023. Please switch to using NuGetCommand@2's 'restore' option as soon as possible.","should have deprecation warning");
37
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
36
+
assert(tr.failed,'should have failed');
37
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
38
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
38
39
done();
39
40
}).timeout(20000);
40
41
@@ -46,9 +47,10 @@ describe('NuGetInstaller Suite', function () {
46
47
assert(tr.ran('c:\\from\\tool\\installer\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\packages.config'),'it should have run NuGet');
47
48
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
48
49
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
49
-
assert(tr.succeeded,'should have succeeded');
50
50
assert(tr.invokedToolCount==1,'should have run NuGet');
51
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
51
+
assert(tr.failed,'should have failed');
52
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
53
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
52
54
done();
53
55
}).timeout(20000);
54
56
@@ -60,9 +62,10 @@ describe('NuGetInstaller Suite', function () {
60
62
assert(tr.ran('c:\\from\\tool\\installer\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\single.sln -NoCache'),'it should have run NuGet');
61
63
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
62
64
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
63
-
assert(tr.succeeded,'should have succeeded');
64
65
assert(tr.invokedToolCount==1,'should have run NuGet');
65
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
66
+
assert(tr.failed,'should have failed');
67
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
68
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
66
69
done();
67
70
}).timeout(20000);
68
71
@@ -74,9 +77,10 @@ describe('NuGetInstaller Suite', function () {
74
77
assert(tr.ran('c:\\from\\tool\\installer\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\single.sln -Foo'),'it should have run NuGet');
75
78
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
76
79
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
77
-
assert(tr.succeeded,'should have succeeded');
78
80
assert(tr.invokedToolCount==1,'should have run NuGet');
79
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
81
+
assert(tr.failed,'should have failed');
82
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
83
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
80
84
done();
81
85
}).timeout(20000);
82
86
@@ -91,9 +95,10 @@ describe('NuGetInstaller Suite', function () {
91
95
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
92
96
assert(tr.stdOutContained("adding package source uri: mockFeedUri"),"should have added content to temp config");
93
97
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
94
-
assert(tr.succeeded,'should have succeeded');
95
98
assert(tr.invokedToolCount==1,'should have run NuGet');
96
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
99
+
assert(tr.failed,'should have failed');
100
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
101
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
97
102
done();
98
103
}).timeout(20000);
99
104
@@ -105,9 +110,10 @@ describe('NuGetInstaller Suite', function () {
105
110
assert(tr.ran('c:\\custompath\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\single.sln'),'it should have run NuGet');
106
111
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
107
112
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
108
-
assert(tr.succeeded,'should have succeeded');
109
113
assert(tr.invokedToolCount==1,'should have run NuGet');
110
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
114
+
assert(tr.failed,'should have failed');
115
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
116
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
111
117
done();
112
118
}).timeout(20000);
113
119
@@ -120,9 +126,10 @@ describe('NuGetInstaller Suite', function () {
120
126
assert(tr.ran('c:\\from\\tool\\installer\\nuget.exe restore -NonInteractive c:\\agent\\home\\directory\\double\\double.sln'),'it should have run NuGet on double.sln');
121
127
assert(tr.stdOutContained('setting console code page'),'it should have run chcp');
122
128
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
123
-
assert(tr.succeeded,'should have succeeded');
124
129
assert(tr.invokedToolCount==2,'should have run NuGet twice');
125
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
130
+
assert(tr.failed,'should have failed');
131
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
132
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
126
133
done();
127
134
}).timeout(20000);
128
135
@@ -133,9 +140,10 @@ describe('NuGetInstaller Suite', function () {
133
140
tr.run()
134
141
assert(tr.ran('/usr/bin/mono ~/myagent/_work/_tasks/NuGet/nuget.exe restore -NonInteractive ~/myagent/_work/1/s/single.sln'),'it should have run NuGet with mono');
135
142
assert(tr.stdOutContained('NuGet output here'),"should have nuget output");
136
-
assert(tr.succeeded,'should have succeeded');
137
143
assert(tr.invokedToolCount==1,'should have run NuGet');
138
-
assert.equal(tr.errorIssues.length,0,"should have no errors");
144
+
assert(tr.failed,'should have failed');
145
+
assert.equal(tr.errorIssues.length,2,"should have 2 errors");
146
+
assert.equal(tr.errorIssues[0],"Error: loc_mock_DeprecatedTask","Error should be about deprecation");
Copy file name to clipboardExpand all lines: Tasks/NuGetInstallerV0/nugetinstaller.ts
+8-1
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ class RestoreOptions implements INuGetCommandOptions {
24
24
}
25
25
26
26
asyncfunctionmain(): Promise<void>{
27
-
tl.warning("This task is deprecated. Builds that use it will break on 11-27-2023. Please switch to using NuGetCommand@2's 'restore' option as soon as possible.");
Copy file name to clipboardExpand all lines: Tasks/NuGetInstallerV0/task.json
+4-3
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
"author": "Microsoft Corporation",
10
10
"version": {
11
11
"Major": 0,
12
-
"Minor": 231,
12
+
"Minor": 232,
13
13
"Patch": 0
14
14
},
15
15
"runsOn": [
@@ -18,7 +18,7 @@
18
18
],
19
19
"minimumAgentVersion": "2.115.0",
20
20
"deprecated": true,
21
-
"removalDate": "2023-11-27",
21
+
"removalDate": "2023-12-11",
22
22
"groups": [
23
23
{
24
24
"name": "advanced",
@@ -145,6 +145,7 @@
145
145
"NGCommon_RemovingSources": "Preparing to set credentials in NuGet.config",
146
146
"NGCommon_AddingSources": "Setting credentials in NuGet.config",
147
147
"NGCommon_NoSourcesFoundInConfig": "No package sources were found in the NuGet.config file at %s",
148
-
"NGCommon_UnabletoDetectNuGetVersion": "Unknown NuGet version selected."
148
+
"NGCommon_UnabletoDetectNuGetVersion": "Unknown NuGet version selected.",
149
+
"DeprecatedTask": "This task is deprecated. Please switch to using NuGetCommand@2's 'restore' or 'custom' option https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/nuget-command-v2"
Copy file name to clipboardExpand all lines: Tasks/NuGetRestoreV1/Strings/resources.resjson/en-US/resources.resjson
+2-1
Original file line number
Diff line number
Diff line change
@@ -55,5 +55,6 @@
55
55
"loc.messages.Warning_UpdatingNuGetVersion": "Updating version of NuGet.exe to %s from %s. Behavior changes or breaking changes might occur as NuGet updates to a new version. If this is not desired, uncheck the 'Check for Latest Version' option in the task.",
56
56
"loc.messages.UnsupportedProjectScopedFeeds": "Project-scoped feeds are not supported by this version of the \"NuGet Restore\" task. Please use the \"NuGet\" task version 2 or higher.",
57
57
"loc.messages.Warning_IncludeNuGetOrgEnabled": "IncludeNugetOrg is currently enabled for this task. To resolve this warning, edit your build task and set 'includeNuGetOrg' to 'false' or deselect 'Use packages from NuGet.org'.",
58
-
"loc.messages.Error_IncludeNuGetOrgEnabled": "Packages failed to restore. Edit your build task and set 'includeNuGetOrg' to 'false' or deselect 'Use packages from NuGet.org'."
58
+
"loc.messages.Error_IncludeNuGetOrgEnabled": "Packages failed to restore. Edit your build task and set 'includeNuGetOrg' to 'false' or deselect 'Use packages from NuGet.org'.",
59
+
"loc.messages.DeprecatedTask": "This task is deprecated. Please switch to using NuGetCommand@2's 'restore' option https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/nuget-command-v2"
0 commit comments