Skip to content

feat: support sf/sfdx retrieve & deploy of recursively-foldered TagSet - #1806

Draft
awarshavsky wants to merge 1 commit into
forcedotcom:mainfrom
awarshavsky:aw/tagset-retrieve-support
Draft

feat: support sf/sfdx retrieve & deploy of recursively-foldered TagSet#1806
awarshavsky wants to merge 1 commit into
forcedotcom:mainfrom
awarshavsky:aw/tagset-retrieve-support

Conversation

@awarshavsky

Copy link
Copy Markdown

DRAFT — internal review before engaging the CLI team. Do not merge.

Problem

sf project retrieve start -m TagSet:... fails with RegistryError: Missing metadata type definition in registry for id 'TagSet' — SDR has no registry entry for Tag/TagSet, so the command errors before contacting the org.

Shape of the metadata

Core's Metadata API returns TagSet with a dotted fullName (A.B.C) and a recursively-foldered fileName (tagSet/A/B/C.tagSet). Nested tag sets fold by parent-set identity, unbounded depth.

Fix (3 files)

  1. Registry entryTagSet with inFolder: true. This reuses the existing Report/Dashboard unbounded-folder mechanism (parseNestedFullName + calculateRelativePath), giving correct recursive foldering on retrieve-write for free.
  2. Separator bridgeinFolder yields a slash-separated fullName on disk (A/B/C), but the TagSet MDAPI contract is dot-separated (A.B.C). Added a TagSet case in constructFullName, symmetric to the existing ReportFolder/DashboardFolder special-cases, that translates / to . for the manifest.
  3. TestComponentSet.getObject() asserts A/B/C produces <members>A.B.C</members>.

Open question for CLI team

Tag/TagSet are v66+. SDR has no per-type API-version gating; that convention is the CLI team's call (ComponentSet layer or registry coverage).

Prerequisite

Server-side listMetadata foldering is fixed by Core W-23465184 (already committed).

Add TagSet registry entry (inFolder for unbounded recursive foldering) and
translate the on-disk slash-separated fullName to the org's dot-separated
TagSet contract in constructFullName. Verified by a ComponentSet.getObject
test asserting A/B/C to A.B.C in the package manifest.
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! It looks like @awarshavsky is an internal user so signing the CLA is not required. However, we need to confirm this.

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.

1 participant