cub unit conflicts
cub unit conflicts
Show, apply, or dismiss a unit's outstanding merge conflicts
Synopsis
Work with the parts of the last merge's patch that were not applied.
A merge reports a conflict for every change it could not make: a path the downstream owns (Subtracted), a path the downstream protects (ProtectedPath), a path that could not be located in this unit (UnresolvedPath), and each downstream change displaced by an upstream deletion (DeleteShadowed). The merged data is correct as it stands -- a conflict says what the source wanted to change and couldn't.
ExclusiveWithheld is one of those, for a change that could not be made because this unit owns a field mutually exclusive with it -- the source switched a volume to a secret and this unit had already chosen an emptyDir. Applying it performs the switch. ExclusiveCleared reports the opposite: the source's change applied and a value this unit had was removed to make room for it, because keeping both is a resource that will not apply. It carries the removed value.
The conflicts stay on the unit until they are dealt with, so a merge that dropped half its patch is still visible afterwards rather than only in the response of the request that ran it. The next merge replaces them with its own, and a merge that lands cleanly clears them.
With no flags this lists the outstanding conflicts. --apply replays the changes they withheld, with every path eligible so nothing filters them out a second time. --dismiss drops them without touching the configuration data. Both act on every outstanding conflict unless --reason, --path, or --resource narrows the selection.
Examples:
# What did the last merge fail to apply?
cub unit conflicts my-unit
# Apply the upstream changes that were withheld because this unit owns the path
cub unit conflicts my-unit --apply --reason Subtracted
# Accept the current state and stop reporting them
cub unit conflicts my-unit --dismiss
# Which units in the space merged with paths the patch could not locate?
cub unit list --where "Conflicts.*.Reason = 'UnresolvedPath'"
cub unit conflicts <unit-slug> [--apply | --dismiss] [--reason REASON] [--path PATH] [--resource NAME] [flags]
Options
--apply apply the changes the selected conflicts withheld
--dismiss drop the selected conflicts without changing the configuration data
-h, --help help for conflicts
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--path string select conflicts at this path
--quiet No default output.
--reason string select conflicts with this reason: Subtracted, DeleteShadowed, ProtectedPath, UnresolvedPath, ExclusiveWithheld, or ExclusiveCleared
--resource string select conflicts on this resource, by name
--verbose Detailed output, additive with default output
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
--space string space ID to perform command on
SEE ALSO
- cub unit - Unit commands