Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Restore Checks on Pull Requests #2300

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

davidvonthenen
Copy link
Contributor

@davidvonthenen davidvonthenen commented Oct 21, 2021

What this PR does / why we need it

I will talk about all that I can on this PR... everything that can be made public will be and anything that talks about backend infrastructure, secrets, and etc I won't. Having said that... This (re-)implements dynamic self-hosted runners in AWS, but using webhooks instead of having all the logic in the GitHub action itself. I won't get into specifics on why, but this is a vast improvement.

Some details on implementation... it required that I implement functionality in another open-source project that currently doesn't have the capability (github.com/go-playground/webhooks) to which I will be opening a PR in that project in order to support and recontribute the functionality back upstream.

In a nutshell, we create a webhook for the newly implemented event WorkflowJobEvent in said project (also implemented WorkflowRunEvent and WorkflowDispatchEvent yay!) and using a webhook service, we call Github and AWS APIs in order to basically do the exact same functionality for creating an EC2 instance for the self-hosted GitHub runner in order to run jobs faster than the GitHub hosted runners.

This PR also updates all the existing relevant workflows to use this implementation! which is cool and if you notice... it is super beyond minimal now! Some things I can talk about on the backend... this webhook has been deployed to multiple regions in EC2 all fronted by an AWS LoadBalancer which is cool for both availability and also for... well... load balancing.

Details for the Release Notes (PLEASE PROVIDE)

Restore functionality to test critical features when users submit PRs

Which issue(s) this PR fixes

Fixes: #2361

Describe testing done for PR

PR runs on itself. Successful run here:
https://github.com/vmware-tanzu/community-edition/actions/runs/1382105241

Also, tested cancel and restart to make sure the common workflow scenarios work!
also, verified that failed jobs clean up after themselves and you can restart/retry without any issues.

Special notes for your reviewer

NA

@davidvonthenen davidvonthenen requested a review from a team October 21, 2021 04:20
@github-actions github-actions bot added the owner/release-eng Work executed by VMware release engineering team label Oct 21, 2021
@davidvonthenen davidvonthenen added this to the v0.10.0 milestone Oct 21, 2021
@davidvonthenen davidvonthenen marked this pull request as draft October 21, 2021 17:29
@davidvonthenen davidvonthenen force-pushed the enhance/prmergecheck branch 11 times, most recently from f8c25ef to 8068b6e Compare October 25, 2021 15:54
@davidvonthenen davidvonthenen marked this pull request as ready for review October 25, 2021 16:32
@davidvonthenen
Copy link
Contributor Author

The webhooks have been running over night and they have been functioning as expected. Not leaking an ec2 instances or action runner agents. Everything is being cleaned up correctly.

@joshrosso joshrosso merged commit 2888796 into vmware-tanzu:main Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-not-required owner/release-eng Work executed by VMware release engineering team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore functionality to test critical features when users submit PRs
4 participants