-
Notifications
You must be signed in to change notification settings - Fork 0
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
DM-35149: Integrate GitHub Checks API for validating YAML configs in repositories #40
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
869c5fc
to
e16e7d9
Compare
These are the webhook event payloads for check suites and check runs, and corresponding models that can be obtained with GitHub's API. These are checks with examples from GitHub's webhook docs.
This catches check suite/run related GitHub webhook events, fires off async tasks and, creates + computes check runs in the GitHubRepoService.
Rather than wait for the check_run webhook, we can actually run the check run immediately given the result from the check run creation endpoint.
It's convenient to know the git_ref corresponding to a checkout, but in truth only the head_sha is required. We're making it "optional" here to allow users to still set this metadata if relevant.
This classmethod makes it possible for a GitHubRepositoryCheckout to create itself from a github client, repository, and sha. This eliminates need for the "create_checkout" method on the RepositoryService. Overall this means it's easier to create checkouts from different parts of the code, which will be useful when writing the check run validation code.
43a8af9
to
5e264c7
Compare
This is an initial attempt at implementing a check run, GitHubConfigsCheck, that reports Pydantic validation errors.
5e264c7
to
af64f58
Compare
- There was a typo in the function name - No need to validate the app id for rerequests (and in fact, we were probably checking the wrong thing?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the GitHub Checks API in Times Square, which enables Times Square to provide status checks on commits in PRs. For this initial PR, Times Square will validate the YAML files in a notebook repository using Pydantic as a validation engine.
Future work will implement check runs for individual notebooks to validate that they run given their default parameters. Most of the code created for YAML check runs will carry over to other types of check runs like the notebook runs.