-
Notifications
You must be signed in to change notification settings - Fork 79
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
2GP Package Create Intermittent Failure - Duplicate Rule #3188
Comments
Hello @Cerelius 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
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. |
I added a step in the workflow to print out the current version information. {
"architecture": "linux-x64",
"cliVersion": "@salesforce/cli/2.72.21",
"nodeVersion": "node-v22.12.0",
"osVersion": "Linux 6.8.0-1017-azure",
"rootPath": "/opt/hostedtoolcache/node/22.12.0/x64/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.16 (core)",
"@oclif/plugin-commands 4.1.15 (core)",
"@oclif/plugin-help 6.2.[20](https://github.com/ncino/force-plm/actions/runs/12896587603/job/35959908612?pr=857#step:7:21) (core)",
"@oclif/plugin-not-found 3.2.33 (core)",
"@oclif/plugin-plugins 5.4.24 (core)",
"@oclif/plugin-search 1.2.17 (core)",
"@oclif/plugin-update 4.6.[21](https://github.com/ncino/force-plm/actions/runs/12896587603/job/35959908612?pr=857#step:7:22) (core)",
"@oclif/plugin-version 2.2.19 (core)",
"@oclif/plugin-warn-if-update-available 3.1.29 (core)",
"@oclif/plugin-which 3.2.[23](https://github.com/ncino/force-plm/actions/runs/12896587603/job/35959908612?pr=857#step:7:24) (core)",
"@salesforce/cli 2.72.21 (core)",
"apex 3.6.8 (core)",
"api 1.3.2 (core)",
"auth 3.6.85 (core)",
"data 4.0.1 (core)",
"deploy-retrieve 3.17.0 (core)",
"info 3.4.30 (core)",
"limits 3.3.43 (core)",
"marketplace 1.3.7 (core)",
"org 5.2.16 (core)",
"packaging 2.9.10 (core)",
"schema 3.3.45 (core)",
"settings 2.4.9 (core)",
"sobject 1.4.48 (core)",
"telemetry 3.6.[29](https://github.com/ncino/force-plm/actions/runs/12896587603/job/35959908612?pr=857#step:7:30) (core)",
"templates 56.3.34 (core)",
"trust 3.7.53 (core)",
"user 3.6.5 (core)"
]
} |
Summary
While trying to create a 2GP package version, the operation will intermittently fail with the error included below. A rerun will typically resolve the issue but I wanted to report this as an issue with 2GP package version creation. I have no recourse for this issue outside of a rerun because the package version creation process is taking place outside of my hands based on the provided source code.
From my perspective, it seems like the phantom org that is creating the package version in the background isn't waiting for the duplicate rule to be applied before attempting to create the package version. Because it's resolved by rerunning it might be some sort of race condition taking place.
The package has a single duplicate rule, seen here.
Steps To Reproduce
I'm not able to provide the specific repo that I have seen this issue in but I also don't have a consistent method to recreate this error. It's typically resolved by rerunning the build and doesn't show up on every build. However, I still wanted to raise this as an error in the 2GP package creation process that may be exacerbated by longer application times for more duplicate rules in a package.
- sf package version create --json --skip-ancestor-check --version-number 1.407.0.NEXT --definition-file config/project-scratch-def.json --package PACKAGENAME --installation-key-bypass --code-coverage --version-name ver 1.407.0
Expected result
A new package version has been created.
Actual result
Package version creation fails
System Information
The build is executing on GitHub Actions with
@salesforce/cli/2.72.21 node 22
The text was updated successfully, but these errors were encountered: