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

Retrieve Source from Org doesn't consider api version specified in sfdx-config.json #5313

Open
oleg-mastriukov opened this issue Jan 3, 2024 · 3 comments

Comments

@oleg-mastriukov
Copy link

Summary

Retrieve Source from Org action uses an API version different from what's specified in the sfdx-config.json

Steps To Reproduce:

  1. In your target org have a permission set with the External Credential Principal Access added
  2. In VSCode, go to .sfdx\sfdx-config.json and specify the 59.0 version
  3. In VSCode, click on the permission set with the right button and press the 'Retrieve Source from Org' button
  4. Note that the retrieved file doesn't contain an externalCredentialPrincipalAccesses section
  5. In VSCode, go to a terminal and run the command sfdx force source retrieve -p 'path_to_the_permission_set'
  6. Note that in this case, the file contains the externalCredentialPrincipalAccesses section

Expected result

The 'Retrieve Source from Org' action uses a specified API version the same way as the retrieve command does

Actual result

The 'Retrieve Source from Org' uses a different api version (cached somewhere?)

Additional information

The issue is similar to 3151

Salesforce Extension Version in VS Code: v59.9.0

SFDX CLI Version: 2.6.7

OS and version: Windows 10 22H2

VS Code version: 1.85.1

@daphne-sfdc
Copy link
Contributor

Hi @oleg-mastriukov,

I am able to replicate your issue on my computer. This is actually the same issue as #5178. I resolved this using the workaround my team found for that issue - by deleting the .sfdx and .sf folders, running Developer: Reload Window from the command palette, reauthorizing to my org, and then retrieving my Permission Set again.

Can you try this workaround and let me know if your issue is resolved? I'll bring this to my team again.

@oleg-mastriukov
Copy link
Author

Hey @daphne-sfdc,

Yep, thanks for referring to #5178, it seems to be the same problem.
Your advice solved my issue, currently, the Retrieve Source from Org action uses the last (v59.0) API version. Thanks for your help!
By the way, I see the previous issue was closed as resolved, but was it? It still seems to be a bug in my understanding even though it's somehow cache-related.

@daphne-sfdc
Copy link
Contributor

Hi @oleg-mastriukov,
Thank you for the confirmation that the workaround works for you. My team discussed the issue and has confirmed that yes, you're right that this is a bug, so I have logged a bug in my team's backlog.

As for the original issue - I think we decided to close #5178 at that time because that was the first issue in this area that we received so we thought it was a one-off with a workaround and weren't 100% sure whether it was a bug. Thanks for pointing that out - in that case, I'll keep this one open and tag it as bug.

@forcedotcom forcedotcom deleted a comment from git2gus bot Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants