Compare commits
1 Commits
fix/race-i
...
feat/adr-0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eb69f2709 |
@@ -299,11 +299,10 @@ jobs:
|
||||
# Check for version bump on main branch
|
||||
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||
echo "🔖 Checking for version bump..."
|
||||
# Read commit message from git, NOT from the workflow event payload.
|
||||
# The event-payload expression is interpolated literally into the
|
||||
# rendered script (even inside comments — see PR #38 + #46), so any
|
||||
# backtick / unbalanced quote / multi-line body breaks bash parsing.
|
||||
# git log is interpolation-free and safe.
|
||||
# Always read from git log: ${{ github.event.head_commit.message }} expression
|
||||
# is interpolated literally into the shell script, so any backtick, unbalanced
|
||||
# quote, or special char in a commit body breaks the next line of the script
|
||||
# (observed on PR #32-#35: 'syntax error: unexpected newline'). git log is safe.
|
||||
COMMIT_MSG=$(git log -1 --pretty=%B)
|
||||
./scripts/ci-version-bump.sh "$COMMIT_MSG" --no-push
|
||||
fi
|
||||
|
||||
@@ -730,14 +730,11 @@ func (c *Config) WatchAndApply(ctx context.Context) {
|
||||
// Stop the watcher on context cancel — we set a flag that the
|
||||
// OnConfigChange handler checks, avoiding the race with viper's
|
||||
// internal state that would occur if we called OnConfigChange again.
|
||||
// We deliberately do NOT log here: viper's internal watcher goroutine
|
||||
// has no public Stop, so it can outlive ctx, and a zerolog call here
|
||||
// would race with the next test's LoadConfig → SetupLogging →
|
||||
// zerolog.SetGlobalLevel under -race (observed 2026-05-05).
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
c.reloadMu.Lock()
|
||||
c.watcherStopped = true
|
||||
c.reloadMu.Unlock()
|
||||
log.Info().Msg("Config hot-reload watcher stopped")
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user