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

sf project deploy deploy - toggles metadata instead update them to current version described in XML file #2583

Closed
patrykacc opened this issue Nov 29, 2023 · 8 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer stale validated Version information for this issue has been validated

Comments

@patrykacc
Copy link

patrykacc commented Nov 29, 2023

Diffrent metadata deployments start to behave completely different than expected, example:
Permission sets: Each time exactly the same PS is deployed, then the access to the custom fields of particular object is toggled, even though PS itself includes Read/Write access to them. By toggled I mean that every next, exactly the same deployments, either revoke, or grant access to the same custom fields. More over, if I grant access manually to one of custom fields mentioned in PS, while others doesn't have them granted currently in org - then, after once more deployment, fields that didn't have access, they are read/write now, and the field that I added access manual, gets access revoked. It really behaves like toggle-mode.
Some other metadata types are also affected, like page layouts, here I am investigating more to see the pattern.

Expected result

After each deployment of metadata, Permission Set always has accesses as specified in metadata.

Actual result

After each deployment of metadata, Permission Set always have opposite value, after each deployment.

System Information

I am using sf CLI

@oclif/plugin-autocomplete 3.0.1 (core)
@oclif/plugin-commands 3.0.6 (core)
@oclif/plugin-help 6.0.5 (core)
@oclif/plugin-not-found 3.0.3 (core)
@oclif/plugin-plugins 4.1.7 (core)
@oclif/plugin-search 1.0.6 (core)
@oclif/plugin-update 4.1.3 (core)
@oclif/plugin-version 2.0.6 (core)
@oclif/plugin-warn-if-update-available 3.0.2 (core)
@oclif/plugin-which 3.0.8 (core)
@salesforce/cli 2.17.14 (core)
apex 2.3.20 (core)
auth 2.8.26 (core)
data 2.6.3 (core)
deploy-retrieve 1.20.0 (core)
info 3.0.1 (core)
limits 3.0.1 (core)
login 2.0.1 (core)
marketplace 1.0.2 (core)
org 2.11.8 (core)
schema 3.0.1 (core)
settings 2.0.2 (core)
sobject 0.2.15 (core)
source 2.11.0 (core)
telemetry 3.1.0 (core)
templates 55.5.18 (core)
trust 3.0.2 (core)
user 2.3.42 (core)
Uninstalled JIT Plugins:
community 2.4.9
custom-metadata 2.2.12
dev 1.3.2
devops-center 1.2.4
env 3.0.1
functions 1.22.9
packaging 1.27.1
signups 1.5.6
@salesforce/sfdx-plugin-lwc-test 1.1.1
@salesforce/sfdx-scanner 3.18.0
Success
result: @oclif/plugin-autocomplete 3.0.1 (core)
@oclif/plugin-commands 3.0.6 (core)
@oclif/plugin-help 6.0.5 (core)
@oclif/plugin-not-found 3.0.3 (core)
@oclif/plugin-plugins 4.1.7 (core)
@oclif/plugin-search 1.0.6 (core)
@oclif/plugin-update 4.1.3 (core)
@oclif/plugin-version 2.0.6 (core)
@oclif/plugin-warn-if-update-available 3.0.2 (core)
@oclif/plugin-which 3.0.8 (core)
@salesforce/cli 2.17.14 (core)
apex 2.3.20 (core)
auth 2.8.26 (core)
data 2.6.3 (core)
deploy-retrieve 1.20.0 (core)
info 3.0.1 (core)
limits 3.0.1 (core)
login 2.0.1 (core)
marketplace 1.0.2 (core)
org 2.11.8 (core)
schema 3.0.1 (core)
settings 2.0.2 (core)
sobject 0.2.15 (core)
source 2.11.0 (core)
telemetry 3.1.0 (core)
templates 55.5.18 (core)
trust 3.0.2 (core)
user 2.3.42 (core)
Uninstalled JIT Plugins:
community 2.4.9
custom-metadata 2.2.12
dev 1.3.2
devops-center 1.2.4
env 3.0.1
functions 1.22.9
packaging 1.27.1
signups 1.5.6
@salesforce/sfdx-plugin-lwc-test 1.1.1
@salesforce/sfdx-scanner 3.18.0

@patrykacc patrykacc added the investigating We're actively investigating this issue label Nov 29, 2023
@github-actions github-actions bot removed the investigating We're actively investigating this issue label Nov 29, 2023
Copy link

Hello @patrykacc 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@github-actions github-actions bot added the more information required Issue requires more information or a response from the customer label Nov 29, 2023
Copy link

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.

Copy link

Hello @patrykacc 👋 None of the versions of sf you shared match the latest release.

Shared: 2.10.2, 2.10.2
Latest: 2.17.14

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@patrykacc
Copy link
Author

You are corrcet, I have version 2.10.2 installed locally in my PC, but our CI/CD uses Sfdx standard docker image with latest version of CLI, I updated system information in original post, with information from our CI pipeline.

@patrykacc
Copy link
Author

Output of sf version --verbose --json

{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.17.14",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.22631",
"rootPath": "C:\Users\Admin\AppData\Roaming\nvm\v18.15.0\node_modules\@salesforce\cli",
"shell": "cmd.exe",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.0.1 (core)",
"@oclif/plugin-commands 3.0.6 (core)",
"@oclif/plugin-help 6.0.5 (core)",
"@oclif/plugin-not-found 3.0.3 (core)",
"@oclif/plugin-plugins 4.1.7 (core)",
"@oclif/plugin-search 1.0.6 (core)",
"@oclif/plugin-update 4.1.3 (core)",
"@oclif/plugin-version 2.0.6 (core)",
"@oclif/plugin-warn-if-update-available 3.0.2 (core)",
"@oclif/plugin-which 3.0.8 (core)",
"@salesforce/cli 2.17.14 (core)",
"apex 2.3.20 (core)",
"auth 2.8.26 (core)",
"data 2.6.3 (core)",
"deploy-retrieve 1.20.0 (core)",
"info 3.0.1 (core)",
"limits 3.0.1 (core)",
"login 2.0.1 (core)",
"marketplace 1.0.2 (core)",
"org 2.11.8 (core)",
"packaging 1.16.1 (user)",
"schema 3.0.1 (core)",
"settings 2.0.2 (core)",
"sobject 0.2.15 (core)",
"source 2.11.0 (core)",
"telemetry 3.1.0 (core)",
"templates 55.5.18 (core)",
"trust 3.0.2 (core)",
"user 2.3.42 (core)"
]
}

@github-actions github-actions bot added validated Version information for this issue has been validated investigating We're actively investigating this issue and removed more information required Issue requires more information or a response from the customer labels Nov 29, 2023
@patrykacc
Copy link
Author

Here is screen from our field audit trails, showing that this permission changes each deployment, but its contradicting the metadata that is being deployed, which is always the same (read/write):
image

@mshanemc
Copy link
Contributor

Are you able to share the part of the PermissionSet that's being deployed that touches on Activity/Event/Task?

I remember some tricks in other parts of the API about whether they are called Task/Event or Activity.

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label Nov 29, 2023
Copy link

github-actions bot commented Dec 7, 2023

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Dec 7, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer stale validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants