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

chore(ci): extract reusable workflows #3724

Merged
merged 6 commits into from
Mar 16, 2023
Merged

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented Mar 14, 2023

What this PR does / why we need it:

Extracts parts of the existing workflows that are repeated across some of them (e.g. _test_reports.yaml), or encapsulates more complex parts into their own workflow so that they're easier to reason about in isolation (e.g. _integration_tests.yaml).

All of the workflows that are extracted as reusable are named following the _name.yaml pattern to make them easily distinguishable.

Runs of the affected top-level workflows:

Which issue this PR fixes:

Part of #3349.
It also enables E2E tests in the PR workflow as a part of #3725.

Special notes for your reviewer:

GH's docs on the reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows

If we decide to accept this PR, we'll need someone with wider permissions set to change the required PR status checks, as the old ones are remaining stuck with Waiting for status to be reported.

@czeslavo czeslavo added area/ci area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. labels Mar 14, 2023
@czeslavo czeslavo self-assigned this Mar 14, 2023
@czeslavo czeslavo force-pushed the extract-reusable-workflows branch 14 times, most recently from 1b3b478 to ef514fa Compare March 15, 2023 16:25
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
@czeslavo czeslavo temporarily deployed to gcloud March 15, 2023 16:49 — with GitHub Actions Inactive
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

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

Nice work 👍

Couple of open ended questions for consideration

.github/workflows/pr_validation.yaml Outdated Show resolved Hide resolved
.github/workflows/pr_validation.yaml Outdated Show resolved Hide resolved
.github/workflows/e2e_targeted.yaml Show resolved Hide resolved
.github/workflows/_e2e_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/_e2e_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/_e2e_tests.yaml Show resolved Hide resolved
.github/workflows/_e2e_tests.yaml Show resolved Hide resolved
.github/workflows/pr_validation.yaml Outdated Show resolved Hide resolved
@czeslavo czeslavo requested a review from pmalek March 16, 2023 13:57
@czeslavo
Copy link
Contributor Author

@rainest @pmalek I hope I addressed all the comments, PTAL again. 🙏

@czeslavo czeslavo requested a review from rainest March 16, 2023 13:59
@Kong Kong deleted a comment from codecov bot Mar 16, 2023
@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: -16.7 ⚠️

Comparison is base (50a4c3f) 73.6% compared to head (0e9f24c) 56.9%.

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3724      +/-   ##
========================================
- Coverage   73.6%   56.9%   -16.7%     
========================================
  Files        133     133              
  Lines      15828   15828              
========================================
- Hits       11651    9017    -2634     
- Misses      3418    6191    +2773     
+ Partials     759     620     -139     

see 50 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

pmalek
pmalek previously approved these changes Mar 16, 2023
Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

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

🚢 🤞

@czeslavo
Copy link
Contributor Author

@pmalek I pushed one more commit adding a passed job that we will be able to use as the only required check in the repository's branch protection rules. As we have many matrix-generated jobs it's the only way to gather all the results into one and be ready for changes in the matrices in the future.

@czeslavo czeslavo requested a review from pmalek March 16, 2023 17:22
@pmalek
Copy link
Member

pmalek commented Mar 16, 2023

@pmalek I pushed one more commit adding a passed job that we will be able to use as the only required check in the repository's branch protection rules. As we have many matrix-generated jobs it's the only way to gather all the results into one and be ready for changes in the matrices in the future.

This is a very good idea but hard to get right ;) We have to take into account PRs from forks (which is OK to not cover here because we have an issue tracking this) and also cancelled jobs. But let's take an iterative approach on this. 🙃

.github/workflows/pr_checks.yaml Show resolved Hide resolved
.github/workflows/pr_checks.yaml Show resolved Hide resolved
.github/workflows/_integration_tests.yaml Outdated Show resolved Hide resolved
.github/workflows/_e2e_tests.yaml Outdated Show resolved Hide resolved
@czeslavo czeslavo requested a review from pmalek March 16, 2023 17:46
@rainest
Copy link
Contributor

rainest commented Mar 16, 2023

Override merge since the checks pass, but Github won't let me say that they're the checks that should pass until they're merged 🐔 🥚 ♾️

@rainest rainest enabled auto-merge (squash) March 16, 2023 18:40
@rainest rainest disabled auto-merge March 16, 2023 18:40
@rainest rainest merged commit e9167e2 into main Mar 16, 2023
@rainest rainest deleted the extract-reusable-workflows branch March 16, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants