Skip to content

@W-23737446@ fix(package-convert): fail fast for unresolved package properties - #915

Open
ravipanguluri wants to merge 4 commits into
mainfrom
t/2gp-readiness/w-23737446/fail-fast-for-conversion-with-unpackaged-dep
Open

@W-23737446@ fix(package-convert): fail fast for unresolved package properties#915
ravipanguluri wants to merge 4 commits into
mainfrom
t/2gp-readiness/w-23737446/fail-fast-for-conversion-with-unpackaged-dep

Conversation

@ravipanguluri

@ravipanguluri ravipanguluri commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fail fast when unpackagedMetadata or apexTestAccess cannot be associated with a package during 1GP-to-2GP conversion instead of silently dropping the configuration.
  • Accept either a package alias that resolves to a 0Ho ID or a literal 0Ho ID, preserving existing package-directory compatibility.
  • Add focused coverage for missing package properties, unresolved aliases, literal-ID compatibility, disabled code coverage, and ordinary source directories.

Existing behavior

During sf package convert with code coverage enabled, package-scoped configuration is copied from the matching packageDirectories entry into the package descriptor. An entry without a package property 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 unpackagedMetadata or apexTestAccess to 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 package property is missing or does not resolve to a valid 0Ho package ID. Literal 0Ho values remain supported as a compatibility fallback. Directories that do not declare these properties, and conversions without code coverage, are unaffected.

Work item

@W-23737446@

@ravipanguluri
ravipanguluri requested a review from a team as a code owner August 25, 2026 19:35
@ravipanguluri ravipanguluri changed the title @W-23737446 fix(package-convert): fail fast for unresolved package properties @W-23737446@ fix(package-convert): fail fast for unresolved package properties Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants