-
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-42191: Allow use of Butler client/server #140
Conversation
af49300
to
3fad1f1
Compare
Upgrade safir to get auth_delegated_token_dependency. FastAPI had to be upgraded as a result. It appears that it no longer automatically coerces single-item form parameters to list[str], so some types had to be updated. (These appear to be intended only as documentation, but are still validated by FastAPI.)
Retrieve delegated access tokens from Gafaelfawr headers, and pass them down to the job dispatch layer. This will be used to pass the access token to the backend for use by the Butler client.
24bf4cb
to
a2b946b
Compare
scripts/install-worker.sh
Outdated
@@ -25,7 +25,8 @@ set -x | |||
# alternative (no releases and no tags). | |||
mkdir /backend | |||
cd /backend | |||
git clone --depth 1 https://github.com/lsst-dm/image_cutout_backend.git | |||
# TODO: This should not reference a ticket branch.. | |||
git clone --depth 1 -b tickets/DM-42191 https://github.com/lsst-dm/image_cutout_backend.git |
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.
I'll add a tag in image-cutout-backend that we can reference after the changes there get through review.
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.
This looks great to me. Thanks! As with datalinker, I'll do a modernization pass on the service once this is merged and before making a new release, since it hasn't gotten any attention in a while.
Create Butlers using LabeledButlerFactory and provide the Gafaelfawr access token. This allows us to use Butler client/server if the environment is configured to do so.
a2b946b
to
953ac00
Compare
Changed the way Butler is used to support client/server Butler. We now pass a Gafaelfawr delegated token down to the cutouts worker, so that it can be used to authenticate with Butler server.
This required updating safir, which in turn required updating FastAPI. Fixed a slight incompatibility in FastAPI's handling of form data -- it appears to no longer coerce single form values into
list[str]
automatically.