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: Retrieve* Commands Should Update Source Tracking When Used Against Source-tracked Sandboxes #4773

Merged
merged 63 commits into from
Apr 17, 2023

Conversation

klewis-sfdc
Copy link
Contributor

@klewis-sfdc klewis-sfdc commented Apr 4, 2023

What does this PR do?

  • Fixes the SFDX: Retrieve* commands so they update source-tracking when used against a source-tracked Sandbox.

What issues does this PR fix or reference?

@W-12971145@

Functionality Before

When connected to a source-tracked Sandbox, SFDX: Retrieve* commands would retrieve metadata components, but would not fix up source tracking correctly.

Functionality After

When connected to a source-tracked Sandbox, SFDX: Retrieve* commands retrieve metadata components and fix up source tracking correctly.

Todos:

  • Confirm SFDX: Retrieve Source in Manifest from Org works as expected

@klewis-sfdc klewis-sfdc force-pushed the ken/add-src-trk-to-retrieve-for-src-trk-sboxes branch from 2ad6e00 to 72b7af0 Compare April 5, 2023 14:37
"@salesforce/salesforcedx-sobjects-faux-generator": "57.9.0",
"@salesforce/salesforcedx-utils-vscode": "57.9.0",
"@salesforce/schemas": "^1",
"@salesforce/source-deploy-retrieve": "7.14.2",
"@salesforce/source-deploy-retrieve": "^7.14.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to carrot here to get core and utils-vscode to have the same version of @salesforce/source-deploy-retrieve installed.

@@ -11,7 +11,8 @@
],
"main": "out/src",
"dependencies": {
"@salesforce/core": "^3.31.18",
"@salesforce/source-tracking": "2.2.24",
"@salesforce/core": "3.34.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add source-tracking to the utils-vscode pkg and upgrade core to align version with core pkg

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I asked this is in another PR, but I'm losing track haha. Does core need to be consistent across our packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to me that even though the package.json entries are not all exactly the same across the packages, we end up with only two versions of core installed 3.34.6 and 2.37.1 (for Functions):
2023-04-14_16-26-47

2023-04-14_16-26-25

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new version of core was released, which resulted in npm i installing 3 versions of @salesforce/core, and then hitting compilation errors. In #4808 all versions of core dependencies in vsce packages were aligned on v 3.34.7 to avoid the compilation errors.

@klewis-sfdc klewis-sfdc marked this pull request as draft April 7, 2023 00:05
@klewis-sfdc klewis-sfdc marked this pull request as ready for review April 7, 2023 04:47
use stl to update its status but not throw conflict errs in retrieve ops
@klewis-sfdc klewis-sfdc marked this pull request as draft April 7, 2023 05:40
@klewis-sfdc klewis-sfdc marked this pull request as ready for review April 8, 2023 14:58
@randi274 randi274 self-requested a review April 12, 2023 19:01
@klewis-sfdc klewis-sfdc requested a review from a team as a code owner April 12, 2023 21:58
pollStatus: jest.fn().mockResolvedValue(dummyRetrieveResult)
} as any;

let workspaceContextGetInstanceSpy: jest.SpyInstance;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used on line 58 below. I added an expect into the test for it so that it is being used in the assertions.

Copy link
Contributor

@randi274 randi274 left a comment

Choose a reason for hiding this comment

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

QA so far - looks good for non-source tracked orgs (aka Dev org). I am seeing some weird behavior around deletions + deploys for source-tracked orgs, so we're going to follow up on Monday to review that.

Copy link
Contributor

@randi274 randi274 left a comment

Choose a reason for hiding this comment

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

QA Complete, and building great with the updated version of salesforce/core!

@klewis-sfdc klewis-sfdc merged commit 9c14c36 into develop Apr 17, 2023
@klewis-sfdc klewis-sfdc deleted the ken/add-src-trk-to-retrieve-for-src-trk-sboxes branch April 17, 2023 23:12
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