Skip to content

Commit

Permalink
Added date to deprecation warnings for DownloadPackageV0, NuGetInstal…
Browse files Browse the repository at this point in the history
…lerV0, and NuGetRestoreV1 (#19078)

* Added date to deprecation warnings for DownloadPackageV0, NuGetInstallerV0, and NuGetRestoreV1

* Modified L0 tests to accept new deprecation message

* Added removalDate and updated patches

* Reverted changes to DownloadPackageV0's package-lock.json file

* Clearer deprecation message

---------

Co-authored-by: Abby Powell (from Dev Box) <[email protected]>
  • Loading branch information
amp-powell and Abby Powell (from Dev Box) committed Oct 10, 2023
1 parent 3c052b8 commit 4a4464b
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Tasks/DownloadPackageV0/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { WebApi } from 'azure-devops-node-api';
tl.setResourcePath(path.join(__dirname, 'task.json'));

async function main(): Promise<void> {
tl.warning("This task will be deprecated soon. Please switch to using DownloadPackage@1");
tl.warning("This task is deprecated. Builds that use it will break on 11-27-2023. Please switch to using DownloadPackage@1 as soon as possible.");
var feed = getProjectAndFeedIdFromInputParam("feed");
if(feed.projectId) {
throw new Error(tl.loc("UnsupportedProjectScopedFeeds"));
Expand Down
4 changes: 2 additions & 2 deletions Tasks/DownloadPackageV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 1
"Patch": 2
},
"demands": [],
"minimumAgentVersion": "2.144.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"inputs": [
{
"name": "feed",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/DownloadPackageV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 1
"Patch": 2
},
"demands": [],
"minimumAgentVersion": "2.144.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"inputs": [
{
"name": "feed",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetInstallerV0/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('NuGetInstaller Suite', function () {
assert(tr.stdout.indexOf('credProviderPath = ') >= 0, "should have found credential provider path");
assert(tr.succeeded, 'should have succeeded');
assert(tr.invokedToolCount == 1, 'should have run NuGet');
assert.equal(tr.warningIssues[0], 'This task will be deprecated soon', "should have deprecation warning");
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");
assert.equal(tr.errorIssues.length, 0, "should have no errors");
done();
}).timeout(20000);
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetInstallerV0/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RestoreOptions implements INuGetCommandOptions {
}

async function main(): Promise<void> {
tl.warning("This task will be deprecated soon");
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.");
let packagingLocation: pkgLocationUtils.PackagingLocation;
try {
packagingLocation = await pkgLocationUtils.getPackagingUris(pkgLocationUtils.ProtocolType.NuGet);
Expand Down
4 changes: 2 additions & 2 deletions Tasks/NuGetInstallerV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"minimumAgentVersion": "2.115.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"groups": [
{
"name": "advanced",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/NuGetInstallerV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 0
"Patch": 1
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"minimumAgentVersion": "2.115.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"groups": [
{
"name": "advanced",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NuGetRestoreV1/nugetinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RestoreOptions implements INuGetCommandOptions {
}

async function main(): Promise<void> {
tl.warning("This task will be deprecated soon. Please switch to using NuGetCommand@2's 'restore' option");
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.");
let packagingLocation: pkgLocationUtils.PackagingLocation;
try {
tl.debug("getting the uris");
Expand Down
4 changes: 2 additions & 2 deletions Tasks/NuGetRestoreV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"version": {
"Major": 1,
"Minor": 229,
"Patch": 3
"Patch": 4
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"minimumAgentVersion": "2.144.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"groups": [
{
"name": "advanced",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/NuGetRestoreV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"version": {
"Major": 1,
"Minor": 229,
"Patch": 3
"Patch": 4
},
"runsOn": [
"Agent",
"DeploymentGroup"
],
"minimumAgentVersion": "2.144.0",
"deprecated": true,
"removalDate": "2024-04-22",
"removalDate": "2023-11-27",
"groups": [
{
"name": "advanced",
Expand Down

0 comments on commit 4a4464b

Please sign in to comment.