-
Notifications
You must be signed in to change notification settings - Fork 77
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
source tracking commands beta #1258
Labels
announcement
Announcement to the community
Comments
This was referenced Oct 28, 2021
This was referenced Dec 2, 2021
This was referenced Dec 6, 2021
This was referenced Dec 7, 2021
8 tasks
closed with new commands GA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source Tracking Beta
What’s new?
New versions of
force:source:push/pull/status
andforce:source:tracking:clear/reset
in https://github.com/salesforcecli/plugin-source under thesource:beta
subtopicA new open-source library for source tracking at https://github.com/forcedotcom/source-tracking that provides direct interaction with the local source tracking files via git.
Bug fixes and feature requests
How do I use them?
Unlike previous beta tests of new commands, we’re trying something different. We’re shipping them in everybody’s CLI.
To use them, just add the
beta
subtopic, likesfdx force:source:beta:pull
instead ofsfdx force:source:pull
The regular commands (without the
beta
) remain unchanged.Don’t mix the versions
The tracking files are different and stored in slightly different places. If you have a project using the old commands, you can’t use the new ones on that project until you either 1) clear the tracking or 2) start with a new org
Both the
beta
and normal versions of these commands check the tracking files to keep you from accidentally using the wrong ones.What else is changing?
Performance
This is using the same library deploy/retrieve library that VSCode and source:deploy/retrieve/delete use. It’s open source, so you can run a debugger OR check if your metadata type is missing or contribute one that is. Now, all supported tooling is using the same library, which deploys/retrieves faster than the previous version.
Behavior of multiple package directories
If your
sfdx-project.json
has multiplepackageDirectories
,force:source:beta:push
will (by default) merge them all into one deployment, which for most users will be much faster.Thanks to those who raised #1269 and @kjonesffdc proposed an elegant solution: the new
pushPackageDirectoriesSequentially
property insfdx-project.json
will make each package directory a separate deployment, in the order specified insfdx-project.json
.If you're using an IDE that validates your project.json schema, you'll get a warning about this property not existing until that schema gets updated forcedotcom/schemas#42
Hooks have breaking changes
The [pre|post][deploy|retrieve] hooks will mirror those of source:deploy|retrieve (different from the old push/pull). Learn way more on the blog
Instant project changes
The new commands always check your
forceignore
and project.jsonpackageDirectories
so changes in those files are immediately picked up.Source tracking files and location
Now stored in
.sfdx/orgs/[orgId]
instead of by usernameThe
sourcePathInfos
files no longer exist. They’ve been replaced by git-style repository filesUsing git to interact with local tracking files
So, yeah, there’s a git repo to track local changes. Manually manipulating your tracking files shouldn’t be part of your normal workflow, but for the adventurous, you can now use git commands starting with
git --git-dir .sfdx/orgs/[orgId]/localSourceTracking
to do things likegit --git-dir .sfdx/orgs/[orgId]/localSourceTracking add [somefile]
git --git-dir .sfdx/orgs/[orgId]/localSourceTracking commit -m 'manual update'
git --git-dir .sfdx/orgs/[orgId]/localSourceTracking log
Simplified flags and
ignored
on force:source:status--all
was redundant, so it’s gone. It you want both local and remote, just saysfdx force:source:beta:status
You can specify
—remote
or--local
but not both, because that’s also the same assfdx force:source:beta:status
The output of
force:source:status
shows all changes but indicates which ones, if any, are covered by your.forceignore
file (and therefore won’t be part of push/pull).These currently only happen when there's a local copy of the file...you won't see it marked as
ignored
if it's in theRemote Add
state, even though it won't be pulled.Quiet mode for push
Adding —quiet to
force:source:beta:push
will result in no list of successful components (you’ll still see any errors)Fixed issues
#1387
#1264
#1132
#451
#1295
#119
#537
#1308
#582
Pushes with large deletes (~100+ files) don’t result in 431 errors
Fixed conflict detection on CustomLabels
Feature requests delivered
Source status shows what’s currently ignored #119
Quiet mode for push #129
Known issues
What’s next?
force:source:retrieve
to retrieve a few specific files, instead of pulling all the changes, and having that update instead of break your tracking.The text was updated successfully, but these errors were encountered: