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

Sh/fix deploy sharing rules #1419

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Sep 13, 2024

What does this PR do?

SharingRules were not being converted properly by child type due to an incorrect definition in the registry. This would result in errors thrown when trying to deploy SharingRules using a command like:
sf project deploy start -m SharingCriteriaRule:Account.Test_Rule1
Adds conversion snapshot tests to ensure SharingRules can be converted by the SharingRules type or a child type, both to mdapi format and source format.

What issues does this PR fix or reference?

@W-16554846@

Test Suggestions:

  1. convert SharingRules to mdapi format by path. Ensure the correct directory name (sharingRules) and file contents.
  2. convert SharingRules to mdapi format by SharingRules type
  3. convert SharingRules to mdapi format by SharingCriteriaRule type
  4. deploy SharingRules by SharingRules type
  5. deploy SharingRules by SharingCriteriaRule type
  6. retrieve SharingRules by SharingRules type
  7. retrieve SharingRules by SharingCriteriaRule type

@shetzel shetzel requested a review from a team as a code owner September 13, 2024 19:33
@WillieRuemmele
Copy link
Member

QA Notes


✅ : steps 1&2 produced same behaviors, same outputs
✅ : step 3 - correct sharingRules dir created, instead of sharingCriteriaRules
✅ : deployed -m SharingRules the same
🐛 : current behavior deployed SharingCriteriaRule but didn't have any output, new bug to be logged =>

 ➜  ../../oss/plugin-deploy-retrieve/bin/run.js project deploy start --metadata SharingCriteriaRule
Deploying v61.0 metadata to [email protected] using the v61.0 SOAP API.
Deploy ID: 0AfDR00003Q7I740AF
Status: Failed | ████████████████████████████████████████ | 3/3 Components | Errors: 2

Component Failures [2]
================================================
| Type  Name      Problem            Line:Column 
| ───── ───────── ────────────────── ─────────── 
| Error Lead.g    Not in package.xml             
| Error Lead.test Not in package.xml             

Warning: SharingGuestRule, Lead.g, returned from org, but not found in the local project
Warning: SharingOwnerRule, Lead.test, returned from org, but not found in the local project

vs (current)

sf project deploy start --metadata SharingCriteriaRule 
 ›   Warning: @salesforce/plugin-api is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.
Deploying v61.0 metadata to [email protected] using the v61.0 SOAP API.
Deploy ID: 0AfDR00003Q7Hcu0AF
Status: Succeeded | ████████████████████████████████████████ | 0/0 Components

✅ : retrieved via MD, same behavior overwriting existing .sharingRules file with less info (we only requested criteria)
✅ : deploy -m/-d works
✅ : retrieve -m/-d
✅ : source tracking

@WillieRuemmele WillieRuemmele merged commit 54b9efd into main Sep 13, 2024
76 checks passed
@WillieRuemmele WillieRuemmele deleted the sh/fix-deploy-sharing-rules branch September 13, 2024 21:05
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.

3 participants