-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: gcs access and add test #966
Conversation
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 and awesome that you added a test!
use tempfile; | ||
|
||
#[tokio::test] | ||
async fn test_gcs_middleware() { |
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.
Should we only run this test if this variable is available?
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.
We only run this test when the gcs
feature is enabled. So that already makes the test run pretty seldomly. I havent' found a way to print a big fat warning, so I prefer to fail the test.
Can you reopen this PR as a branch so we are sure that the test works? |
Unfortunately a bug slipped in where we were sending
Bearer Bearer <token>
(ie. one Bearer too much).This fixes it and adds a test. I also added credential for a test account in the
GOOGLE_CLOUD_TEST_KEY_JSON
secret. This can access a bucket in the prefix-dev GCS (conda-channel-test/test-channel
).How to use GCS channels with rattler / pixi:
To use GCS channels, you need to first login using the
gcloud
CLI tool. For automatic discovery, rattler expects the~/.config/gcloud/application_default_credentials.json
file to be available (or theGOOGLE_APPLICATION_CREDENTIALS
env var to contain the JSON contents).To login, you can use
gcloud auth application-default login
which will automatically create the JSON file in the right place.Logs on how the service account was created: