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

feat: name fields for definitionfile #1221

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

soridalac
Copy link
Contributor

@soridalac soridalac commented Sep 23, 2024

What does this PR do?

create name feature in definition-file for apex and group option fields

What issues does this PR fix or reference?

forcedotcom/cli#3008 (comment)
@W-16757770@

@soridalac soridalac requested a review from a team as a code owner September 23, 2024 22:16
Copy link
Member

@cristiand391 cristiand391 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good over all, left some questions and requested some small changes

@cristiand391
Copy link
Member

QA notes:

setup:
checked out this PR, yarn compile then linked it with sf plugins link

org create sandbox

✅ throws when specifying both ApexClassId and ApexClassName
✅ throws when specifying both ActivationUserGroupIdand ActivationUserGroupName

⚠️ NIT: the validation happens after the sandbox name is generated so we always get this warning, let's do the validation early 👍🏼
Screenshot 2024-09-25 at 10 54 19 AM

✅ throws if can't find ID of ApexClassName

⚠️ NIT:
Screenshot 2024-09-25 at 11 00 36 AM

✅ throws if can't find ID of ActivationUserGroupName

Screenshot 2024-09-25 at 11 01 42 AM

✅ resolves ApexClassName to class ID
def.file

{
  "description": "testing testing",
  "ApexClassName": "PropertyController"
}

...

=== Config Sandbox Request

 Field       Value
 ─────────── ──────────────────
 Description testing testing
 SandboxName sbx1hxq4ir
 LicenseType Developer
 ApexClassId 01p4p00000AryNlAAJ

Screenshot 2024-09-25 at 11 27 19 AM

✅ resolves ActivationUserGroupName to user group ID
ApexClassName works without ActivationUserGroupName
ActivationUserGroupName works without ApexClassName

org refresh sandbox

❌ throws when specifying both ApexClassId and ApexClassName
❌ throws when specifying both ActivationUserGroupIdand ActivationUserGroupName
❌ throws if can't find ID of ApexClassName
❌ throws if can't find ID of ActivationUserGroupName
❌ resolves ApexClassName to class ID
❌ resolves ActivationUserGroupName to user group ID
ApexClassName works without ActivationUserGroupName
ActivationUserGroupName works without ApexClassName

@cristiand391
Copy link
Member

QA update

⚠️ NIT: the validation happens after the sandbox name is generated so we always get this warning, let's do the validation early 👍🏼

✅ fixed
Screenshot 2024-09-25 at 5 05 20 PM

Screenshot 2024-09-25 at 5 06 46 PM

org refresh sandbox

✅ throws when specifying both ApexClassId and ApexClassName
✅ throws when specifying both ActivationUserGroupIdand ActivationUserGroupName
✅ throws if can't find ID of ApexClassName
✅ throws if can't find ID of ActivationUserGroupName
✅ resolves ApexClassName to class ID (no apex class -> class assigned, old class -> new class)
✅ resolves ActivationUserGroupName to user group ID (no group -> group assigned, old group -> new group)
✅ ApexClassName works without ActivationUserGroupName
✅ ActivationUserGroupName works without ApexClassName

✅ props can start with/without capital letter, we handle casing when reading the def. file

@cristiand391 cristiand391 changed the base branch from main to cd/merge-conflict September 25, 2024 20:21
@cristiand391 cristiand391 merged commit 7a64c03 into salesforcecli:cd/merge-conflict Sep 25, 2024
1 check passed
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