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

fix: update pull commands to sf style #5388

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

CristiCanizales
Copy link
Contributor

What does this PR do?

  • Updates force:source:pull command to SF style

What issues does this PR fix or reference?

@W-14717014@

export const FORCE_SOURCE_PUSH_LOG_NAME =
export const PROJECT_RETRIEVE_START_LOG_NAME =
'project_retrieve_start_default_scratch_org';
export const PROJECT_DEPLOY_START_LOG_NAME =
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch 👍

@@ -6,4 +6,4 @@
*/

export const dummyOutputPull =
'{\n "status": 0,\n "result": {\n "pulledSource": [\n {\n "state": "Created",\n "fullName": "F10",\n "type": "ApexClass",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/classes/F10.cls"\n },\n {\n "state": "Created",\n "fullName": "F10",\n "type": "ApexClass",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/classes/F10.cls-meta.xml"\n },\n {\n "state": "Changed",\n "fullName": "Admin",\n "type": "Profile",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/profiles/Admin.profile-meta.xml"\n }\n ]\n },\n "warnings": [\n "We plan to deprecate this command in the future. Try using the \\"project retrieve start\\" command instead.",\n "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."\n ]\n}\n';
'{\n "status": 0,\n "result": {\n "files": [\n {\n "state": "Created",\n "fullName": "F10",\n "type": "ApexClass",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/classes/F10.cls"\n },\n {\n "state": "Created",\n "fullName": "F10",\n "type": "ApexClass",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/classes/F10.cls-meta.xml"\n },\n {\n "state": "Changed",\n "fullName": "Admin",\n "type": "Profile",\n "filePath": "/Users/kenneth.lewis/scratchpad/NewProj1/force-app/main/default/profiles/Admin.profile-meta.xml"\n }\n ]\n },\n "warnings": [\n "We plan to deprecate this command in the future. Try using the \\"project retrieve start\\" command instead.",\n "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."\n ]\n}\n';
Copy link
Contributor

Choose a reason for hiding this comment

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

The message says "We plan to deprecate this command in the future. Try using the \\"project retrieve start\\" command instead." So it's outdated and no longer applies, right?

@CristiCanizales CristiCanizales self-assigned this Feb 6, 2024
Copy link
Contributor

@daphne-sfdc daphne-sfdc left a comment

Choose a reason for hiding this comment

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

Approved! 🎉

This is what I tested:

• SFDX: Pull Source from Default Org (pull Dreamhouse into an empty project successfully) ✅
• SFDX: Pull Source from Default Org (no changes made -> no results found, pull successfully) ✅
• SFDX: Pull Source from Default Org (change file in org, local file overridden by org file after pull) ✅
• SFDX: Pull Source from Default Org (change file in local, no results found for pull) ✅
Note: This is the same case as push source - I expected my local file to be overridden by the version that’s in the org, as that is what I see when I run retrieve. But I’m going to accept the fact that nothing got pulled because that’s the behavior in the currently published version.
Screenshot 2024-02-07 at 11 20 36 AM
• SFDX: Pull Source from Default Org (failed because of a conflict) ✅
• SFDX: Pull Source from Default Org (failed because of a non-conflict error) - could not test this case because you cannot save an Apex class in an org if the code doesn’t compile

• SFDX: Pull Source from Default Org and Ignore Conflicts (pull Dreamhouse into an empty project successfully) ✅
• SFDX: Pull Source from Default Org and Ignore Conflicts (no changes made -> no results found, pull successfully) ✅
• SFDX: Pull Source from Default Org and Ignore Conflicts (change file in org, local file overridden by org file after pull) ✅
• SFDX: Pull Source from Default Org and Ignore Conflicts (change file in local, no results found for pull) ✅
Note: Same as above - not the behavior I would expect because it differs from retrieve but it’s what’s already there in the published version.
Screenshot 2024-02-07 at 11 37 32 AM
• SFDX: Pull Source from Default Org and Ignore Conflicts (overrode a conflict successfully) ✅
• SFDX: Pull Source from Default Org and Ignore Conflicts (failed because of a non-conflict error) - could not test this case because you cannot save an Apex class in an org if the code doesn’t compile

@CristiCanizales CristiCanizales merged commit 089fdb4 into develop Feb 7, 2024
12 checks passed
@CristiCanizales CristiCanizales deleted the cristi/w-14717014/pull-to-sf branch February 7, 2024 16:52
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.

2 participants