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 code coverage and matrix filters to omni action #2151

Merged
merged 3 commits into from
May 15, 2021

Conversation

sehrope
Copy link
Member

@sehrope sehrope commented May 13, 2021

Adds action inputs to customize gradle arguments and filter the generated matrix.

Also adds uploading of code coverage step at the end of the omni ci action. It's set to execute only if the gradle args actually include jacoco. Code coverage is enabled by default so the daily scheduled executions should give us a nice history as well.

By default the matrix filters allow the entire matrix as it's intended to be executed once per day on the full set. Manual dispatches to start the omni action can filter whatever subset they want:

omni-ci-filter-matrix

This let's you do things like "Only run on PG version 11", "Only run on JDK version 11", or "Only run on Zulu with SCRAM disable".

matrix_jdk_distribution:
description: JDK Distribution (adopt, zulu, ...)
required: false
default: "*"
Copy link
Member

Choose a reason for hiding this comment

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

what does * mean here, all of the distros ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Empty string or "*" (star) match everything for any filter. I added the star value as it looks a bit cleaner in the UI.

@sehrope
Copy link
Member Author

sehrope commented May 13, 2021

@vlsi
Copy link
Member

vlsi commented May 13, 2021

@sehrope , what do you think of adding a hard limit on the number of scheduled jobs? For instance, 10-20.

@sehrope
Copy link
Member Author

sehrope commented May 13, 2021

@vlsi I'm against it because this thing is only running once a day or manually anyway. In either case we want the entire thing to run. Plus thanks to tweaking the test configs the total runtime is only 20 min anyway.

@davecramer
Copy link
Member

20 min is amazing. I would have expected longer. If this is the case then I'm fine with it

@vlsi
Copy link
Member

vlsi commented May 14, 2021

What is the total CI time the thing burns for one execution?

@sehrope
Copy link
Member Author

sehrope commented May 14, 2021

It averages about 6-8 min per combination depending on options of which there's currently 27. With GitHub action parallel job execution the automated run from this morning took 17 min of wall time: https://github.com/pgjdbc/pgjdbc/actions/runs/841251297

For comparison, that's less wall time than the current main.yml action which one runs once per PR push. Total execution time is just about twice as much (189m for omni vs 91 for the most recent main). And this is once per day or manually triggered so even if it were to take longer it'd be fine as it's meant to be a more comprehensive test.

If we get notified that it's too much CI usage then we can address it then. I doubt that it's an issue though as I've seen significantly more expansive workflow usage on other projects and this is only daily anyway.

@vlsi
Copy link
Member

vlsi commented May 14, 2021

Just in case, GitHub provides 2000 free CI minutes per month.
If a single job takes 6 minutes, and "omni" fires 27 jobs, then single execution consumes 162min which is 8% of the monthly limit.

Per-minute rate is $0.008 Linux which yields 162*0.008 = $1.3 per single execution.

Even though we do not push that often yet, I would like to avoid a case when "omni" burns all the CI time in a matter of couple executions.

@sehrope
Copy link
Member Author

sehrope commented May 14, 2021

There's no limit for public repos. That "2000 free CI minutes" is for private repos: https://docs.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions

GitHub Actions usage is free for both public repositories and self-hosted runners. For private repositories, each GitHub account receives a certain amount of free minutes and storage, depending on the product used with the account. Any usage beyond the included amounts is controlled by spending limits.

If there were a limit we would have hit it already as the per-PR push action uses 90+m per push and we've clearly had more than 23 pushes in a 30-day period.

In the off chance they do start enforcing a FOSS public repo limit I think we'll still be fine as I bet they'd grant an exception for the most popular driver for the world's most powerful open source database 😄.

@sehrope sehrope merged commit 02235d2 into pgjdbc:master May 15, 2021
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

3 participants