Skip to content

Harden the release preflight, and bring the docs back in line with the tests - #196

Merged
wu-sheng merged 1 commit into
masterfrom
docs-polish-release-5.0.0
Aug 30, 2026
Merged

Harden the release preflight, and bring the docs back in line with the tests#196
wu-sheng merged 1 commit into
masterfrom
docs-polish-release-5.0.0

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

Follow-up to #194 and #195, before 5.0.0 is cut.

Release scripts

The skywalking-swck release script died on git commit with nothing staged — non-zero under set -e, no message. I cross-checked the same class of failure here by running each construct rather than reading it. Three were real:

Construct Behaviour Fix
VERSION=$(grep '^version: ' Chart.yaml | awk …) grep misses → pipefail → set -e kills the assignment silently, and the die below it is unreachable awk, which exits 0 either way
read -r reply in remove_previous exits 1 at EOF → run dies with no output, after the irreversible svn promotion both reads now report why
trap … RETURN in upload_to_svn does not fire when set -e kills the shell mid-function → leaks a temp dir holding the signed artifacts EXIT

Worth noting the first one: false && die "…" as a bare statement does survive set -e, so the tag check was fine — the failure was specific to the assignment. I verified both.

Preflight checks the tools are usable, not just present

Each of these otherwise fails late, at the worst possible point:

  • no gpg secret key → fails after the entire build and package
  • unusable svn credentials → fails after the tag is pushed
  • unauthenticated gh → fails after the svn mv into dist/release, which cannot be undone

Missing tools are now reported in a single message rather than one per run.

The helm gate is 3.8+, not 3.x: 3.8 is where helm push to an oci:// registry landed, and the chart ships only as an OCI artifact. Helm 4 is accepted — Chart.yaml is apiVersion: v2. I confirmed that by running dep up (including the OCI pull of banyandb-helm 0.7.0), package, lint and template through helm 4.1.1; all six storage permutations render, rc=0.

Ordering matters in one spot: the check for a half-finished svn upload runs only after reachability is established, because an auth failure and a not-yet-uploaded version produce the same non-zero exit.

Docs

  • contributing/e2e-tests.md described five cells including two OAP 10.4 ones. There are four, all OAP 11 — and the fourth, the config-override cell, was undocumented. Rewritten, with an explicit note that the 10.4 combination is documented but not verified.
  • Removed two orphaned expectation files (horizon-admin-readonly.yml, horizon-templates-readonly.yml) that no cell referenced.
  • changes/changes.md predated Configure Horizon and OAP by environment variable, mount a file only on request #195: it described the pre-Configure Horizon and OAP by environment variable, mount a file only on request #195 ui.config model, omitted oap.extraEnv / oap.envFromSecret, and — most significantly — never mentioned that the SWCK charts were removed, which is the most disruptive change in 5.0.0.
  • Documented the new preflight checks and the reasoning about when they fail.

Verified: all internal links resolve, menu.yml matches the tree, every e2e YAML parses, helm lint passes.

…e tests

The swck release script died on `git commit` with nothing staged: non-zero under
`set -e`, no message. Cross-checking the same class of failure here found three,
each verified by running the construct rather than reading it:

- `VERSION=$(grep '^version: ' Chart.yaml | awk ...)` aborts silently when the
  grep misses -- pipefail promotes it, `set -e` kills the assignment, and the
  `die` below it is unreachable. Now `awk`, which exits 0 either way.
- `read -r reply` in `remove_previous` exits 1 at EOF, killing the run with no
  output -- after the irreversible svn promotion. Both reads now say why.
- the `RETURN` trap in `upload_to_svn` does not fire when `set -e` kills the
  shell mid-function, leaking a temp dir holding the signed artifacts. Now EXIT.

Preflight also checks that the tools are usable, not merely present, because
each of these otherwise fails late: no gpg secret key fails after the whole
build, unusable svn credentials after the tag is pushed, and an unauthenticated
`gh` after the svn promotion that cannot be undone. Missing tools are reported
in one message. The helm gate is 3.8+ rather than 3.x -- 3.8 is where `helm push`
to an oci:// registry landed, and helm 4 reads apiVersion v2 charts fine, which
was confirmed by running dep up, package, lint and template through it.

The svn existence check for a half-finished upload runs only after reachability
is established: an auth failure and a not-yet-uploaded version are the same
non-zero exit, so the order is what makes the check mean anything.

On the docs side, `e2e-tests.md` described five cells including two OAP 10.4
ones. There are four, all OAP 11, and the fourth -- the config-override cell --
was undocumented. Its two expectation files were orphaned; they are removed.
The 5.0.0 changelog predated the env-first configuration work, and never
mentioned that the SWCK charts were removed at all.
@wu-sheng wu-sheng added this to the 5.0.0 milestone Aug 30, 2026
@wu-sheng
wu-sheng merged commit d5749a1 into master Aug 30, 2026
5 checks passed
@wu-sheng
wu-sheng deleted the docs-polish-release-5.0.0 branch August 30, 2026 13: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.

2 participants