To add a Artifacts deleted nupkg - azure

I have permanently deleted a package from Artifacts.
Is there a way to restore it?
Now if I try to push I am getting this error:
Response status code does not indicate success: 409 (Conflict - The version 3.18.1 of Google.Protobuf has been deleted. It cannot be restored or pushed. (DevOps Activity ID: 014272E1-B940-428D-B3DF-4E67E5890D4B))

To add a Artifacts deleted nupkg
I am afraid there is no such way to restore it.
According to the document Understand immutability of packages:
Once you publish a particular version of a package to a feed, that version number is permanently reserved. You cannot upload a newer revision package with that same version number, or delete it and upload a new package at the same version.
That because many package clients, including NuGet, keep a local cache of packages on your machine. Once a client has cached a particular package#version, it will return that copy on future install/restore requests. If, on the server, you replace package#version (rev 1) with a new package#version (rev 2), the client is unable to tell the difference. This can lead to indeterminate build results from different machines.
So we could not overwrite all packages that have already been uploaded, even we could not delete them and re-uploaded. To resolve this issue, you could try to upload the packages with a new version or create a new feed to save the package.

Related

Data quota limit with data pack

I am a newbie to git, so I made a grave mistake. On getting a new laptop, I accidentally pushed a commit that removed most of the files except the ones I edited in our repo.
In Android Studio, I attempted to fix this by clicking on the git log, and trying to "reset the current branch to here".
This gave me an error of:
Error downloading object: java_pid2812.hprof (58df4cf):
Smudge error: Error downloading java_pid2812.hprof
(58df4cfb920117556d8a695631aef8a75834d2e71ec360a7fbbc5c79e4fe84e2):
batch response: This repository is over its data quota.
Account responsible for LFS bandwidth should purchase more
data packs to restore access.
I purchased a data pack on my account, and this did not resolve this issue. How can I restore the repo to before that commit was pushed?
Thanks.

Azure DevOps extension cache wrong node_modules

General: I develop an Azure DevOps extension with tasks and pipeline decorators. Testing on local Azure DevOps Server instance. Extension loaded through manage extensions from local hard drive. Let's say that I installed the extension first time with version 1.0.0 and a node_modules dependency "3rdPartyDep" with version 2.0.0, which has transitive dependencies with vulnerabilities.
Scenario:
Upgrade "3rdPartyDep" to version 3.0.0 with fixed vulnerabilities. Build new version of my extension, say 1.0.1. Create the .vsix, update the extension in the Azure DevOps Server.
Run a pipeline, which fails because I did not check the "3rdPartyDep" changes and there are breaking changes and the extension fails to run.
Rollback the "3rdPartyDep" library to 2.0.0 because I have no time now to check what is broken in there right now as I have other things to debug and implement, repackage the extension, increase version to 1.0.2, update extension in Azure DevOps Server.
Run the pipeline. It fails with the same exception, as if I didn't rollback. I look into the agent taks folder and I see that the node_modules with the "3rdPartyDep" library is pointing to 3.0.0, which is wrong because I rolled back the version.
I open the generated .vsix archive and check that the node_modules inside contains the correct 2.0.0 version, so no problems of packaging or building from my side.
I make a conclusion that Azure DevOps stores somewhere a cached version of the extension with the node_modules including the wrong version of the "3rdPartyDep". I search that cache folder over internet to find out where it is, and I also search with a search tool all my machine, including words in file. Nowhere to be found. There is no location on my machine with such node_modules containing the 3.0.0 version. It might be stored in some encrypted DB?
I uninstall completely the extension, and install it back. I see that Azure DevOps has a history for the extension, and the cache is not cleared. Any pipeline fails, even if my .vsix does not contain this dependency.
I'm stuck.
Questions:
Where extensions are actually cached inside Azure DevOps Server?
Why updating, uninstalling and installing does not fix the problem?
Is there any way to fix this? What can I do? I do not want to reinstall the server completely. Moreover, this raises concerns about how node_modules are managed and cached and what happens at the clients and the cloud.
You could try the following items:
Try to clean the browser cache, and check whether you have increase the version number in the task.json.
Try to perform Delete task -- Save definition -- add task again process.
Delete Azure DevOps Server cache, which can be followed in this link.
Uninstall the extension from CollectionSettings, remove the extension from local Manage Extensions. Then upload again the extension and install it in the collection.

Upstream packages in Artifacts Feed not uploading packages after first npm install

I'm trying to use an npm package I created in my Artifacts feed, I got my .npmrc file in place to go directly to azure feed, first time I run 'npm install' noticed that there are a lot of new npm packages coming because of the upstream configuration I have in 'Upstream sources' section in my feed, but after that if I want to add a new package reference in my project I got an error saying 'No matching version found for #' this is because package is not there in artifacts feed but in this case shouldn't it go to 'https://registry.npmjs.org/' to get the package reference and place it in upstream packages in Azure feed?
here is the code I have in my .npmrc file
registry=https://pkgs.dev.azure.com/<enterprise-name>/_packaging/<feed-name>/npm/registry/
always-auth=true
It seems that you don't have the required permission to UpStream source of that private feed. You can follow my steps to locate the issue and resolve it:
1.Go Feed Settings to make sure npmjs is set as Upstream source. And use the Move up button to move npmjs source to the top of the list (List of Upstream source).
2.Go Views tab in feed settings and check who can access the #Local view. Note:
#local contains all packages pushed to this feed and all packages saved from an upstream source
Try editing the #Local view and make people in current org can access it. Also you can choose Specific People, but you need to grant access to yourself.
3.Make sure the Account/PAT you use for authentication is the same account you use to configure in web Portal. (The local account used by the authentication must have the access to the #Local view in feed)
If that not helps, check whether the package version you're looking for exists in even UpStream source and share the details of error message here. More details please refer to this document carefully.

TFS checking in the code without getting the latest version

If I check-in file to TFS repository without getting the latest version (i.e, without merging the changes on my side first) then, is one of the version bound to loose? Let us assume v1 is the version on TFS that I forgot to get and merge before checking in, and assume v2 be the version that I checked in. Suppose v1 exists on another machine, can I go ahead re check-in v1 without getting the latest version on the second machine, and redo get-latest and merge on primary machine to have everything recover? What are my options to minimize the loss? What happens if I did not have the second machine with v1? Are there any mechanism in TFS that prevent me from checking in my version without getting the latest from the TFS first?
Assuming someone have checked in v1 to TFS on another machine during you work on your machine, then you may get conflicts warning. The conflicts maybe automatically resolved, maybe request you resolve manually.

TFS 2013 resolve conflicts error

I got quite few items are list on my Pending changes Resolve conflicts,
however, when I undo all my pending changes,
those conflicts are still there, and when I try to resolve them manully, it said my local version is 0, and my local change is indetical with the server change, when I try to take server version
it pop up the error string must have a least one character, Prameter name: item,
My TFS is TFS2013 RTM
vs version bothe VS2013 and VS2012
thanks any suggestion or advice,
kind regards
Undo all Pending Changes, make sure there are no pending changes under the Excluded Items section, then do a Get Latest. That should bring your workspace up to date, and there should be no conflicts.
I experienced something similar in VS2015. No changes in my workspace but there is a conflict that can't be cleared. As best I can tell there is an entry in an internal conflict table.
I used the tf command to clear conflicts. Don't do this to clear a real conflict.
command documentation:
https://msdn.microsoft.com/en-us/library/6yw3tcdy.aspx
Open Developer Command Prompt
Change directory to conflict location: cd <path/to/conflict>
To resolve one conflict, replace .\ConflictFile.txt with your file name:
tf resolve .\ConflictFile.txt \auto:DeleteConflict
or
To resolve all conflicts: tf resolve \auto:DeleteConflict

Resources