-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: path-based locations #288
Conversation
…tsget-rs into feat/simple-locations
…t there is not a double prefix
@@ -1,23 +1,19 @@ | |||
# An example of running htsget-rs with Crypt4GH enabled. | |||
# Run with `cargo run -p htsget-axum --features experimental -- --config htsget-config/examples/config-files/c4gh.toml` | |||
# Run with `cargo run -p htsget-axum --features experimental,s3-storage -- --config htsget-config/examples/config-files/c4gh.toml` |
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.
s3-storage
shouldn't be required, IMHO?
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.
Yeah that's fair. It's required because the secrets manager has all the AWS dependencies, which s3-storage
enables.
Originally, only S3 was required for any AWS-specific things, but now that's changed, maybe this feature should be called aws
rather than s3-storage
.
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.
It might be good to rename/simplify url-storage
too? E.g.
s3-storage
-> aws
url-storage
-> url
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 make this a separate PR.
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.
Agreed on the renaming, but shouldn't we have a file://
for the secrets management part? I'm thinking about local testing and/or devving, right?
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.
There is kind = "File"
for local keys:
backend.keys.kind = "File"
backend.keys.private = "data/c4gh/keys/bob.sec" # pragma: allowlist secret
backend.keys.public = "data/c4gh/keys/alice.pub"
And kind = "SecretsManager"
for secrets manager keys:
backend.keys.kind = "SecretsManager"
backend.keys.private = "htsget/test_c4gh_private_key" # pragma: allowlist secret
backend.keys.public = "htsget/test_c4gh_public_key"
Is that what you mean? Or some sort of local SecretsManager option?
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.
No, I'm only concerned about being able to run c4gh infra locally, without requiring aws
deps... that "Run with cargo run...
" line change seems to imply that s3-storage
is absolutely required? From what you just said it seems it's not, perhaps being explicit about both options (only via experimental
and experimental+aws
feature flags) should be explicitly stated?
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.
Yes, you're right, it's not required. It's only required if you remove the comments in that file that use kind = "SecretsManager"
.
I'll make this clearer on the next PR. Maybe it should just be --all-features
in all the examples to avoid any confusion?
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.
Maybe it should just be --all-features in all the examples to avoid any confusion?
🤔 ... that'd exercise our error management logic and corresponding error messages, i.e: running with file://
paths and aws
-related c4gh secrets management. It might make more sense this way if errors are clear, yeah!
Closes #281
Depends on #284
Features
*The first part of the location determines the storage, and everything in the path after determines the prefix which matches on ids. For example, s3://bucket/prefix says to find files in bucket when the request also contains the prefix - /reads/prefix/.
Docs
Recent fixes