Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub action for posting daily CI summary #3126

Merged
merged 2 commits into from Apr 25, 2021
Merged

Add GitHub action for posting daily CI summary #3126

merged 2 commits into from Apr 25, 2021

Conversation

svenklemm
Copy link
Member

@svenklemm svenklemm commented Apr 16, 2021

This patch adds a GitHub action that posts all failed CI jobs in
the last 24 hours with link to the failed job.

Disable-check: commit-count

@svenklemm svenklemm requested a review from a team as a code owner April 16, 2021 23:30
@svenklemm svenklemm requested review from pmwkaa, mfundul and gayyappan and removed request for a team April 16, 2021 23:30
@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #3126 (909d8ed) into master (e7ffedb) will increase coverage by 0.05%.
The diff coverage is n/a.

❗ Current head 909d8ed differs from pull request most recent head 53e181c. Consider uploading reports for the commit 53e181c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3126      +/-   ##
==========================================
+ Coverage   90.24%   90.29%   +0.05%     
==========================================
  Files         215      215              
  Lines       35360    35254     -106     
==========================================
- Hits        31911    31834      -77     
+ Misses       3449     3420      -29     
Impacted Files Coverage Δ
src/loader/bgw_message_queue.c 84.51% <0.00%> (-2.59%) ⬇️
src/loader/bgw_launcher.c 89.50% <0.00%> (-2.47%) ⬇️
src/sort_transform.c 87.58% <0.00%> (-2.07%) ⬇️
tsl/src/fdw/deparse.c 63.73% <0.00%> (-1.68%) ⬇️
tsl/src/nodes/skip_scan/planner.c 94.44% <0.00%> (-0.97%) ⬇️
tsl/src/dist_util.c 91.94% <0.00%> (-0.68%) ⬇️
src/cache.c 89.62% <0.00%> (-0.16%) ⬇️
src/planner.c 93.51% <0.00%> (-0.06%) ⬇️
tsl/src/remote/dist_ddl.c 98.66% <0.00%> (-0.02%) ⬇️
src/process_utility.c 93.85% <0.00%> (-0.02%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7ffedb...53e181c. Read the comment docs.

# run daily 8:00 CET on master branch
- cron: '0 7 * * *'
jobs:
build_summary:
Copy link
Contributor

Choose a reason for hiding this comment

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

If I am not mistaken, this will run on every fork of this repo, including our private one.

We've seen issues with this previously, where we have a lot of runs on the private repo that eats into our credits. We also don't want other forks to run this so should add some type of conditional:

https://github.community/t/do-not-run-cron-workflows-in-forks/17636

Copy link
Contributor

Choose a reason for hiding this comment

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

We have cron jobs with the same setup, which runs every night and it doesn't run on forks. According to the documentation:

Scheduled workflows run on the latest commit on the default or base branch.

So I don't see an issue.

@@ -0,0 +1,61 @@
#!/usr/bin/python3

from datetime import datetime
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add basic unit tests for this code similar to what we have for the Git hooks: https://github.com/timescale/timescaledb/blob/master/scripts/githooks/commit_msg_tests.py

Otherwise, there's a lot of Python code to "just trust" here.

Copy link
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

LGTM, but you need to make sure that it only runs on the master branch.

@k-rus
Copy link
Contributor

k-rus commented Apr 23, 2021

LGTM, but you need to make sure that it only runs on the master branch.

@mkindahl It runs only on the master/default branch. From docs:

Scheduled workflows run on the latest commit on the default or base branch.

@svenklemm svenklemm force-pushed the ci_summary branch 2 times, most recently from 02cb017 to 9f642ed Compare April 23, 2021 12:44
The patch removes the Slack notification of individual workflows
in favor of the Slack summary message
This patch adds a GitHub action that posts all failed CI jobs in
the last 24 hours with link to the failed job.
@svenklemm svenklemm merged commit ec733de into master Apr 25, 2021
@svenklemm svenklemm deleted the ci_summary branch April 25, 2021 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants