Skip to content

cub variant blame

cub variant blame

Show what set each field of every unit in a variant

Synopsis

Show, for every field of every unit in a variant, what set the value that is there: the operation, the revision, who ran it, and when. It is 'cub unit blame' for a whole variant space, under a header naming each unit, and the columns and flags are the ones described in 'cub unit blame --help'.

A value that arrived from upstream is followed to where it was set. The units of a variant usually merge from the units of one base, and each upstream unit is read once however many of the variant's units lead to it.

--where narrows the units, taking the same expressions 'cub unit list' does. --path and --resource narrow the fields, as on 'cub unit blame'. -o json emits one object per field, each naming its unit, and -o wide adds the value, the function a link or trigger ran, the mutation number, and the ChangeOrder.

Copy a REF and its unit into 'cub unit path' for everything recorded about a field.

Examples:

  # Every field of every unit in the variant
  cub variant blame apptique/prod

  # Every container image in the variant, and what set it
  cub variant blame apptique/prod --path image

  # Only the deployments, with values
  cub variant blame apptique-prod --where "Slug LIKE 'deployment-%'" -o wide

  # Every field a link set, as JSON
  cub variant blame apptique-prod -o jq='[.[] | select(.Flags | contains("L"))]'
cub variant blame <variant> [flags]

Options

  -h, --help                          help for blame
      --include-hidden string[="*"]   Also select hidden entities, to list or to act on: those hidden for the given HiddenReasons, comma-separated, as in --include-hidden=BackingUnit, or for any reason when given no value or "*". ConfigHub/YAML Units, which hold the configuration of other entities, are hidden with the reason BackingUnit. A --where naming entities by Slug or ID selects them whether hidden or not
      --no-upstream                   report each unit's own record without following a merge to where the value was set
  -o, --output string                 Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
      --path string                   only fields whose path contains this substring
      --quiet                         No default output.
      --resource string               only fields of this resource, as <type>/<name> or <name>
      --show-comments                 include the comment-carrying pseudo-fields ($comment$...) that hold YAML comments
      --upstream-depth int            how many upstream units to follow before giving up (default 8)
      --verbose                       Detailed output, additive with default output
      --where string                  Filter expression using SQL-inspired syntax. Supports conjunctions with AND. String operators: =, !=, <, >, <=, >=, LIKE, NOT LIKE, ILIKE, ~~, !~~, ~, ~*, !~, !~*. Pattern matching with LIKE/ILIKE uses % and _ wildcards. Regex operators (~, ~*, !~, !~*) support POSIX regular expressions. A related entity is referenced by prefix, as in "UpstreamUnit.Slug = 'base'"; when the reference names a list, a * segment matches any element, as in "FromLink.*.Slug = 'upgrade-app'". Examples: "Slug LIKE 'app-%'", "DisplayName ILIKE '%backend%'", "Slug ~ '^[a-z]+-[0-9]+$'"

Options inherited from parent commands

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

SEE ALSO