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

[BUG]: UniversalPackages@0 fails with Invalid versionOption/versionPublishSelector provided when it is set #18975

Closed
1 of 4 tasks
katydecorah opened this issue Sep 14, 2023 · 13 comments

Comments

@katydecorah
Copy link

katydecorah commented Sep 14, 2023

Task name

UniversalPackages

Task version

0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows

Task log

Example task:


- task: UniversalPackages@0
  displayName: "Publish to Universal Packages"
  inputs:
    command: publish
    feedsToUsePublish: external
    publishFeedCredentials: "my-credentials"
    feedPublishExternal: "my-feed"
    packagePublishExternal: "my-package"
    versionPublishSelector: "patch"

Relevant log output

2023-09-14T19:10:06.3099015Z ##[section]Starting: Publish to Universal Packages
2023-09-14T19:10:06.3212968Z ==============================================================================
2023-09-14T19:10:06.3213125Z Task         : Universal packages
2023-09-14T19:10:06.3213215Z Description  : Download or publish Universal Packages
2023-09-14T19:10:06.3213321Z Version      : 0.228.0
2023-09-14T19:10:06.3213393Z Author       : Microsoft Corporation
2023-09-14T19:10:06.3213476Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks
2023-09-14T19:10:06.3213593Z ==============================================================================
2023-09-14T19:10:06.9505291Z Downloading: https://03nvsblobprodwcus014.vsblob.vsassets.io/artifacttool/artifacttool-win10-x64-Release_0.2.290.zip?sv=2019-07-07&sr=b&sig=DFRIJoBFEYlh5PlOJaRXcyWXsOkvuZzy%2FVIbArihS7s%3D&spr=https&se=2023-09-14T20%3A10%3A10Z&sp=r&P1=1694721910&P2=11&P3=2&P4=gnltZ2xTapmeSufDpOKqY0ExZ8fnF8OHWSy88%2fQ%2fCZ8%3d
2023-09-14T19:10:09.3689742Z Caching tool: ArtifactTool 0.2.290 x64
2023-09-14T19:10:09.9058829Z ##[error]Error: Invalid versionOption/versionPublishSelector provided. Must be set to 'major', 'minor', 'patch', or 'custom'
2023-09-14T19:10:09.9064751Z ##[error]Packages failed to publish
2023-09-14T19:10:09.9069949Z ##[section]Finishing: Publish to Universal Packages

Aditional info

I receive the same error when trying the other keywords (major, minor) and when omitting the property.

Perhaps, this line:

https://github.com/microsoft/azure-pipelines-tasks/blame/bb4efb4f3ab60545efddcc74f658628ca641cd16/Tasks/UniversalPackagesV0/universalpublish.ts#L91

Should be:

else if (["major", "minor", "patch"].includes(versionRadio)) {
@Coconutcoo
Copy link

Coconutcoo commented Sep 18, 2023

I've just started seeing this too, and I suspect you're correct - that line by @magleaso seems to be using in incorrectly - I believe versionRadio is a string of it's value (e.g. "custom") so you can't "in" it with an array, no?

I've also opened a discussion on the Developer Community to try and get some more eyes on this at MSFT - it's breaking all of our pipelines that publish to Artifact feeds at the moment. https://developercommunity.visualstudio.com/t/Pipelines-step-UniversalPackages0-fails/10468643

@sepira
Copy link

sepira commented Sep 18, 2023

We are also experiencing this issue as well. Any workaround as of the moment?

@AccenEC
Copy link

AccenEC commented Sep 18, 2023

Experiencing same issue as well.

@Ferranteg-dev
Copy link

Same Errore here
image
image

@Coconutcoo
Copy link

As a short-term fix, we ended up using the Azure REST API to fetch the current version of an artifact, then just increment that and pass it into the custom version field. Custom is the only one that isn't affected by this.

@sepira
Copy link

sepira commented Sep 18, 2023

Workaround for now is to get the artifact file and manually publish via azure-cli to the artifact feed.

@AndyCuda
Copy link

As a workaround I tried this and it worked:
-task UniversalPackages@0.227.0

@DenisRumyantsev
Copy link
Contributor

@katydecorah thanks for reporting this issue! Let us fix it.

@mvachemometec
Copy link

Seeing the same issue here.

@sri2850
Copy link

sri2850 commented Sep 19, 2023

Seeing the same issue from today morning

@magleaso
Copy link
Contributor

We have rolled back the bad task version in production (0.228.0) and we're in the progress of hotfixing. Apologies for the disruption, thanks for reporting the issue

@Coconutcoo
Copy link

With the new .229 release this appears fixed for Classic too where you can't pin a minor version. This can be closed now I believe.

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants