feat: add SF_SOURCE_TRACKING_ASSUME_SYNCED env var to skip local status scan#865
Open
WillieRuemmele wants to merge 5 commits into
Open
feat: add SF_SOURCE_TRACKING_ASSUME_SYNCED env var to skip local status scan#865WillieRuemmele wants to merge 5 commits into
WillieRuemmele wants to merge 5 commits into
Conversation
…us scan When set to true, getStatus() returns an empty array without calling git.statusMatrix(). This eliminates the 13-30+ minute hang on first CLI operation after transplanting source tracking between environments. Designed for OrgFarm/CI scenarios where the shadow repo is already seeded and local files are known to match. Remote SourceMember tracking is unaffected and continues to detect org-side drift normally.
…retrieve to 12.37.1
- Unit tests for noCache caching, downstream methods, commitChanges interaction, and recovery after unsetting - NUT covering full lifecycle: baseline, env var suppresses changes, explicit deploy works, recovery after unset - Fix: env var set after status populated now resets to empty
The xNuts-pdr CI job links source-tracking into plugin-deploy-retrieve. Bumping SDR to 12.37.1 causes duplicate type declarations with incompatible private fields. Keeping @salesforce/core bump to 8.32.2 which is compatible.
The xNuts-pdr CI links source-tracking into PDR. When our library resolves a different @salesforce/core than PDR, TypeScript sees duplicate private fields on Org/SfProject. Reverting to ^8.31.2 to match the version PDR expects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SF_SOURCE_TRACKING_ASSUME_SYNCEDenvironment variable that bypasses the expensivegit.statusMatrix()call inShadowRepo.getStatus()Context
nCino's OrgFarm workflow pre-deploys source into pooled scratch orgs and seeds the shadow repo. When developers harvest an org, all file timestamps change, causing
isomorphic-gitto re-hash every file on the next tracking operation. For nForce (~70K files) this takes 13+ minutes; for LLC_BI (~250K files) it can exceed 30 minutes.This env var lets nCino (and similar workflows) assert "I know local and shadow are in sync" and skip the full filesystem scan. The flag emits a warning log and telemetry event on first use for observability.
@W-23389121@
Test plan
getStatus()returns[]without callingstatusMatrixwhen env var is set