Skip to content

Fix glossary reminder guard so the Slack post is skipped on non-Thursdays - #726

Open
amanbn8 wants to merge 1 commit into
cncf:mainfrom
amanbn8:fix/glossary-reminder-guard
Open

amanbn8 wants to merge 1 commit into
cncf:mainfrom
amanbn8:fix/glossary-reminder-guard

Conversation

@amanbn8

@amanbn8 amanbn8 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Glossary WG Slack reminder posted on Thu Jan 22 and Fri Jan 23 2026 (both at 00:15 UTC), and the workflow has been disabled since. Two things in the workflow cause that:

  1. The guard step ends with exit 0 when it is not the 4th Thursday. That only ends the guard step; the job keeps going and the "Post message to Slack" step runs anyway. So every scheduled run posts, whatever the date.
  2. The cron 0 0 22-28 1,3,5,7,9,11 4 restricts both day-of-month and day-of-week. cron ORs those two fields when both are set, so the schedule fires on every day from the 22nd to the 28th and on every Thursday of the month. That is why there was a run on Friday the 23rd for the guard to (fail to) stop.

Fix

  • The guard now writes post=true|false to $GITHUB_OUTPUT, and the Slack step is gated with if: github.event_name == 'workflow_dispatch' || steps.guard.outputs.post == 'true'. Manual runs keep posting unconditionally, as they did before.
  • The weekday is dropped from the cron, so the schedule only fires on the 22nd–28th of the meeting months and the guard selects the Thursday.
  • The day of month is parsed in base 10. [[ "08" -lt 22 ]] is an error in bash (value too great for base), which would fail the guard under set -e on a manual run on the 8th or 9th.

Everything stays in UTC, which matches the meeting (fixed at 00:00 UTC), so there is no DST drift. That was the concern raised on #162.

Testing

I ran the guard's run: block with date stubbed for a set of dates and checked $GITHUB_OUTPUT:

Date Output
Thu 22 (the correct Jan 22 run) post=true
Fri 23 (the wrong Jan 23 run) post=false
Thu 24, Thu 28 post=true
Tue 22, Thu 21, Thu 29 post=false
Thu 08, Thu 09 post=false, no bash error

The workflow is currently disabled in the Actions tab (disabled_manually, 2026-01-23), so it will need to be re-enabled after this merges. The next scheduled window is Thu Nov 26 2026.

Fixes #153

…days

The "Guard: only run on 4th Thursday" step ended with `exit 0` when the
date did not match. That only ends the guard step; the job continues and
the "Post message to Slack" step still runs. This is why the reminder was
posted on both Thu Jan 22 and Fri Jan 23 2026 (00:15 UTC), after which the
workflow was disabled.

The cron also listed a weekday (`4`) together with a day-of-month range.
cron ORs those two fields when both are restricted, so the schedule fired
on every day 22-28 and additionally on every Thursday of the month, which
is what put the guard on the critical path in the first place.

- Make the guard write `post=true|false` to `$GITHUB_OUTPUT` and gate the
  Slack step on `steps.guard.outputs.post == 'true'`. Manual
  `workflow_dispatch` runs keep posting unconditionally, as before.
- Drop the weekday from the cron so the schedule only fires on the 22nd-28th
  of the meeting months; the guard picks the Thursday.
- Parse the day of month in base 10 so `08`/`09` are not treated as octal
  by `[[ ... -lt ... ]]` (which would fail the step under `set -e` on a
  manual run on those days).

The schedule stays in UTC to match the meeting, which is fixed at 00:00
UTC.

Fixes cncf#153

Signed-off-by: Aman Bansal <amanbn@icloud.com>
@amanbn8

amanbn8 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

/kind bug
/area ci

@github-actions github-actions Bot added kind/bug Bug or issue area/ci CI/CD infrastructure and automation needs-priority Indicates an issue or PR missing a priority label needs-status Indicates an issue or PR missing a status label kind/github-actions This repository's workflows, reusable actions, and GitHub Actions tooling labels Oct 2, 2026
@github-actions
github-actions Bot requested review from jeefy and mfahlandt October 2, 2026 07:47
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign idvoretskyi after the PR has been reviewed.
You can assign the PR to them by writing /assign @idvoretskyi in a comment when ready.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jeefy
jeefy requested a balanced review from Copilot October 8, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused workflow changes address unintended posts, preserve manual behavior, and have no unresolved findings.

0 open findings

What changed in this PR

Fixes the Glossary WG Slack reminder so scheduled runs post only on the fourth Thursday of meeting months, while preserving manual posting and UTC timing.

Changes:

  • Removes the weekday restriction from cron to avoid extra runs.
  • Gates Slack posting on the guard’s output, except for manual runs.
  • Parses day-of-month values in base 10.
File Description
.github/​workflows/​scheduled-slack-glossary-maintainers.yaml Corrects scheduling, guard output, and Slack posting conditions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD infrastructure and automation kind/bug Bug or issue kind/github-actions This repository's workflows, reusable actions, and GitHub Actions tooling needs-priority Indicates an issue or PR missing a priority label needs-status Indicates an issue or PR missing a status label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack scheduled message: CNCF Glossary WG reminder workflow timing incorrect

2 participants