-
Notifications
You must be signed in to change notification settings - Fork 14
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-42189: Serve multiple Butler repositories from a single server #931
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #931 +/- ##
==========================================
+ Coverage 87.99% 88.00% +0.01%
==========================================
Files 309 308 -1
Lines 39468 39452 -16
Branches 8311 8309 -2
==========================================
- Hits 34730 34720 -10
+ Misses 3531 3524 -7
- Partials 1207 1208 +1 ☔ View full report in Codecov by Sentry. |
447f91c
to
ddfe56d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Is the /repo
in the path really necessary?
Butler to use. | ||
repository : `str` | ||
The label of the Butler repository requested by the user. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numpydoc doesn't need the blank line here.
index_filename = "repo_index.yaml" | ||
repo_name = "testserver" | ||
with open(os.path.join(temp_dir, index_filename), "wb") as fh: | ||
fh.write(f"{repo_name}: {butler_root}\n".encode()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fh.write(f"{repo_name}: {butler_root}\n".encode()) | |
yaml.dump({repo_name: butler_root}, stream=fh) |
?
Yeah, it leaves a free namespace where we can put per-server endpoints, like "list_available_repositories" or "health_check". Otherwise we'd have to worry about repository labels colliding with endpoint names. (Not sure but I wouldn't be surprised if FastAPI doesn't even support having a |
9e42b8b
to
2d24a30
Compare
ddfe56d
to
d22addd
Compare
In most environments, users will access multiple Butler repositories (multiple data releases, prompt processing, etc.). To avoid the need to instantiate a separate service for every repository, allow multiple repositories to be hosted from a single server. This uses the same DAF_BUTLER_REPOSITORY_INDEX configuration system as DirectButler.
d22addd
to
f85bdf0
Compare
In most environments, users will access multiple Butler repositories (multiple data releases, prompt processing, etc.). To avoid the need to instantiate a separate service for every repository, allow multiple repositories to be hosted from a single server.
This uses the same DAF_BUTLER_REPOSITORY_INDEX configuration system as DirectButler.
Checklist
doc/changes