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

initial GitHubApp for Hydros AI #30

Merged
merged 49 commits into from
May 19, 2023
Merged

initial GitHubApp for Hydros AI #30

merged 49 commits into from
May 19, 2023

Conversation

jlewi
Copy link
Owner

@jlewi jlewi commented May 18, 2023

GitHub App

Check in rudimentary code to run Hydros as a GitHub App. Until now Hydros primarily ran as a periodic reconciler on Kubernetes. It was configured via a ConfigMap that mounted in the ManifestSync objects.

We want to combine the advantages of reconcilers with GitHub Apps. Notably,

  • Respond to GitHub events via push notifications to allow faster response times
  • Pull GitHubApp configuration directly from the repository so that users can update their configuration just by pushing changes to their repository
  • Better surfacing of information in GitHub via CheckRuns

To support this

  • Create a simple webserver that can respond to GitHub webhooks
  • Use Palantir tools for reading app configurations and dispatching events

Miscellaneous changes

  • Add a helper function to RepoHelper to detect if there are changes to be committed.
  • Introduce Manager && Reconciler interface
    • These are basically mimicing Kubernetes controller infrastructure in an effort to wrap reconciler in an event queue
    • This is pretty rudimentary at this point and probably needs a lot of changes before it works well
  • Update the Dispatcher to avoid trying to filter out overlay directories

Follow On Issues

  • The information displayed in the checks could be significantly more informative
    • Cloud Logging Links would be superhelpful
  • Support GitOps.Syncer
  • Properly implement level based semantics ; e.g. retry failed runs automatically if none permanent error

Update containerization

  • Docker image, Google Cloud Build workflow, and Kubernetes manifests for deploying Hydros
  • Switch the docker image to use Chainguard's minimal image. This wasn't what we were doing at Primer. Notably the Syncer shells out to a bunch of tools (e.g. Git) which require libc and other dependencies
    • In order to get them to run inside the Docker container we will probably want to update the code to use GoGit

jlewi added 30 commits May 18, 2023 14:16
@jlewi jlewi changed the title Jlewi/ai initial GitHubApp for Hydros AI May 18, 2023
@jlewi jlewi enabled auto-merge (squash) May 19, 2023 15:46
@jlewi jlewi merged commit c2ae7e5 into main May 19, 2023
@jlewi jlewi deleted the jlewi/ai branch May 19, 2023 15:48
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.

1 participant