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

fix: Don't pass fullName for Unlocked packages #3636

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

jstvz
Copy link
Contributor

@jstvz jstvz commented Aug 3, 2023

This PR fixes an issue where the creation of a beta version of an unlocked package was failing during the create_package_version task with a misleading error message about a 1GP dependency.

The workaround is to match the behavior of the @salesforce/packaging typescript library: when the package type is 'unlocked', 'None' is passed instead of the package name.

Fixes #3633

@jstvz jstvz requested a review from a team as a code owner August 3, 2023 17:33
@jstvz jstvz requested a review from davidmreed August 3, 2023 17:33
@davidmreed
Copy link
Contributor

@jstvz do we have any confirmation that this is the same behavior as sfdx? There's a Deep Magic bug that manifests roughly the same way but which I don't think has the same underlying cause.

@jstvz
Copy link
Contributor Author

jstvz commented Aug 4, 2023

@jstvz do we have any confirmation that this is the same behavior as sfdx? There's a Deep Magic bug that manifests roughly the same way but which I don't think has the same underlying cause.

Yes, as far as I can tell.

The source conversion happens during package version create. It calls MetadataConverter from source-deploy-retrieve using the convertMetadata function. This function is only called by generateMDFolderForArtifact.

I found two callers of generateMDFolderForArtifact. Both construct the options without including the packageName. In contrast, when force:source:convert -n pkgName is called, packageName is included.

@davidmreed
Copy link
Contributor

@jstvz Given your findings should this apply for any 2GP package, not just Unlocked?

@jstvz
Copy link
Contributor Author

jstvz commented Aug 4, 2023

@davidmreed I believe we should limit it to just Unlocked packages because of: (1) the blast radius and, (2) there are no issues reporting similar behavior in 2GP packages (despite the scale at which we've been building them).

@jstvz jstvz merged commit e39619d into main Aug 7, 2023
34 checks passed
@jstvz jstvz deleted the fix-1gp-2gp-error branch August 7, 2023 16:09
@leboff
Copy link
Contributor

leboff commented Feb 1, 2024

@jstvz @davidmreed to your question, this does not just affect unlocked packages. My original bug report was for a locked 2GP, and I verified this error is still occurring on CCI 3.83.0

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

Successfully merging this pull request may close these issues.

Cryptic error when creating Unlocked Package Version
3 participants