Closed ImJohnMDaniel closed 2 years ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
This issue has been linked to a new work item: W-8881495
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
@ImJohnMDaniel while this is irritating, It would be great if the cli can print out the path to the shape file and provide an option to retain it, as this is one of the mechanism we use to update shape of the pooled orgs
This just affected my ability to create a 2GP version as well. If 2GP packages are being built against an org with unknown features/settings based on what projects I worked on previously that is very scary. This could mean my package is unexpectedly dependent on a feature I had not specified and had no intent to use.
This needs to be fixed yesterday if I am going to trust this system at all to develop a product.
Where can I find the temp shape folder ?
The shape folder is created in the <os_temp_dir>/shape
directory, unless the SFDX_MDAPI_TEMP_DIR
env var is set, in which case it will use that directory.
Thanks !
I automatically fixed this issue with sfdx-hardis plugin so now I don't have to manually delete stuff before creating a new scratch :)
sfdx hardis:scratch:create
@mshanemc, @shetzel, @WillieRuemmele -- when you have a moment, can you check on this issue please? It has been 11 months since the last update. Thanks for the help.
Hi @ImJohnMDaniel 👋
can you try it out with the org:beta:create
command?
@WillieRuemmele, is the standard force:org:create
command still using $TMPDIR/shape
?? I just tried to create a scratch org and I don't see the shape
folder even being created anymore.
@ImJohnMDaniel I don't believe it is, you could set SFDX_MDAPI_TEMP_DIR
which should be respected by either command
@WillieRuemmele, it would appear that the force:org:create
command is now setting up a randomized folder name like shape_1649799707998
. This effectively resolves this particular issue since each execution of the command would use a new location. Thanks for the help.
Summary
If you have multiple DX projects with varying configurations within each project's
project-scratch-def.json
files, the system temporary folder that the Salesforce CLI uses to define the shape of the scratch org can include definition files from previousforce:org:create
executions. This can lead to errors during the scratch org creation that are not present on other machines or from previous scratch org creation events.Steps To Reproduce:
Repository to reproduce: cli-issue-753
execute the following command
sfdx force:org:create --setdefaultusername --wait 30 --setalias scratch-A --durationdays 1 --definitionfile config/a-project-scratch-def.json
examine the contents of the temporary folder used to define the "shape" of the scratch org.
It's contents are:
The
Account.object
file contains:The
package.xml
file contains:execute the following command
sfdx force:org:create --setdefaultusername --wait 30 --setalias scratch-B --durationdays 1 --definitionfile config/b-project-scratch-def.json
examine the contents of the temporary folder used to define the "shape" of the scratch org.
It's contents are:
The
Account.object
file remains the same as above.The
package.xml
file now contains:execute the first
force:org:create
command again. This time with a different alias.sfdx force:org:create --setdefaultusername --wait 30 --setalias scratch-FAILS --durationdays 1 --definitionfile config/a-project-scratch-def.json
The following failure message seen at this point:
This error results from the fact that the "shape definition temp files" from the previous scratch org creation were not cleaned out at the beginning of the third execution of the
force:org:create
command.Additional information
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
OS and version: MacOS v11.0.1
attention: @amphro, @clairebianchi