Skip to content

cub variant conflicts

cub variant conflicts

Show, apply, or dismiss a variant's outstanding merge conflicts

Synopsis

Work with the parts of the last promote's patch that were not applied, across a whole variant.

A merge reports a conflict for every change it could not make: a path a link's --where-mutation holds (ProtectedPath), a path the variant owns (Subtracted), a path that could not be located (UnresolvedPath), a downstream change displaced by an upstream deletion (DeleteShadowed), a value a guard stopped (Guarded), a guard change the merge was not cleared for (GuardWithheld), and a change a mutually exclusive field blocked (ExclusiveWithheld) or made room for (ExclusiveCleared). The merged data is correct as it stands; a conflict says what the source wanted to change and couldn't. "cub unit conflicts" explains each reason in full.

With no flags this lists the outstanding conflicts in every unit of the variant, by the resource they are on. --apply replays the changes they withheld, and --dismiss drops them without touching the configuration data. Both act on every outstanding conflict in the variant unless --reason, --path, --resource, or --guard narrows the selection; --resource names one resource the way the function verbs do, as / or //. --path and --guard select as they do for "cub unit conflicts": a list element by position or merge key, * for any one element or key, and the guards a conflict was withheld by. Both take --dry-run, which reports what would be done and writes nothing.

Applying a Guarded or GuardWithheld conflict needs a --clearance covering the guards at its path, as "cub unit conflicts" explains; without one the apply is refused.

--dismiss --permanent also records the selection on the unit holding the resource, so a later promote reporting a conflict it covers leaves it dismissed rather than outstanding. It needs --resource and --reason. "cub unit conflicts --undismiss" removes one.

The variant is named as /, or by its space slug.

Examples:

  # What did the last promote fail to apply?
  cub variant conflicts web/dev

  # What would taking the base's values do?
  cub variant conflicts web/dev --apply --dry-run -o mutations

  # Take them for one resource only
  cub variant conflicts web/dev --apply --resource Deployment/backend

  # Accept the variant as it is and stop reporting them
  cub variant conflicts web/dev --dismiss

  # This variant sets its own replica count: stop reporting the base's
  cub variant conflicts web/dev --dismiss --permanent --resource Deployment/backend \
    --reason Subtracted --path spec.replicas
cub variant conflicts <variant> [--apply [--clearance CLEARANCE]... | --dismiss [--permanent]] [--reason REASON] [--path PATH] [--resource <kind>/[<namespace>/]<name>] [--guard KEY[=VALUE]]... [flags]

Options

      --apply                   apply the changes the selected conflicts withheld
      --changeset string        changeset open on the unit, as <slug> or <space>/<slug>; a changeset locks the units it is open on, so a write that creates a revision of one has to name it
      --clearance stringArray   with --apply, class of guarded reason the applied changes are cleared for, as KEY, KEY=VALUE[;VALUE...], KEY!=VALUE[;VALUE...], or !KEY (repeatable). An apply writing a guarded path this does not cover is refused
      --dismiss                 drop the selected conflicts without changing the configuration data
      --dry-run                 dry run mode: report what --apply or --dismiss would do without writing anything
      --guard stringArray       select conflicts withheld only by these guards, as key or key=value (repeatable)
  -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; a list element by position or merge key, * for any one element or key
      --permanent               with --dismiss, also dismiss what the selection covers whenever a later promote reports it
      --quiet                   No default output.
      --reason string           select conflicts with this reason: Subtracted, DeleteShadowed, ProtectedPath, UnresolvedPath, ExclusiveWithheld, ExclusiveCleared, Guarded, GuardWithheld, or ReplayFailed
      --resource string         select conflicts on one resource, as <kind>/<name> or <kind>/<namespace>/<name>
      --timeout string          completion timeout as a duration with units, such as 10s or 2m (default "10m0s")
      --verbose                 Detailed output, additive with default output
      --wait                    wait for completion (default true)

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output

SEE ALSO