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

Use DMLOptions to bypass duplicate rule exceptions #1498

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cfe546b
Use DMLOptions to bypass duplicate rule exceptions
chininchu Sep 27, 2024
a95d789
json files have been reverted
chininchu Oct 3, 2024
bd2f1fb
added the AllOrNothing flag
chininchu Oct 3, 2024
31ec88c
modified
chininchu Oct 3, 2024
86b3c3e
- Implement allOrNothing flag in DMLOptions instance
chininchu Oct 4, 2024
0c63f39
High Ratio Custom Object for Rollup Testing
acrosman Feb 7, 2024
1a84fd0
Rename Custom object file
acrosman Feb 7, 2024
3861c98
Add Standard Object High Ratio Test File
acrosman Feb 7, 2024
8adaff7
Create snowfakeryschema
Nickers3 Feb 6, 2024
3f335d4
Delete datasets/qa/snowfakeryschema
Nickers3 Feb 6, 2024
e188b64
Add files via upload
Nickers3 Feb 6, 2024
058f62a
Delete datasets/qa/SampleStandardObjectLowRatio.txt
Nickers3 Feb 7, 2024
5f836fb
Create snowfakerylowratio
Nickers3 Feb 7, 2024
e9f3070
Rename snowfakerylowratio to snowfakerylowratio.yml
Nickers3 Feb 7, 2024
757c979
Remove extra friends headers
acrosman Feb 7, 2024
c04cb9e
Adding 1 big opp
acrosman Feb 7, 2024
d134e99
Added Fields used to Test DLRS QA Rollups
Nickers3 Feb 7, 2024
1918523
Test for adding DLRS Rollups into QA repo.
Nickers3 Feb 7, 2024
d6b0aa1
Pulling DLRS QA Rollups into QA unpackaged portion of repo to allow f…
Nickers3 Feb 7, 2024
5e3d275
Adding Object Based DLRS Apex Class and Apex Triggers into QA Unpacka…
Nickers3 Feb 7, 2024
5aaf3b0
Pull DLRS Updates post testing
Nickers3 Feb 7, 2024
390e2bb
Add Page Layout changes with new fields and splitting out DRLS Test F…
Nickers3 Feb 7, 2024
96922ac
Ignore Layout and Profile changes
Nickers3 Feb 7, 2024
3659a17
Snowfakery Add
NickersUMN Feb 7, 2024
3a799f2
Update snowfakerylowratio.yml
NickersUMN Feb 7, 2024
20e4e0e
Added field description and help text to reference DLRS rollups that …
Nickers3 Feb 7, 2024
cc414ad
Update API versions to v61.0
aheber Sep 27, 2024
85de930
Massage and convert MDAPI format to DX format
aheber Sep 27, 2024
50b05bc
update cumulusci to correct structure
aheber Sep 27, 2024
60191e3
Merge remote changes and resolve conflicts for DMLOptions implementation
chininchu Oct 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ tasks:
options:
path: unpackaged/config/qa

snowfakery_lowratio:
description: Create a sample dataset for main objects in CSOM EDA org
class_path: cumulusci.tasks.bulkdata.snowfakery.Snowfakery
options:
recipe: datasets/qa/snowfakerylowratio.yml

robot:
options:
suites: robot/DLRS/tests
Expand Down Expand Up @@ -128,6 +134,7 @@ orgs:
config_file: orgs/dev.json
namespaced: True
days: 7

plans:
install:
slug: install
Expand Down
43 changes: 43 additions & 0 deletions datasets/qa/high-ratio-tests-custom-object.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Section uses the QA Lookup Parent object to create high ratio data.
# There is one parent, with 25,000 sub-parents each with 1 child.
# There is a second top level parent with all 25,000 children attached.
#QA Lookup Parent Record to be referenced later for Second Lookup on Child
- object: QALookupParent__c
nickname: TopLevelParent
count: 1
fields:
Name: Top Level Parent High Ratio
#QA Lookup Parent Record that will have child QA Lookup Parent
- object: QALookupParent__c
nickname: TopHierarchyParent
count: 1
fields:
Name: Top Level of a wide hierarchy
friends:
- object: QALookupParent__c
nickname: CustomParentwithChild
count: 25000
fields:
Name: QALookupParentwithChild
Self_Relationship__c:
reference: TopHierarchyParent
friends:
- object: QALookupChild__c
nickname: CustomChild
count: 1
fields:
Name: ${{fake.Text(max_nb_chars = 25)}}
Amount__c: 1000
Color__c:
random_choice:
- Red
- Yellow
- Green
- Blue
Description__c: ${{fake.Text(max_nb_chars = 200)}}
Description2__c: ${{fake.Text(max_nb_chars = 200)}}
LookupParent__c:
reference: CustomParentwithChild

LookupParent2__c:
reference: TopLevelParent
110 changes: 110 additions & 0 deletions datasets/qa/high-ratio-tests-stand-objects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Macros to reduce duplicate field definitions. All non-reference fields for
# each object type should be listed here. We don't bother with Account since
# we just set the Name field.

# Fields to use on all Contacts
- macro: contact_base
fields:
Firstname:
fake: first_name
Lastname:
fake: last_name

# Fields to use on Cases
- macro: case_base
fields:
Subject: ${{fake.Text(max_nb_chars = 20)}}
Description: ${{fake.Paragraph(nb_sentences=5)}}

# Fields to use on Opportunities
- macro: opp_base
fields:
Name: ${{fake.Word}} Opportunity
Stagename:
random_choice:
Prospecting: 5%
Qualification: 5%
Closed Won: 80%
Closed Lost: 10%
CloseDate:
date_between:
start_date: -1y
end_date: today
Amount:
random_number:
min: 1000
max: 10000
step: 50

- object: Account
count: 1
nickname: TopLevelAccount
fields:
Name:
fake: Company
friends:
- object: Account
nickname: ChildAccount
fields:
Name:
fake: Company
friends:
- object: Contact # Contacts for the child account
count: 50
include: contact_base
fields:
AccountId:
reference: ChildAccount
- object: Case # Case for child Account
count: 500
include: case_base
fields:
AccountId:
reference: ChildAccount
ContactId:
random_reference:
to: Contact
unique: False
- object: Contact # Contacts for the top level account.
count: 50
include: contact_base
fields:
AccountId:
reference: TopLevelAccount
- object: Case # Case for Parent Account
count: 500
include: case_base
fields:
AccountId:
reference: TopLevelAccount
ContactId:
random_reference:
to: Contact
unique: False
- object: Opportunity
count: 500
include: opp_base
fields:
AccountId:
reference: TopLevelAccount
ContactId:
random_reference:
to: Contact
unique: False
friends:
- object: OpportunityContactRole
count: 2
fields:
OpportunityId:
reference: Opportunity
ContactId:
random_reference:
to: Contact
unique: False
Role:
random_choice:
Business User: 20%
Decision Maker: 20%
Economic Buyer: 20%
Economic Decision Maker: 20%
Evaluator: 20%
Loading
Loading