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

DM-35150: Implement GitHub Checks for notebook execution #41

Merged
merged 9 commits into from
Jul 4, 2022

Conversation

jonathansick
Copy link
Member

Building on #40, this PR implements a new GitHub Check Run that reports on whether a PR's notebook content can execute successfully. These notebooks are actually stored by Times Square, but tagged with the corresponding Git SHA. This will enable us to display a page with a preview of the notebooks in a GitHub pull request.

When set to a Git SHA, this associates the page with the Git commit of a
GitHub Check Run. (This enables us to create pages during GitHub PR check
runs)
Rather than having extensive logic for setting up a check run in the
service layer, now class methods on the GitHubConfigsCheck are able to
create and update the status of check runs. Overall the intent of this
work is to make it easier to add check runs for notebooks in the next
phase of work, and reduce the amount of complexity spread into the
service layer.
This moves generic code for check domain models into a base class. The
notebook execution will use this.
This is a first pass at running a github check for notebook execution.

One thing that's a bit awkward is making PageService.add_page return a
new PageExecutionInfo instance so the check run has access to the
noteburst job corresponding to the page; it may be better to separate
adding a page to the database from executing the notebook so that
PageExecutionInfo doesn't need to have lots of nullable types.
This will allow us to add a client to this module and generalize it from
only being models from noteburst responses created elsewhere.
This client, part of the noteburst domain, centralizes the API
interactions with noteburst, which are now happening in both the page
service and the github checks domain.
The notebook execution check run is now able to set enable_retry=False
to force a notebook execution to report issues quickly.

In doing this, I've refactored the PageService methods to not force
notebook execution, which makes is easier for different service use
cases, like this one.
@jonathansick jonathansick marked this pull request as ready for review July 4, 2022 21:18
@jonathansick jonathansick merged commit 4aa3be5 into main Jul 4, 2022
@jonathansick jonathansick deleted the tickets/DM-35150 branch July 4, 2022 21:18
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.

None yet

1 participant