-
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-38650: Adopt safir.redis and safir.github modules #50
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
jonathansick
force-pushed
the
tickets/DM-38650
branch
from
April 13, 2023 21:37
0055f60
to
0c8b294
Compare
Moves all configuration to pyproject.toml, except for .flake8 because flake8 doesn't use pyproject.toml
The updated mypy found more potential issues, so this update fixes them.
This is required by current versions of FastAPI/Starlette.
The base class, RedisPageInstanceStorage, now adds the functionality of adding the page instance's key; it's a direct subclass of PydanticRedisStorage. NbHtmlCacheStorage and NoteburstJobStore both subclass RedisPageInstanceStorage. Add types-redis to support type checking of the redis package.
This makes the uvicorn logging more consistent with app logs.
The GitHubAppClientFactory from safir.github is the new version of the timessquare.services.github.client module, and also includes the ability to set up an installation client for a repo.
Now if the sidecar for a notebook marks a page as disabled, the page won't be executed and if it already existed, it'll be marked for soft-deletion.
Use safir.github.webhooks for webhook payloads and safir.github.models for the GitHub REST API resources. The githubcheckrun, githubcheckout, and githubtree models persist because they reflect internal models (but they're related to github concepts)
jonathansick
force-pushed
the
tickets/DM-38650
branch
from
April 18, 2023 16:13
883102e
to
79b5fae
Compare
We already covered disabling an existing page; this second path is to ensure a disable page isn't created in the first place.
Previously it was in services, but this did make sense because these aren't "services." Instead, it makes sense to treat the gidgethub router as a request handler, so now we're co-locating it with the external API handler since it's the external_router that gets the webhook events originally from GitHub.
This avoids the handlers.xyz.handlers naming phenomenon and is more specific about the role of the module.
Now that there aren't additional items in services.github, it makes sense to move the repo module into the root of the services subpackage and rename as githubrepo to match the class name.
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.
safir.redis.pydantic
for Redis-backed storage.safir.github
creating the GitHub App client and modelling of GitHub resources with Pydantic.timessquare.services.githubrepo
module.