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

Update-VSTeamNuGetPackageVersion is missing project path #421

Closed
asbiin opened this issue Oct 4, 2021 · 4 comments · Fixed by #422
Closed

Update-VSTeamNuGetPackageVersion is missing project path #421

asbiin opened this issue Oct 4, 2021 · 4 comments · Fixed by #422
Assignees
Labels
bug when a bug has been identified or filed enhancement Improvements that do not include new features

Comments

@asbiin
Copy link

asbiin commented Oct 4, 2021

The Update-VSTeamNuGetPackageVersion cmdlet does not include the project in the api call.
See microsoft documentation: the template is

PATCH https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/nuget/packages/{packageName}/versions/{packageVersion}?api-version=6.1-preview.1

The {project} should be part of the API call, or we can see it is not included in

_callAPI -Method PATCH -SubDomain pkgs `

@SebastianSchuetze SebastianSchuetze self-assigned this Oct 10, 2021
@SebastianSchuetze
Copy link
Collaborator

Question. Do you get an exception or not? Does this work for you?

I am asking because I tried e.g. Get-VSTeamFeed and the docs say also you need a project in the URL, but it works without:

 Get-VSTeamFeed -Verbose
VERBOSE: Team Module/7.4.0 (Windows) PowerShell/7.1.4
VERBOSE: GET https://feeds.dev.azure.com/razorspoint-test/_apis/packaging/feeds?api-version=6.0-preview with 0-byte payload
VERBOSE: received 2030-byte response of content type application/json
VERBOSE: Content encoding: utf-8
VERBOSE: return type: PSCustomObject
VERBOSE: @{count=1; value=System.Object[]}
VERBOSE: @{description=; url=https://feeds.dev.azure.com/razorspoint-test/0c9b07d1-ddcf-4dbf-a1cb-798376138c31/_apis/Packaging/Feeds/ba8eca10-9bdc-4daf-ace8-bb2193f497d0; _links=; hideDeletedPackageVersions=True; defaultViewId=24402b8c-2567-45db-b940-26966add258d; id=ba8eca10-9bdc-4daf-ace8-bb2193f497d0; name=Test; upstreamEnabled=True; viewId=; viewName=; fullyQualifiedName=Test; fullyQualifiedId=ba8eca10-9bdc-4daf-ace8-bb2193f497d0; upstreamSources=System.Object[]; capabilities=defaultCapabilities; project=}

Name Description Id
---- ----------- --
Test             ba8eca10-9bdc-4daf-ace8-bb2193f497d0

@SebastianSchuetze
Copy link
Collaborator

@asbiin I tested it and the cmdlet is not wrong, but also not complete. The current cmdlet can only update packages if they are an org wide feed. If it's a project feed then you need the project. I will change the cmdlet to support both.

@SebastianSchuetze SebastianSchuetze added bug when a bug has been identified or filed enhancement Improvements that do not include new features labels Oct 10, 2021
@asbiin
Copy link
Author

asbiin commented Oct 10, 2021

@SebastianSchuetze YEs that's exactly he behavior. project feed have been introduced some months ago.
BTW I'm pretty sure Update-VSTeamNuGetPackageVersion is not the only cmdlet that has this problem, but I did not tested every cmdlet.

@SebastianSchuetze
Copy link
Collaborator

Merged the code to fix it. So, it is closed. But currently we cannot release because of a bug in the pipeline can't figure out currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug when a bug has been identified or filed enhancement Improvements that do not include new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants