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

force:source:status command incorrectly identifying modified profiles containing parentheses #2212

Closed
lain13 opened this issue Jun 14, 2023 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@lain13
Copy link

lain13 commented Jun 14, 2023

When the profile name includes parentheses, for example, My(awesome)profile, the sfdx force:source:status command always treats the profile as if it has been modified.
When the profile is pulled using the sfdx force:source:pull command, the profile is escaped and stored at the following path:
force-app/main/default/profiles/My%28awesome%29profile.profile-meta.xml
Even if the sfdx force:source:status is run again, the CLI still considers the profile as added to the remote repository.

profile source_status
@lain13 lain13 added the investigating We're actively investigating this issue label Jun 14, 2023
@github-actions
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.

@WillieRuemmele
Copy link
Member

WillieRuemmele commented Jun 14, 2023

reproduced this... my initial thought is that the encoded () as %28 isn't matching to () and messing up source tracking

➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  status 
Warning: We plan to deprecate this command in the future. Try using the "project retrieve/deploy preview" command instead.
Source Status
 STATE      FULL NAME                                     TYPE     PROJECT PATH 
 ────────── ───────────────────────────────────────────── ──────── ────────────            
 Remote Add my(awesome)profile                            Profile               
➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  pull
Warning: We plan to deprecate this command in the future. Try using the "project retrieve start" command instead.
Pulling v58.0 metadata from [email protected] using the v58.0 SOAP API
Updating source tracking... done
=== Retrieved Source

 STATE   FULL NAME              TYPE    PROJECT PATH                                                            
 ─────── ────────────────────── ─────── ─────────────────────────────────────────────────────────────────────── 
 Created my%28awesome%29profile Profile force-app/main/default/profiles/my%28awesome%29profile.profile-meta.xml 

➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  status 
Warning: We plan to deprecate this command in the future. Try using the "project retrieve/deploy preview" command instead.
Source Status
 STATE      FULL NAME                                     TYPE     PROJECT PATH 
 ────────── ───────────────────────────────────────────── ──────── ──────────── 
 Remote Add my(awesome)profile                            Profile               
➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  sfdx -v                                                                
@salesforce/cli/2.0.0-beta.52 darwin-arm64 node-v18.16.0
➜  dreamhouse-lwc git:(main) ✗  hub:(GLOBAL - DevHub) scratch:([email protected])
 ➜  sfpc   
@oclif/plugin-autocomplete 2.2.0 (link) /Users/william.ruemmele/projects/oclif/plugin-autocomplete
@oclif/plugin-commands 2.2.15 (core)
@oclif/plugin-help 5.2.9 (core)
@oclif/plugin-not-found 2.3.25 (core)
@oclif/plugin-plugins 3.1.2 (core)
@oclif/plugin-search 0.0.17 (core)
@oclif/plugin-update 3.1.18 (core)
@oclif/plugin-version 1.3.4 (core)
@oclif/plugin-warn-if-update-available 2.0.37 (core)
@oclif/plugin-which 2.2.22 (core)
@salesforce/cli 2.0.0-beta.52 (core)
apex 2.3.2
auth 2.8.1 (core)
community 2.2.11 (2.3.0)
data 2.3.24 (core)
deploy-retrieve 1.12.0 (core)
info 2.6.20 (core)
limits 2.3.20 (core)
login 1.2.11 (core)
org 2.9.12
packaging 1.18.0 (1.18.0)
release-management 4.0.9
└─ trust 2.4.20
schema 2.3.13 (core)
settings 1.4.12 (core)
sobject 0.1.25 (core)
source 2.10.15 (core)
telemetry 2.2.1 (core)
templates 55.4.21 (core)
user 2.3.17 (core)

continued to confirm this %28 theory by creating a custom metadata object my(awesome)object, pull that, and you'll get a new layout

Layout force-app/main/default/layouts/my_awesome_label__mdt-my%28awesome%29

continue to pull/status and see it always as Remote Add

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jun 14, 2023
@git2gus
Copy link

git2gus bot commented Jun 14, 2023

This issue has been linked to a new work item: W-13593791

@shetzel
Copy link
Contributor

shetzel commented Jul 5, 2023

This is fixed in the latest CLI releases

@shetzel shetzel closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants