-
Notifications
You must be signed in to change notification settings - Fork 19
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
Promote Package does not fail when it should #53
Comments
I agree, I felt that pain many times. I will take a look @alesremta-ext43767 what we can do |
Hi @azlam-abdulsalam I think it should be fine so long as there is a distinction between a) promoting already promoted version again (SF CLI will just give a "success" response) and b) promoting a different build of an already promoted major.minor.path combo (SF CLI will throw an error) If we create a new release, don't bump a version number, but do another build. Then that package CANNOT be moved to PROD |
hi @azlam-abdulsalam I'm also involved to this topic. just i vote for the ver b) promoting a different build of an already promoted major.minor.path combo (SF CLI will throw an error)
|
I agree with @azlam-abdulsalam there are some edge cases that it could be tricky. |
The need is mainly driven by the 'promoteBeforeDeployment' attribute in release defn, where most orgs just promote it before deploying to prod. I think @dieffrei's solution could be perfect, we could add an additional attribute or flag @alesremta-ext43767 is this the promote command or release command? |
We are using the "promote command". But to be honest, for me this is much more low level. Whatever you do, promote or release, ultimately does this: |
@dieffrei @azlam-abdulsalam I would say it's a lot more important for the Promote command. For release, if this issue is in place, you're going to fail right after (attempting to install). But if your process is to prepare artefacts ahead of time to do a just in time release (perhaps in a short prod maintenance window) you want to be as close to 100% sure it'll install successfully as you can. So you would promote ahead of time and rely in the fact that this package is promoted successfully. |
@alesremta-ext43767 In terms of effort, the release command uses the promote command. |
Describe the bug
Promoting a package which is being built on a MAJOR.MINOR.PATCH combination which has previously been promoted DOES NOT FAIL, instead it prints: "VERSION_ID is already promoted". This is not true, the version number being built is NOT promoted, it is a previous build of the same package.
This hides the fact that a version bump was not performed and only manifests itself when attempting to release to PROD.
packages/core/src/package/promote/PromoteUnlockedPackageImpl.ts
To Reproduce
Expected behavior
Error that package cannot be promoted, becuase another build of the same MAJOR.MINOR.PATCH has already been promoted
CLI Error: "You already promoted a package version with this major.minor.patch version number. For a given major.minor.patch number, you can promote only one version."
Actual behaviour
Package 04tXXXXXXXX is already promoted*** Ignoring
Platform Details (please complete the following information):
Tested with older version: sfp -- The DX@Scale CLI -Version:25.5.3 -Release:December 23
But checked code in new SFP repository and it is still the same.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: