cli icon indicating copy to clipboard operation
cli copied to clipboard

force:org:create fails claiming ancestor is not released, when ancestor is released.

Open triestelaporte opened this issue 5 years ago • 6 comments

Summary

We've been releasing new versions of a package and since upgrading from 7.45.1 to 7.47.0 we can no longer use force:org:create. The error:

The ancestor package version [1.17.0] specified in the sfdx-project.json file hasn't been promoted and released. Release the ancestor package version before specifying it as the ancestor in a new package or patch version.

We can easily see that 1.17.0 has been released in the version list. Using --noancestors option makes this error go away, but it feels like a bug.

Steps To Reproduce:

  1. Build a sfdx-project.json with version 0.1, build beta package, release it.
  2. Update sfdx-project.json with version 0.2, and specify 0.1 as ancestorVersion.
  3. Attempt to use force:org:create without --noancestors, and error should show up.

Expected result

We should be able to spin up new scratch orgs and see a success message here. Using CLI version 7.45.1 has this good result.

Actual result

We see error message indicating a released version is not actually released.

Additional information

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

sfdx-cli/7.47.0-0e5d18732f darwin-x64 node-v10.15.3

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core):

@oclif/plugin-autocomplete 0.1.5 (core) @oclif/plugin-commands 1.2.3 (core) @oclif/plugin-help 2.2.3 (core) @oclif/plugin-not-found 1.2.3 (core) @oclif/plugin-plugins 1.7.9 (core) @oclif/plugin-update 1.3.9 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.0.7 (core) analytics 1.7.1 (core) generator 1.1.2 (core) salesforcedx 48.2.0 (core) ├─ @salesforce/sfdx-plugin-lwc-test 0.1.5 (core) ├─ salesforcedx-templates 48.3.0 (core) └─ salesforce-alm 48.3.0 (core)

sfdx-cli 7.47.0 (core) texei-sfdx-plugin 1.3.2

OS and version:

Tried in MacOS Catalina and CircleCI Linux.

triestelaporte avatar Feb 21 '20 19:02 triestelaporte

I just tested with force:package:version:create and the same error pops. Since --noancestors is not an option on beta package creation this one is a bigger deal.

triestelaporte avatar Feb 21 '20 19:02 triestelaporte

@triestelaporte I am letting both the packaging and environments teams know of your issue

clairebianchi avatar Feb 25 '20 22:02 clairebianchi

Is there a workaround for this, other than downgrading the CLI? Still getting the error using CLI version 7.52.0.

vinodr avatar Apr 02 '20 00:04 vinodr

I found that using ancestorId instead of ancestorName is working.

vinodr avatar Apr 02 '20 01:04 vinodr

I've filed W-7937860 to keep track of this internally.

vazexqi avatar Aug 10 '20 15:08 vazexqi

This issue has been linked to a new work item: W-15040347

git2gus[bot] avatar Feb 14 '24 15:02 git2gus[bot]

Hi @triestelaporte @vinodr - I know this issue has been open for a few years, with a few internal tickets created, and closed, I'm reaching out to verify if this has been fixed, or if it's still an issue?

WillieRuemmele avatar Apr 08 '24 16:04 WillieRuemmele

I don't think so. Has been off our radar for a while over here.

triestelaporte avatar Apr 08 '24 16:04 triestelaporte