Closed paustint closed 2 years ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
I've let the packaging team know about this.
They use support cases to prioritize work and it'll help for you to open one for them.
OK, here's one thing to try--use what's currently in latest-rc (7.137.1
) to try it. I think that's where the change happened.
This functionality is available only for Dev Hubs on Spring '22 release and later. The Spring '22 release cycle is in progress and it will be GA by Feb 14. You'll need to be on the CLI version mentioned by Shane, as well.
Thanks, will wait for my devhub to get upgraded and will try again after that.
And I am assuming the docs have a syntax error because "ancestorVersion": HIGHEST
would throw invalid JSON, so will make sure that JSON is indeed valid with "ancestorVersion": "HIGHEST"
@t7job - I just made Penelope aware of the doc bug.
Thank you for this feedback, I updated the doc today. The doc change will be live next week.
I am able to publish new package versions, but for some reason cannot create scratch orgs when I use the HIGHEST keyword.
sfdx force:org:create -f /...../scratch-def.json -a SCRATCH-DEV -d 30 -s
ERROR running force:org:create: The ancestor versionNumber must be in the format major.minor.patch but the value found is HIGHEST
Is there a schema validation that was not updated for force:org:create
? I don't see any other reason why ancestorVersion would be checked unless the entire JSON goes through generic schema validation.
i temporarily removed "ancestorVersion": "HIGHEST",
in my sfdx-project.json
and was unblocked, but still think there is an issue somewhere.
I tried before and after updating to ## 7.140.0 (March 3, 2022) [stable]
and still hit the issue.
@paustint - Thank you for reporting the issue you're experiencing. I've shared your observations with the Packaging team and an investigation has been opened to determine the cause.
FYI: @mshanemc - This is related to W-10809996
Just adding to what @paustint described. If I remove the quotation marks around HIGHEST in the project file and then try to create a scratch org it works. I am using this as the workaround for now.
Wow, that seems really odd, since removing the quotation marks means that the project file is no longer valid JSON, and that should cause a parsing error when anything attempts to read the file. Seems like the create org code probably ignores this exception and continues on with the process.
@VivekMChawla Is there a way to see the status of the work item? Is there a timeline for a fix? Thanks
@mshanemc are you able to share timeline/details about a possible fix, per @ternst-micado's question? Thanks!
Hello, Any news on the fix?
I just checked the work item and the fix is being tested. There's a chance it could make the release candidate tomorrow but if not, certainly next week's RC. I'll post back here when I know. Sorry for the delay.
Thanks for you fast answer, no problem! The latest updates of the CLI has broken the trick to put "ancestorVersion": HIGHEST. We did implement a replace of "ancestorVersion": "HIGHEST" by nothing if it can help other ones.
The fix was merged a few hours ago and will be in tomorrow's release candidate. If you want early access you can install the latest version of the salesforce-alm
plugin (sfdx plugins:install salesforce-alm
) and try it out. Just remember to uninstall that plugin to go back to the core version bundled with your version of the CLI.
Was there a regression on this? I am just trying to create an org, so not clear why it is checking package versions.
Just upgraded sfdx a day or two ago and now seeing
ERROR running force:org:create: The ancestorId for ancestorVersion HIGHEST can't be found. Package ID XXXX
The ancestor package version [HIGHEST] specified in the sfdx-project.json file may exist hasn’t been promoted and released. Release the ancestor package version before specifying it as the ancestor in a new package or patch version.
@paustint the team that owns this works from Salesforce support tickets. Are you able to raise your question via Salesforce support?
I really prefer not to go through all that song and dance to report this bug since I am not actually a Salesforce customer. I'll just deal with it until they eventually hear about it.
Still happening on sfdx-cli/7.175.0 win32-x64 node-v18.12.0
, with or without double-quotation marks I get this error.
ERROR running force:package:version:create: The ancestor versionNumber must be in the format major.mi
nor.patch but the value found is [HIGHEST].
I've updated sfdx/CLI as of 12/22/2022 and I've still not been able to reference "HIGHEST" as the ancestor version for new package version creation. Same error as others mentioned
ERROR running force:package:version:create: The ancestor versionNumber must be in the format major.mi nor.patch but the value found is [HIGHEST].
As of today (FINALLY), I can confirm that I am able to use ancestor version HIGHEST.
Today I ran the following commands from terminal:
My current SFDX version is now at: sfdx-cli/7.192.2 win32-x64 node-v18.14.1
Hopefully this is good news for other folks experiencing this issue still.
Summary
The documentation here https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_config_ancestors.htm suggestions that we can use the
HIGHEST
keyword, which does not work.HIGHEST
ERROR running force:package:version:create: The ancestor versionNumber must be in the format major.minor.patch but the value found is [HIGHEST]
Steps To Reproduce:
ancestorVersion = "HIGHEST"
insfdx-project.json
sfdx force:package:version:create
with proper flagsExpected result
Documentation should be accurate and cli should work as documented
Actual result
ERROR running force:package:version:create: The ancestor versionNumber must be in the format major.minor.patch but the value found is [HIGHEST]
System Information