You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
Describe the bug
Predeployment scripts do not overwrite csv files used for deployment of data packages.
Referencing the DX@Scale section regarding data packages , it should be possible to manipulate the csv files before upserting the data using SFDMU. However, sfpowerscripts utilizes the original values in the csv instead of the manipulated data resulting from the predeployment script
To Reproduce
Steps to reproduce the behavior:
Create a new data package test-data-package to insert Product(2)s:
Create a preDeployment script to manipulate the data and add the "preDeploymentScript" parameter in sfdx-project.json:
#!/bin/bash
sed -i "s/Replace/123/g" src/test-data-package/Product2.csv # Replace the "Replace" value with 123 - Linux syntax
cat src/test-data-package/Product2.csv # Print content to ensure replacement was performed
sfdx sfdmu:run --path src/test-data-package -s csvfile -u $2 --noprompt --loglevel TRACE # Run SFDMU manually prior to data package deployment
Add postDeployment script to sleep the Pull Request validation to avoid deletion of validation org before validating bug & add the "postDeploymentScript" parameter in sfdx-project.json:
#!/bin/bash
sleep 180 # sleep Pull Request in order to log in and verify data result
Create a Pull Request of your changes
When the data package is deployed in the Pull Request, authenticate towards the validation org using the sfdxAuthURL in PROD: SELECT SfdxAuthUrl__c FROM ScratchOrgInfo WHERE SignupUsername='USERNAME' & sfdx auth:sfdxurl:store -f auth.json
Expected behavior
Two Products with the name 123 are inserted in the validation org
Actual behavior
One Product with the name 123 is inserted with the manual SFDMU run. Another Product with the name Replace is inserted by the sfpowerscripts deployment of the test data package
Screenshots
Platform Details (please complete the following information):
OS: Linux
Version: Ubuntu Latest
Salesforce CLI(sfdx cli) Version:
sfpowerscripts: latest (20.2.11)
sfdx: 7.179.0
sfdmu: 4.18.2
CI Platform: Azure DevOps
Additional context
Trying to insert Product Variations & Product Variation Parents as part of Salesforce Commerce Cloud. The Product Attribute Set record (& items) is represented as metadata, and thus cannot be inserted in the data package. Thus, to resolve the product data correctly, the Product Attribute Set Id needs to be queried and replaced prior to deployment of the data package
The text was updated successfully, but these errors were encountered:
Describe the bug
Predeployment scripts do not overwrite csv files used for deployment of data packages.
Referencing the DX@Scale section regarding data packages , it should be possible to manipulate the csv files before upserting the data using SFDMU. However, sfpowerscripts utilizes the original values in the csv instead of the manipulated data resulting from the predeployment script
To Reproduce
Steps to reproduce the behavior:
Product2.csv
export.json
"preDeploymentScript"
parameter in sfdx-project.json:"postDeploymentScript"
parameter in sfdx-project.json:Create a Pull Request of your changes
When the data package is deployed in the Pull Request, authenticate towards the validation org using the sfdxAuthURL in PROD:
SELECT SfdxAuthUrl__c FROM ScratchOrgInfo WHERE SignupUsername='USERNAME'
&sfdx auth:sfdxurl:store -f auth.json
Expected behavior
Two Products with the name 123 are inserted in the validation org
Actual behavior
One Product with the name 123 is inserted with the manual SFDMU run. Another Product with the name Replace is inserted by the sfpowerscripts deployment of the test data package
Screenshots
![Screenshot 2023-01-16 at 18 58 18](https://user-images.githubusercontent.com/97173615/212755730-d83b5943-0e01-483a-81e1-7c08a8a806eb.png)
Platform Details (please complete the following information):
Additional context
Trying to insert Product Variations & Product Variation Parents as part of Salesforce Commerce Cloud. The Product Attribute Set record (& items) is represented as metadata, and thus cannot be inserted in the data package. Thus, to resolve the product data correctly, the Product Attribute Set Id needs to be queried and replaced prior to deployment of the data package
The text was updated successfully, but these errors were encountered: