Skip to content

feat: replace_key for delete_insert and templates inside quoted config arguments - #1518

Merged
chio-labs-delivery[bot] merged 24 commits into
mainfrom
feat/replace-key-template-args
Nov 16, 2026
Merged

chio-labs-delivery[bot] merged 24 commits into
mainfrom
feat/replace-key-template-args

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Why

delete_insert by unique_key is used to replace groups of rows, but unique_key promises one row per key and SQLCLEAN018 trusts it. Config templates could not read a template inside a quoted argument, such as ${coalesce('${ENV:SCHEMA}', 'dev')}. A release PR check failed with "did not start": the dispatched run was not found within the lookup's 2 minutes, from list lag or from a gh run list error the pipe hid.

Changes

  • fensu 0.31.1 (fensu-policy stays 0.22.0).
  • replace_key for incremental delete_insert: deletes rows whose replace_key values are in the delta, then inserts it. Not with unique_key, microbatch or non-incremental; never a uniqueness proof for SQLCLEAN018; BigQuery refuses it (A012).
  • Config templates expand ${...} inside quoted arguments, up to eight levels deep, in linear time; malformed bodies keep their errors. Docs added.
  • Release Please lookup: set -uo pipefail, 60 polls × 10 s, a failed gh run list is logged and retried. Lag: found later. Error: retried. A run that never appears still fails "did not start".
  • Bindings cap 169,863 → 169,893 (+31 with sqlbuild-python-base): replace_key plan plumbing, A012.

Verification

  • fensu 0.31.1, same machine: unreachable ratio 3.51–4.38 (0.31.0: 4.99–5.46); dense 3,000 cold wall 1.035×, CPU 1.017×.
  • replace_key: Rust validation and refusal cases; integration build replaces all rows of one key; E2E SQLCLEAN018 still flags ROW_NUMBER over a replace_key column. Snowflake: a window rebuild keeps each group equal to its upstream rows.
  • Templates: Rust cases; a step-count guard fails on the old rescanning (36.8M steps); an E2E build resolves a quoted fallback.
  • Release workflow: can't be tested here. The lookup against real runs finds the run, is empty on a mismatch, survives a gh error.
  • make check-ci.

DuckShop: new int_edge_delivery_versions_replaced edge case for replace_key. Quoted templates are config expansion, covered by E2E.

The malformed nested-template guard now counts the characters the scan
visits instead of timing it, and the docs say a template nested past the
limit stays as written text.
fensu-facts and fensu-native move to =0.31.1 and the fensu tool to
>=0.31.1. fensu-policy stays at 0.22.0. The unreachable-definitions
scaling bound stays at 6.5.
The scan helpers return the characters they visit with their result,
their docs fit one line, the linear-scan guard uses named cases with an
expected step bound, and the build test builds each case in place.
Raised from 197,891 to 197,921: replace_key plan-entry plumbing and the
A012 refusal, +31 together with sqlbuild-python-base.
gh run watch --exit-status fails for a run that finished before the
watch started, which failed release pull request checks whose trusted
runs had passed. The loop now watches only a run still in progress and
passes the check only when the finished run concluded success.
… errors

A release pull request check failed with "did not start" because the
dispatched Release Distributions run did not appear in the run list
within the lookup's two minutes. Without pipefail, a failing run list
call in that loop looked the same as a run not listed yet.

The lookup now polls for up to ten minutes, retries a failed run list
call, picks the first match in jq instead of a head pipe, and the step
runs with nounset and pipefail. A run that never appears still fails the
check with the same message. This also drops the earlier change to the
watch: gh run watch already passes a run that finished successfully
before the watch started, so that change handled no real case.
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 7155c2d Nov 16, 2026
34 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the feat/replace-key-template-args branch November 16, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant