Skip to content

ci,fix: stop drift-to-issue skipped emails; replace log.Fatalf with panic in config init#119

Merged
fullstackjam merged 2 commits into
mainfrom
ci/fix-drift-to-issue-skipped-email
Jun 1, 2026
Merged

ci,fix: stop drift-to-issue skipped emails; replace log.Fatalf with panic in config init#119
fullstackjam merged 2 commits into
mainfrom
ci/fix-drift-to-issue-skipped-email

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

@fullstackjam fullstackjam commented Jun 1, 2026

Summary

  • Move if: conclusion == 'failure' from the job level to the step level in drift-to-issue.yml so the workflow reports success (not skipped) when no failure is detected — GitHub only sends emails on failure, so the skipped-job emails stop
  • Replace log.Fatalf with panic in internal/config/packages.go and internal/config/presets.go init() functions: log.Fatal calls os.Exit(1) which skips all deferred cleanup; panic is the correct primitive for a startup assertion on compiled-in static data that should never fail

Test plan

  • unit (L1) passes on CI
  • lint passes on CI
  • go build ./... + go vet ./... clean locally
  • drift sensors (deadcode, govulncheck, go mod tidy) all pass

log.Fatal calls os.Exit(1) which skips all deferred cleanup. The embedded
YAML cannot fail at runtime (compiled-in), so these are effectively startup
assertions — panic is the right primitive here. Also removes the unused
log import from both files.
When Harness succeeds, the drift-to-issue job was skipped entirely
(job-level if: condition). GitHub treats a workflow where all jobs
are skipped as conclusion=skipped, not success, which triggers
failure notification emails even though nothing is wrong.

Move the condition to the step level so the job always runs and
concludes as success — the actual issue-filing step only fires when
Harness truly fails.
@github-actions github-actions Bot added the ci CI/CD changes label Jun 1, 2026
@fullstackjam fullstackjam merged commit cbd9c21 into main Jun 1, 2026
11 checks passed
@fullstackjam fullstackjam deleted the ci/fix-drift-to-issue-skipped-email branch June 1, 2026 13:49
@fullstackjam fullstackjam changed the title ci: stop skipped-job emails from drift-to-issue workflow ci,fix: stop drift-to-issue skipped emails; replace log.Fatalf with panic in config init Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant