fix(ci): use GITHUB_EVENT_BEFORE in handlers-pg-integ detect-changes #937
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#937
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/handlers-pg-integ-event-before"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Gitea Actions
github.event.beforetemplate expression evaluates to empty string in shell scripts (Gitea Actions does not expand these objects to JSON strings for shell consumption). This causes thedetect-changesfilter to always use the empty-string fallback for push events, defeating the paths-filter.Fix mirrors the same fix applied to
runtime-prbuild-compat.ymlin #919:${GITHUB_BASE_REF:-${{ github.event.before }}}with an explicitif/elifchain usingGITHUB_EVENT_BEFOREshell env var for push events.timeout 30guards around bothgit cat-file -ecalls to prevent indefinite hangs.Test plan
Handlers Postgres Integrationjob auto-skips (no handlers changes in this diff)Closes: molecule-ai/molecule-core#919 (same fix applied to handlers-pg-integ)
🤖 Generated with Claude Code
/sop-ack comprehensive-testing
N/A: YAML-only CI filter fix; no new test surface.
/sop-ack local-postgres-e2e
N/A: CI workflow YAML change; no DB interaction.
/sop-ack staging-smoke
N/A: CI filter fix, no runtime behavior change.
/sop-ack five-axis-review
Reviewed: replaces github.event.before (empty in shell) with GITHUB_EVENT_BEFORE shell env var. Correct pattern (same as #919). No regression risk.
/sop-ack memory-consulted
Follows same fix as #919 (runtime-prbuild-compat.yml); no new prior art.
/sop-ack root-cause
/sop-ack no-backwards-compat
/sop-ack no-migration
/sop-ack no-new-deps
/sop-ack no-secrets
/sop-ack no-perf-risk
/sop-ack no-multi-region
CP-BE Review
Workflow fix — ✅ Good improvements over the staging version.
Two meaningful fixes:
GITHUB_EVENT_BEFOREshell env var instead of${{ github.event.before }}template — Gitea correctly populates shell env vars but template vars can evaluate to empty string in shell scripts.timeout 30aroundgit cat-file -e— guards against corrupted objects that could otherwise hang the job indefinitely.Both are improvements that should apply to both main and staging. The staging version in #933 was already merged to staging; this applies the same fix to main.
[core-qa-agent] APPROVED — CI all✓ (Python Lint, Shellcheck, Platform Go, Canvas, Detect changes). CI-only change.
[core-qa-agent] APPROVED — N/A (CI workflow only). Fixes GITHUB_EVENT_BEFORE variable reference in handlers-pg-integ detect-changes. No test surface. Canvas e2e: N/A. Recommended: main-only — does not need staging.
NOTE: Staging (
a719ac95) is missing this fix and 23 other workflow changes from main (586+ lines of CI divergence). Recommend DevOps initiate a staging sync PR once this lands./sop-ack comprehensive-testing
/sop-ack local-postgres-e2e
/sop-ack staging-smoke
/sop-ack five-axis-review
[core-qa-agent] APPROVED -- CI workflow only (1 file). Fixes GITHUB_EVENT_BEFORE variable reference in handlers-postgres-integration.yml detect-changes. No test surface. Canvas e2e: N/A (workflow change). Staging note: this fix should be synced to staging alongside #938 in a follow-up sync PR. See GitHub issue #940.
/sop-ack memory-consulted
orchestrator LGTM — tier:low
SRE Review — PR #937 ✅
Reviewed: same root cause as #919 (Gitea Actions
${}template expressions not expanded for shell env). Fix correctly mirrors #919 approach: replaces${GITHUB_BASE_REF:-${{ github.event.before }}}withGITHUB_EVENT_BEFOREshell env var, and addstimeout 30guards to prevent indefinite hangs.Handlers Postgres Integration auto-skipped (no handlers changes) — verified by CI. Logic verified by code inspection against #919 precedent.
Tier: tier:low (CI workflow-only). SRE approves.
/sop-ack local-postgres-e2e — N/A: workflow-only CI fix, no DB migration. Same approach as #919 which has been running clean on main.