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: implement diff detection using file content comparison #511

Merged
merged 24 commits into from
Mar 14, 2023

Conversation

scolladon
Copy link
Owner

Explain your changes


Migrate from our line by line in house algorithm to detect change in metadata located inside files (Workflow, SharingRule, Labels, etc).
To a more robust/understandable/standard object comparison algorithm

Performance it is equivalent as the previous implementation (surprisingly)
It is more memory consuming than the previous implementation, but I don't see an impact in CI/CD (let's see)

It does not care about the indentation of the file

I have refactored a bit the code so the responsibility are more segregated and easier to unit test
Integration test are more integrated

Does this close any currently open issues?


closes #480

  • Jest test added to check the fix is applied.

@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (89d6aa7) 100.00% compared to head (5c54cce) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #511   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines          816       844   +28     
=========================================
+ Hits           816       844   +28     
Impacted Files Coverage Δ
src/service/botHandler.js 100.00% <ø> (ø)
src/utils/repoGitDiff.js 100.00% <ø> (ø)
src/post-processor/flowTranslationProcessor.js 100.00% <100.00%> (ø)
src/service/inBundleHandler.js 100.00% <100.00%> (ø)
src/service/inFileHandler.js 100.00% <100.00%> (ø)
src/service/inFolderHandler.js 100.00% <100.00%> (ø)
src/service/inResourceHandler.js 100.00% <100.00%> (ø)
src/service/standardHandler.js 100.00% <100.00%> (ø)
src/service/waveHandler.js 100.00% <100.00%> (ø)
src/utils/fileGitDiff.js 100.00% <100.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@scolladon scolladon force-pushed the feat/inFile-json-compare branch 7 times, most recently from 9227104 to f82cdfa Compare March 12, 2023 16:53
mehdicherf
mehdicherf previously approved these changes Mar 14, 2023
@codeclimate
Copy link

codeclimate bot commented Mar 14, 2023

Code Climate has analyzed commit 5c54cce and detected 0 issues on this pull request.

View more on Code Climate.

@scolladon scolladon enabled auto-merge (squash) March 14, 2023 16:49
@scolladon scolladon merged commit 9bf60c5 into main Mar 14, 2023
@scolladon scolladon deleted the feat/inFile-json-compare branch March 14, 2023 17:05
@github-actions
Copy link

Shipped in release v5.14.0.
You can install the new version using the version number or the latest-rc channel

$ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install [email protected]

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.

Git diff shows difference on CustomLabels.xml, but sgd does not add the file in the package.xml
2 participants