vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.7k stars 2.1k forks source link

Do not use `gh-hosted-runners-16cores-1` runners on forks #17237

Open arthurschreiber opened 6 days ago

arthurschreiber commented 6 days ago

Description

We (GitHub) and other members of the community maintain our own Vitess fork. We rely on the CI builds to ensure that when we backport changes into our fork, we don't introduce any bugs or other issues.

We only have access to the "normal" runner types, and don't have access to gh-hosted-runners-16cores-1, which is specific to the vitessio organization and I guess is provided by CNCF.

By checking whether a workflow runs in the scope of the vitessio organization, and then deciding between gh-hosted-runners-16cores-1 or the regular ubuntu-latest runners, we can allow workflows to run in forks of the vitess repo as well.

cc @timvaillancourt as you might be interested in this as well.

I'd like to see this backported in all supported branches, as this will make my live considerably easier without having any real impact on the upstream Vitess repository. 😅

Related Issue(s)

N/A

Checklist

Deployment Notes

vitess-bot[bot] commented 6 days ago

Review Checklist

Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.

General

Tests

Documentation

New flags

If a workflow is added or modified:

Backward compatibility

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.40%. Comparing base (3499a77) to head (4110979). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #17237 +/- ## ========================================== + Coverage 67.39% 67.40% +0.01% ========================================== Files 1570 1570 Lines 252903 252912 +9 ========================================== + Hits 170451 170485 +34 + Misses 82452 82427 -25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timvaillancourt commented 2 days ago

cc @timvaillancourt as you might be interested in this as well.

@arthurschreiber thanks, I was thinking of adding the same - we have to patch this manually, as I suspect you're doing

This gave me an idea, would it make things easier for the upstream repo if gh-hosted-runners-16cores-1 was a GitHub action variable/secret? Or if this selection was triggered by the existence of it? 🤔

arthurschreiber commented 2 days ago

This gave me an idea, would it make things easier for the upstream repo if gh-hosted-runners-16cores-1 was a GitHub action variable/secret? Or if this selection was triggered by the existence of it? 🤔

Not sure if that makes it easier. I doubt the value of this changes often, and putting it into a variable / secret just adds another step? But @frouioui and others might have a different opinion.

frouioui commented 2 days ago

@timvaillancourt, I agree with @arthurschreiber, I feel like having an environment variable would make it more complicated as new forks will have to figure out they need to set one. We could have a default value, but if we change it upstream, forks using the environment variable will have to be up-to-date with what the recommended OS is.

timvaillancourt commented 1 day ago

We'll be fine continuing to patch, but on our fork we use neither gh-hosted-runners-16cores-1 or ubuntu-latest as the runner name/group

EDIT/context: we run a paid GitHub Actions runner that made our CI much more stable (vs free public tier)