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

feat: validate CLI installation and version during activation of CLI Integration extension #5185

Merged
merged 73 commits into from
Jan 5, 2024

Conversation

daphne-sfdc
Copy link
Contributor

@daphne-sfdc daphne-sfdc commented Oct 26, 2023

What does this PR do?

This PR includes new functionality to check whether a supported CLI version is installed on the user's computer. There are 4 main cases that are being caught: (1) CLI not installed (2) Outdated version of SFDX CLI that is incompatible with our extensions (3) Only SF v1 is installed (4) Both SFDX v7 and SF v2 are installed. In each of those 4 cases, the CLI Integration extension will not activate, and the user will not be able to see SFDX commands in the command palette. The user will receive an error notification about the unsupported/missing CLI when the activation of the CLI Integration extension fails.

What issues does this PR fix or reference?

@W-14196710@

Functionality Before

As a result of the recent switch from SFDX -> SF-style variables to get rid of warnings in the Output tab, users with a CLI version below SFDX v7.193.2 are no longer able to use the extensions because older CLI versions do not support SF-style variables. The extensions will activate, but the older version is caught at runtime.
Screenshot 2023-10-24 at 7 00 13 PM

Functionality After

If the user does not have CLI installed on their computer or their installed CLI version is no longer supported, they will get an error notification when they first create/open a Salesforce Project and the CLI Integration extension will not activate. Based on the case, one of these 4 error messages will pop up:
Screenshot 2023-11-28 at 9 37 21 AM

@daphne-sfdc daphne-sfdc marked this pull request as ready for review October 26, 2023 15:51
@daphne-sfdc daphne-sfdc requested a review from a team as a code owner October 26, 2023 15:51
@daphne-sfdc daphne-sfdc requested review from RitamAgrawal and CristiCanizales and removed request for RitamAgrawal October 26, 2023 15:51
Copy link
Contributor

@CristiCanizales CristiCanizales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) Waiting on the tests for approval. Thanks Daphne! 🥳

Copy link
Contributor

@gbockus-sf gbockus-sf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some feedback for your consideration

daphne-sfdc and others added 4 commits December 18, 2023 11:41
Co-authored-by: peternhale <peternhale@users.noreply.github.com>
…tion.ts

Co-authored-by: Cristina Cañizales <113132642+CristiCanizales@users.noreply.github.com>
Copy link
Contributor

@CristiCanizales CristiCanizales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good from QA perspective both in mac and windows! ✅
After the text updates I'd say :shipit:
Nice work Daphne! 🥳
QA doc here

Co-authored-by: peternhale <peternhale@users.noreply.github.com>
@sbudhirajadoc
Copy link
Contributor

The text for the message recommending the move to SF from SFDX is here.

@daphne-sfdc daphne-sfdc changed the title fix: validate CLI installation and version during activation of CLI Integration extension feat: validate CLI installation and version during activation of CLI Integration extension Jan 4, 2024
@daphne-sfdc daphne-sfdc merged commit 3678774 into develop Jan 5, 2024
12 checks passed
@daphne-sfdc daphne-sfdc deleted the daphne/W-14196710-verify-cli-version branch January 5, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants