fix(ci): stop pgvector-embedded rebuild firing on every release tag#1051
Conversation
The push trigger used a bare paths filter, which GitHub ignores for freshly-created refs (it can't diff them). So every release-please tag (lobu-vX.Y.Z) ran the rebuild and, because the binaries aren't byte-reproducible, opened a no-op 'rebuild artifacts' PR each release (#972, #974, #975, #977, #979, #980, #981, #996, #1002, #1005, #1025, #1029). Scope the push trigger to branches: [main] so tag refs no longer match, and drop the workflow file from paths (only build.sh changes the artifacts). workflow_dispatch still covers deliberate pgvector/PG bumps.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pgvector-embedded build workflow's Changespgvector-embedded build trigger refinement
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
bug_free 92, simplicity 96, slop 0, bugs 0, 0 blockers Read local diff and logs: typecheck, unit, and integration all exited 0. Exploratory: ran actionlint on .github/workflows/build-pgvector-embedded.yml; no issues reported. Change is limited to scoping the pgvector artifact workflow push trigger to main/build.sh. Full verdict JSON{
"bug_free_confidence": 92,
"bugs": 0,
"slop": 0,
"simplicity": 96,
"blockers": [],
"change_type": "fix",
"behavior_change_risk": "low",
"tests_adequate": true,
"suggested_fixes": [],
"notes": "Read local diff and logs: typecheck, unit, and integration all exited 0. Exploratory: ran actionlint on .github/workflows/build-pgvector-embedded.yml; no issues reported. Change is limited to scoping the pgvector artifact workflow push trigger to main/build.sh.",
"categories": {
"src": 0,
"tests": 0,
"docs": 0,
"config": 0,
"deps": 0,
"migrations": 0,
"ci": 10,
"generated": 0
}
}Local review gate — branch protection can require the |
Problem
The
build-pgvector-embeddedworkflow opened a "rebuild prebuilt artifacts" PR on every release — #972, #974, #975, #977, #979, #980, #981, #996, #1002, #1005, #1025, #1029.Two compounding causes:
pushtrigger fired on release tags. It used a barepathsfilter (nobranches). GitHub can't compute a file diff for a freshly-created ref, so it ignorespathsand runs the workflow anyway. Every release-please tag (lobu-vX.Y.Z) therefore kicked off a full rebuild. Verified: the commit behind chore(pgvector-embedded): rebuild prebuilt artifacts (v0.8.1) #1029 (d75d07ab, the 9.3.0 release) touches neitherbuild.shnor the workflow file, yet the run fired.open-prjob only opens a PR when the rebuilt artifacts differ (git diff --cached --quiet). They differ every time — embedded timestamps/paths in the compiled.so/.dylib— so each tag-triggered rebuild produced a real (but meaningless) diff and a PR.Fix
pushtrigger tobranches: [main]so tag refs no longer match.paths— onlybuild.shaffects the artifacts, and this also stops the workflow self-triggering when its own YAML is edited (e.g. this PR).workflow_dispatchstill covers the only times a rebuild is actually wanted: a deliberate pgvector version or PG major bump.The vendored binaries stay committed and shipped — they're the pgvector extension that vanilla
embedded-postgreslacks, required for vector search inlobu run. This only stops the automatic rebuild on release.Follow-up (not in this PR)
Making the pgvector build reproducible (
SOURCE_DATE_EPOCH,-ffile-prefix-map, deterministic strip) would let even a deliberatebuild.sh-change rerun no-op when nothing meaningful changed. Optional hardening.Test
YAML validates (
yaml.safe_load). Behavior change is in event filtering only — no build-step changes.Summary by CodeRabbit