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

Error creating 2GP version in Winter '23 #3415

Closed
leboff opened this issue Oct 28, 2022 · 2 comments · Fixed by #3748 or muselab-d2x/CumulusCI#10
Closed

Error creating 2GP version in Winter '23 #3415

leboff opened this issue Oct 28, 2022 · 2 comments · Fixed by #3748 or muselab-d2x/CumulusCI#10
Labels

Comments

@leboff
Copy link
Contributor

leboff commented Oct 28, 2022

Describe the bug

In my specific case, we are creating a managed 2GP version with quick actions that have a dependency on record types in an unlocked 2GP. Building the package version with CumulusCI results in an error like:

Error: UNKNOWN_EXCEPTION : Can’t add component <quick action name> because it’s associated with metadata from a managed 2GP package. Managed 1GP packages can’t depend on managed 2GP packages.

I did some digging and it looks like when building with CumulusCI, the package.xml in the metadata sent in the 'Package2CreateVersionRequest' contains the 'fullName' field (with the project name in that field). I think this confuses the SFDC package validation into thinking you're creating a 1GP package, and the build fails with that error

I assume generally when generating a new 2GP version in CumulusCI that has dependencies on another 2GP, the validation fails with that error, but I've only tested/verified with the Record Type/ Quick Action metadata

Reproduction steps

  1. Create an Unlocked 2GP that contains record types (Package A)
  2. Create a new CumulusCI project (Package B)
  3. Add a quick action in Package B that references a record type from Package A
  4. Attempt to create a new package version with CumulusCI task create_package_version

Your CumulusCI and Python versions

CumulusCI version: 3.67.1
Python version: 3.10.4

Operating System

macOS 12.6

Windows environment

No response

CumulusCI installation method

pipx

Error Gist

No response

Additional information

Changing this:

self.package_config.package_name,

to None resolves the issue, but I'm unsure if there are any side effects to that.

@jstvz
Copy link
Contributor

jstvz commented Oct 28, 2022

@leboff Thank you for the report and pull request. We may need to discuss this change internally, so there may be some delay in getting it reviewed.

@jstvz
Copy link
Contributor

jstvz commented Oct 9, 2023

Fixed in #3636.

@jstvz jstvz closed this as completed Oct 9, 2023
jstvz added a commit that referenced this issue May 14, 2024
Fixes #3415  for the scenario of when building a locked 2GP

Co-authored-by: David Reed <d.reed@salesforce.com>
Co-authored-by: James Estevez <jestevez@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants