CI status watch - #2091
Conversation
Coverage Report for CI Build 33818955797Coverage increased (+0.02%) to 73.823%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
…1/IDEasy into feature/ci-status-watch
Co-authored-by: quando632 <quang-hieu.do@capgemini.com> Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
There was a problem hiding this comment.
@hohwille as requested, here is the concrete change for the KISS approach report whatever is currently red, every morning, instead of detecting a green→red transition. Four suggestions below, all in ci-status-watch.yml;
One thing worth deciding explicitly rather than leaving it as-is: you wrote "every night", but the cron is 0 7 * * 1-5. Something breaking on Friday evening stays silent until Monday 09:00 CEST. 0 7 * * * would close that gap weekday-only is defensible too, I just don't think it should stay that way by accident. Not included in the suggestions since it's your call.
Thanks for pointing that out. Indeed I did not want to imply a workflow schedule/cron change as we do not work on weekends and need no notification on Saturday/Sunday. So I was just lax/un-precise and you are fully correct. |
Co-authored-by: quando632 <quang-hieu.do@capgemini.com>
hohwille
left a comment
There was a problem hiding this comment.
@quando632 thanks for your constructive review suggestions following my KISS idea that I all applied 👍
I have one last suggestion, I would consider to apply before merge.
Can you quickly double-check that I am not missing something.
Then we finally merge and take this nice feature live.
| # long as it stays red it is reported every morning, so nobody can miss it. | ||
| RED=$(for WF_PATH in $WORKFLOWS; do | ||
| gh run list --repo "$REPO" --workflow "$WF_PATH" --branch "$BRANCH" \ | ||
| --status completed --limit 5 --json conclusion,url,updatedAt,workflowName \ |
There was a problem hiding this comment.
you increased the limit from 2 to 5. However, we only take the first result [0] and ignore the rest anyway.
IMHO the old limit was more reasonable (could be even 1).
| --status completed --limit 5 --json conclusion,url,updatedAt,workflowName \ | |
| --status completed --limit 2 --json conclusion,url,updatedAt,workflowName \ |
There was a problem hiding this comment.
The [0] does not act on the API result but on the filtered array: [ .[] | select(...) ][0] first drops cancelled/skipped runs, then takes the newest of what is left. So --limit controls how far we can look past a streak of cancelled runs, not how many results we use. With --limit 1 a single cancelled run on top hides whatever sits underneath.
Real streaks on main: nightly-build 3 in a row (16 to 18 Dec 2025), integration-tests 4 in a row (9 to 17 Dec 2025). With --limit 2 a red run below either of them would be reported as not red. I chose 5 because it covers the longest streak we have actually seen.
It is also free: gh run list issues the same 2 API requests for --limit 2 and --limit 5.
That it reads the other way means the line needs a comment. A suggestion in this thread would only replace this line, so I put it on the comment block above (lines 39 to 42) as a separate comment.
| # A workflow counts as red if its newest completed run that produced a real result | ||
| # failed; cancelled/skipped runs say nothing about the code and are ignored. This is | ||
| # exactly what the README badge shows. There is no look-back window on purpose: as | ||
| # long as it stays red it is reported every morning, so nobody can miss it. |
There was a problem hiding this comment.
Follow-up to the --limit thread: documenting why the limit is what it is, so the next reader does not read it as dead weight either.
| # A workflow counts as red if its newest completed run that produced a real result | |
| # failed; cancelled/skipped runs say nothing about the code and are ignored. This is | |
| # exactly what the README badge shows. There is no look-back window on purpose: as | |
| # long as it stays red it is reported every morning, so nobody can miss it. | |
| # A workflow counts as red if its newest completed run that produced a real result | |
| # failed; cancelled/skipped runs say nothing about the code and are ignored. This is | |
| # exactly what the README badge shows. There is no look-back window on purpose: as | |
| # long as it stays red it is reported every morning, so nobody can miss it. | |
| # The limit is not about how many runs we evaluate, that is always one. It defines how | |
| # far we can look past a streak of cancelled runs; 5 covers the longest streak seen (4). |
hohwille
left a comment
There was a problem hiding this comment.
@shodiBoy1 thanks for your PR. Great that you could automate this and improve the observer. 👍
I only have a small suggestion. As a quickfix we can update the hardcoded list.
Please also create a new issue that we should create a self-maintained replacement of this hard-coded list. Then we can finally merge. Sorry for the long review delay.
| AdemZarrouki | ||
| Ali-Shariati-Najafabadi | ||
| areinicke | ||
| Caylipp | ||
| hohwille | ||
| JoelAdbu | ||
| KarimALotfy | ||
| laert-ll | ||
| laim2003 | ||
| marceltchanga9 | ||
| maybeec | ||
| oanding-blrng | ||
| Paras14 | ||
| quando632 | ||
| shodiBoy1 | ||
| tineff96 | ||
| vivu001 | ||
| run: | |
There was a problem hiding this comment.
This will be hard to maintain as our team is so volatile.
Would it be possible somehow to get this from the GitHub IDE Group membership or from the board somehow?
For the moment we can also merge with a hard-coded list. Maybe you can update it before I merge.
vivu001. tineff96, areinicke, AdemZarrouki, KarimALofty Caylipp, marceltchanga9, and Paras14 already left.
There are several new members meanwhile.
There was a problem hiding this comment.
i agree, a hardcoded list would be difficult to maintain with a frquently changing team. So i implemented the dynamic option. The workflow gets the Github teams linked to project/5 and uses their current membership. New and departed members are handled automatically.
We only need to link the official IDE team to project/5 if this has not already been done and configure the repo secret 'TEAM_TOKEN' with projects:read and members:read. If the lookup or another API call fails, the workflow fails instead of posting incomplete results. The next run resumes from the last successful run, so no activity is missed.
Updated the list of daily team logins by removing and adding members.
This PR adds ci status watch and external discussion observer workflows
Implemented changes:
ci-status-watch.ymlweekday-morning workflow that lists the workflows currently red onmainand posts them as a single Teams card, so a broken CI is noticed in the Daily. Reports current state (a workflow stays listed until it's green again); creates no issues. Read-only (actions: read).issue-pr-observer.ymlthe daily digest now also reports new external GitHub Discussions (fetched via GraphQL, since they have no REST search). Issues/PRs and discussions are shown as two separate sections in the same card. Each source falls back to empty on error, so a failure in one still posts the other.Testing instructions
TEAMS_WEBHOOK_URLis set (Teams incoming webhook).mainis red, a card with the list appears in Teams; otherwise the run log says all green and nothing is posted.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal