-
Notifications
You must be signed in to change notification settings - Fork 109
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: resolve strict dirs before suffixes for potential metadata files #1480
Merged
Conversation
This file contains 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
WillieRuemmele
approved these changes
Jan 9, 2025
QA Notesfrom repro repo 🚀 ➜ sf project retrieve start --metadata restrictionrule
› Warning: @salesforce/plugin-agent is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.
────────────── Retrieving Metadata ──────────────
Retrieving v61.0 metadata from test-9fekem0ocrbk@example.com using the v62.0 SOAP API
✔ Preparing retrieve request 8ms
✔ Sending request to org 1.00s
✔ Waiting for the org to respond 309ms
✔ Done 0ms
Status: Succeeded
Elapsed Time: 1.33s
› Warning: Nothing retrieved after ✅ pd project retrieve start --metadata restrictionrule
────────────── Retrieving Metadata ──────────────
Retrieving v61.0 metadata from test-9fekem0ocrbk@example.com using the v62.0 SOAP API
✔ Preparing retrieve request 6ms
✔ Sending request to org 835ms
✔ Waiting for the org to respond 3.10s
✔ Done 0ms
Status: Succeeded
Elapsed Time: 4.05s
Retrieved Source
┌─────────┬──────┬─────────────────┬───────────────────────────────────────────────────────────┐
│ State │ Name │ Type │ Path │
├─────────┼──────┼─────────────────┼───────────────────────────────────────────────────────────┤
│ Changed │ Foo │ RestrictionRule │ force-app/main/default/restrictionRules/Foo.rule-meta.xml │
└─────────┴──────┴─────────────────┴───────────────────────────────────────────────────────────┘ |
peternhale
pushed a commit
that referenced
this pull request
Jan 9, 2025
…#1480) * fix: resolve strict dirs before suffixes for potential metadata files * fix: do not reuse suffixType if no match
peternhale
added a commit
that referenced
this pull request
Jan 24, 2025
* chore: wip * chore: license year * chore(release): 12.11.0 [skip ci] * chore: only check md file (#1475) * fix: add workflow flow actions to decomposed workflow preset and allow isAddressable (#1467) * fix: add workflow flow actions and allow isAddressable * fix: add workflow flow actions * chore(release): 12.11.1 [skip ci] * W-17279149 Register MD APIs to metadata registry (#1472) * chore: register md apis to metadata registry * Update metadataRegistry.json chore:empty commit * chore(release): 12.11.2 [skip ci] * chore: auto-update metadata coverage in METADATA_SUPPORT.md [no ci] * fix: update snapshot (#1478) * chore(release): 12.11.3 [skip ci] * feat(mdTypes): register tua viz and ws metadata types (#1479) * chore(release): 12.12.0 [skip ci] * chore: auto-update metadata coverage in METADATA_SUPPORT.md [no ci] * fix: resolve strict dirs before suffixes for potential metadata files (#1480) * fix: resolve strict dirs before suffixes for potential metadata files * fix: do not reuse suffixType if no match * chore(release): 12.12.1 [skip ci] * chore: wip * chore: wip * chore: wip * chore: encoded in MD, chars in SD (#1485) * chore: wip * chore: wip * chore: update md xml to include xml header * chore: temp (#1490) * chore: wip * Wr/decompose esr (#1492) * chore: reset snapshots to main * fix: deploy ESR yaml and -meta * test: fix registry test * chore: bump core * chore: always decompose to yaml The schema property contents in an esr can be either yaml of json. For simplicity, given the property alwasy represents an Open API spec, the decomposed format of schema will be yaml. Recomposition will use an existing xml property, schemaUploadFileExtension, to determine the format when build the MD type. * chore: add missing expected artifacts --------- Co-authored-by: peternhale <peter.hale@salesforce.com> * chore: fix test * chore: address review suggestions --------- Co-authored-by: Willhoit <iowillhoit@users.noreply.github.com> Co-authored-by: svc-cli-bot <Svc_cli_bot@salesforce.com> Co-authored-by: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Co-authored-by: Idan Roas <44600753+IdanRoas@users.noreply.github.com> Co-authored-by: Willie Ruemmele <willieruemmele@gmail.com> Co-authored-by: PKV <43024336+PraveenViswanathan@users.noreply.github.com> Co-authored-by: Steve Hetzel <shetzel@salesforce.com>
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.
What does this PR do?
Modifies the code when resolving potential metadata files to not reuse the suffixType when that type doesn't match with the provided file path. Added a test to ensure this doesn't regress.
See the GitHub issue for a repro. Certain metadata types have non-unique file suffixes like "rule" or "site". These would not resolve correctly in certain code paths, such as when retrieving
RestrictionRule
metadata.What issues does this PR fix or reference?
#3168
@W-17555689@