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.
This PR fixes a very old design flaw of the CLI: when running the
sync
command, components will be synched only partially when they already exist, so display name, icon, preview, and any other property, except presets and fields, won't be synched into the target space.This PR adds a new parameter called
--components-full-sync
to synch every property of the components. The decision to use a parameter is because this bug has been here for 4 years, so it can be considered a breaking change. I don't think we should create a new major release for this, so I'm just adding a parameter with the intention of making this the default behavior in a future major version.Pull request type
Jira Link: SHAPE-2922
How to test this PR
Create two spaces, then add a component to the source space and run
Then, change the display name of your component in the source space and other properties of your choice (except for presets and fields), and run the above command again. These changes shouldn't be reflected in the target space. You can try it from the main branch, and you should get the same result.
Now run from the branch of this PR this command:
You should get all of the changes from source into target.
What is the new behavior?
The new
--components-full-sync
parameter will make the CLI sync all the properties of components into target when a components synch is executed.Other information