@W-23737446@ fix(package-convert): fail fast for unresolved package properties - #915
Open
ravipanguluri wants to merge 4 commits into
Open
Conversation
andrewslater
approved these changes
Aug 27, 2026
WillieRuemmele
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unpackagedMetadataorapexTestAccesscannot be associated with a package during 1GP-to-2GP conversion instead of silently dropping the configuration.0HoID or a literal0HoID, preserving existing package-directory compatibility.Existing behavior
During
sf package convertwith code coverage enabled, package-scoped configuration is copied from the matchingpackageDirectoriesentry into the package descriptor. An entry without apackageproperty is not considered a packaging directory, and an entry whose package alias cannot be resolved cannot be associated with the package being converted.Previously, both cases caused
unpackagedMetadataorapexTestAccessto be omitted without an error or warning. Conversion continued, and the missing metadata or test access could surface only later as an unrelated Apex test failure—for example, a restricted-picklist error caused by values that the omitted unpackaged metadata was expected to provide.Why this change
Silently dropping explicitly declared configuration obscures the actual project configuration problem and makes the later test failure difficult to diagnose. The conversion request now validates these package-scoped properties before processing code coverage and reports an actionable error when the
packageproperty is missing or does not resolve to a valid0Hopackage ID. Literal0Hovalues remain supported as a compatibility fallback. Directories that do not declare these properties, and conversions without code coverage, are unaffected.Work item
@W-23737446@