Skip to content

Commit 18f8f1b

Browse files
SK-2967 trim verbose comments in the release workflows
Cuts the incident narratives down to the constraint each one exists to protect, 86 comment lines to 36. Every non-comment line is byte-identical to before - verified by stripping comments and blanks from both sides. Also removes a duplicated comment above the fixtures step that had become wrong: it described a glob-based implementation while the step uses a hardcoded module list.
1 parent 2d54cf9 commit 18f8f1b

3 files changed

Lines changed: 27 additions & 77 deletions

File tree

‎.github/workflows/internal-release.yml‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
name: Publish module to the JFROG Artifactory
22
on:
33
push:
4-
# '**' not '*.*': GitHub Actions glob '*' does not match '/', so the old
5-
# '*.*' pattern failed to ignore slash-containing tags like
6-
# 'flowvault/v1.0.0' - a public release tag would also fire this internal
7-
# workflow (and, since the ref isn't a flowvault-release/* branch,
8-
# resolve-module fell through to skyvault, publishing the wrong module).
9-
# '**' matches every tag, so this stays strictly branch-triggered.
4+
# '**' not '*.*': Actions glob '*' does not match '/', so '*.*' let slash
5+
# tags (flowvault/v1.0.0) through and fired this branch-only workflow.
106
tags-ignore:
117
- '**'
128
paths-ignore:
@@ -20,25 +16,14 @@ on:
2016
jobs:
2117
resolve-module:
2218
runs-on: ubuntu-latest
23-
# Skip this workflow's own version-bump commit, or the release loops:
24-
# bump -> push -> release -> bump -> ...
25-
#
26-
# The bump is force-pushed using PAT_ACTIONS, and PAT-authenticated pushes
27-
# DO trigger workflows - GITHUB_TOKEN pushes deliberately do not. So this
28-
# guard only becomes load-bearing once the PAT is wired up correctly, which
29-
# is why the loop appeared the moment that was fixed. It existed on the v3
30-
# branch and was lost in the modularization; without it the workflow
31-
# re-fires roughly every 30 seconds indefinitely.
32-
#
33-
# build-and-deploy needs this job, so skipping here skips the whole run.
19+
# Skip our own bump commit, or this loops: bump -> push -> release -> bump.
20+
# PAT-authenticated pushes DO trigger workflows; GITHUB_TOKEN pushes do not.
21+
# build-and-deploy needs this job, so skipping here skips the run.
3422
if: ${{ !contains(github.event.head_commit.message, '[AUTOMATED]') }}
3523
outputs:
3624
module: ${{ steps.set-module.outputs.module }}
3725
steps:
38-
# Matched explicitly rather than with an if/else that defaults to one
39-
# module. A catch-all else is how a flowvault tag previously ended up
40-
# publishing skyvault: anything unrecognised silently became skyvault.
41-
# An unmatched branch now fails instead of guessing.
26+
# Explicit match, no catch-all: defaulting once published the wrong module.
4227
- name: Resolve module from branch name
4328
id: set-module
4429
env:

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
name: Public release
22

3-
# Triggered by publishing a GitHub Release (the UI flow), not by a raw tag push.
3+
# Triggered by publishing a GitHub Release, not a raw tag push: the Release
4+
# carries both facts needed here - target_commitish (the branch picked in the
5+
# UI; a tag records only a commit) and tag_name (module prefix + version).
46
#
5-
# That matters because a Release carries both facts this pipeline needs, and a
6-
# bare tag carries neither reliably:
7-
# - target_commitish : the branch selected in the release UI. A git tag records
8-
# only a commit, never a branch, so this previously had to
9-
# be guessed by matching a branch tip to the tagged commit.
10-
# That guess failed whenever the tip moved on (re-runs always failed) and
11-
# silently picked an unrelated branch when several shared a tip.
12-
# - tag_name : carries the module prefix and the version.
13-
#
14-
# Beta and final releases share this one workflow: 'release' events cannot be
15-
# filtered by tag pattern, so two workflows would both fire on every release.
16-
# They also behaved identically in shared-build-and-deploy.yml, so nothing is
17-
# lost by merging them - only the reported tag type differs.
7+
# Beta and final share this workflow - 'release' events cannot be filtered by
8+
# tag pattern, and both behaved identically downstream. Kind comes from the tag.
189

1910
on:
2011
release:
@@ -46,8 +37,7 @@ jobs:
4637
VERSION="${TAG#*/}" # flowvault/v1.0.0 -> v1.0.0
4738
VERSION="${VERSION#v}" # v1.0.0 -> 1.0.0
4839
49-
# Tag prefix -> module directory. Both now match the directory name
50-
# directly, since v2/ was renamed to skyvault/.
40+
# Tag prefix -> module directory (both match the directory name).
5141
case "$PREFIX" in
5242
flowvault) MODULE="flowvault" ;;
5343
skyvault) MODULE="skyvault" ;;

‎.github/workflows/shared-build-and-deploy.yml‎

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ on:
8787
test-reusable-token:
8888
required: true
8989

90-
# Reusable workflows do NOT inherit the caller's secrets: anything referenced below must be
91-
# declared here AND passed by every caller, otherwise it silently resolves to an empty string.
92-
# An empty `token:` is what made actions/checkout fail with
93-
# "Error: Input required and not supplied: token".
90+
# Reusable workflows do NOT inherit caller secrets: anything used below must
91+
# be declared here AND passed by every caller, or it resolves to "" silently.
9492
pat-actions:
9593
required: true
9694

@@ -104,10 +102,8 @@ jobs:
104102
- uses: actions/checkout@v2
105103
with:
106104
fetch-depth: 0
107-
# PAT of the skyflow-service-it admin service account. Persisted by
108-
# checkout and reused for the automated version-bump push below, so
109-
# that push satisfies the branch-protection ruleset's repo-admin
110-
# bypass (github-actions[bot] is not a bypass actor). See SK-2986.
105+
# Admin service-account PAT: persisted by checkout and reused for the
106+
# version-bump push, which needs the ruleset's admin bypass. SK-2986.
111107
token: ${{ secrets.pat-actions }}
112108

113109
- name: Set up maven or jfrog repository
@@ -142,18 +138,10 @@ jobs:
142138
with:
143139
fallback: 1.0.0
144140

145-
# Version resolution, in priority order:
146-
# 1. inputs.version - set by beta/public callers, which parse it out
147-
# of a <module>/v<semver> tag (the tag text itself isn't a valid
148-
# Maven version, so it can't be used directly).
149-
# 2. internal - reads the module's OWN committed pom. Git tags are a
150-
# flat, repo-wide namespace with no module awareness, so a tag
151-
# lookup cannot tell one module's version lineage from another's:
152-
# it stamped a v3 tag (3.0.0-beta.13) onto both flowvault AND skyvault
153-
# internal builds. A module's own pom is inherently per-module.
154-
# 3. Fallback - previoustag. Now unreachable in practice: all three
155-
# callers either set inputs.version (release.yml, beta-release.yml)
156-
# or are internal (internal-release.yml). Kept as a safety net.
141+
# Version priority: inputs.version (beta/public, parsed from the tag) >
142+
# the module's own pom (internal) > previoustag (unreachable; a safety net).
143+
# Tags are a flat repo-wide namespace with no module awareness, which is why
144+
# internal reads the pom - a tag lookup stamped a v3 version onto every module.
157145
- name: Bump Version
158146
id: bump-version
159147
run: |
@@ -184,9 +172,8 @@ jobs:
184172
185173
git add ${{ inputs.module }}/pom.xml
186174
187-
# Nothing staged means the pom already held this version - the normal
188-
# case when someone correctly sets it before tagging. That is success,
189-
# not failure; a bare 'git commit' would exit 1 and abort the release.
175+
# Nothing staged = pom already at this version (normal if set before
176+
# tagging). That is success; a bare 'git commit' would exit 1 here.
190177
if git diff --cached --quiet; then
191178
echo "::notice::pom already at the target version - nothing to commit"
192179
exit 0
@@ -224,12 +211,6 @@ jobs:
224211
name: "credentials.json"
225212
json: ${{ secrets.test-credentials-file-string }}
226213

227-
# Tests load these with Dotenv.load()/relative paths, which resolve
228-
# against the *module* directory - Maven runs each module's tests with
229-
# that module as the working dir. A repo-root .env was correct when this
230-
# was a single-module build, but since the common/skyvault/flowvault split it
231-
# leaves module tests unable to find their config. Discovered by glob so
232-
# this survives module renames/additions.
233214
- name: Distribute test fixtures to modules
234215
run: |
235216
# Surefire runs each module's tests with the module directory as the working
@@ -239,18 +220,12 @@ jobs:
239220
cp credentials.json "$module/credentials.json"
240221
done
241222
242-
# 'verify' rather than 'deploy' for a dry run: the deploy plugin (and
243-
# the central-publishing extension bound to it) is never invoked at
244-
# all, so there is no upload path to accidentally leave enabled.
245-
# Everything up to and including packaging, tests and GPG signing
246-
# still runs, so this exercises the same build the real release would.
223+
# Dry run uses 'verify', not 'deploy', so the deploy plugin and the
224+
# central-publishing extension are never invoked at all.
247225
#
248-
# Javadoc is skipped for internal (JFrog) builds only: these are dev
249-
# snapshots that nobody browses docs for, and strict doclint on the
250-
# pinned JDK 11 fails the release on HTML nits in comments. Beta/public
251-
# must NOT skip it - Sonatype requires the -javadoc.jar and rejects a
252-
# bundle without one, so a doclint error there is a real break to fix
253-
# at the source.
226+
# Javadoc is skipped for internal builds only - doclint on JDK 11 fails on
227+
# comment nits. Beta/public must NOT skip it: Sonatype rejects a bundle
228+
# with no -javadoc.jar.
254229
- name: Publish package
255230
run: |
256231
if [[ "${{ inputs.dry-run }}" == "true" ]]; then

0 commit comments

Comments
 (0)