-
-
Notifications
You must be signed in to change notification settings - Fork 285
chore: support configuring pmtiles.{skip_credentials,force_path_style}
#1848
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
Conversation
no_credentials
and force_path_style
no_credentials
and force_path_style
for more information, see https://pre-commit.ci
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.
Pull Request Overview
This PR implements configuration options for S3 sources by supporting the "no_credentials" and "force_path_style" parameters, as discussed in #1477. It adds these options to the PMTiles configuration, updates the S3 source initialization logic accordingly, and revises documentation and CLI configurations.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
martin/src/pmtiles/mod.rs | Adds new configuration fields and updates the S3 source initialization logic to use them. |
martin/src/args/root.rs | Refactors URL parsing using new Rust syntax for cleaner error handling. |
docs/src/sources-files.md | Updates documentation regarding S3 configuration options and URL styles. |
docs/src/env-vars.md | Revises environment variables documentation to include the new options. |
docs/src/config-file.md | Adds configuration examples for force_path_style and no_credentials. |
Cargo.toml | Updates clap dependency with the "env" feature to support new configuration options. |
no_credentials
and force_path_style
pmtiles.{no_credentials,force_path_style}
docs/src/env-vars.md
Outdated
We also have the following [pmtiles via S3 specific configuration options](sources-files.md#serving-pmtiles-via-s3): | ||
|
||
- `AWS_ACCESS_KEY_ID` | ||
- `AWS_SECRET_ACCESS_KEY` | ||
- `AWS_SESSION_TOKEN` | ||
- `AWS_PROFILE` | ||
- `AWS_REGION` | ||
- `AWS_NO_CREDENTIALS` | ||
- `AWS_S3_FORCE_PATH_STYLE` |
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.
main question is likely for this PR if these env vars are fine.
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 think these AWS env vars are pretty standard, and I think they are ok to use.
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.
P.S. Let's document these the same way as PG env vars, together with the corresponding config keys. See above.
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.
together with the corresponding config keys
They currently don't have config associated with them.
Should they be added under an pmtiles.aws.*
or plmtiles.aws_*
?
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.
thx, looks good, just a few minor nits
docs/src/env-vars.md
Outdated
We also have the following [pmtiles via S3 specific configuration options](sources-files.md#serving-pmtiles-via-s3): | ||
|
||
- `AWS_ACCESS_KEY_ID` | ||
- `AWS_SECRET_ACCESS_KEY` | ||
- `AWS_SESSION_TOKEN` | ||
- `AWS_PROFILE` | ||
- `AWS_REGION` | ||
- `AWS_NO_CREDENTIALS` | ||
- `AWS_S3_FORCE_PATH_STYLE` |
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 think these AWS env vars are pretty standard, and I think they are ok to use.
Co-authored-by: Yuri Astrakhan <[email protected]>
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <[email protected]>
pmtiles.{no_credentials,force_path_style}
pmtiles.{require_credentials,force_path_style}
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'm also not thrilled about the name because ideally we want all bool env parameters to be false by default, and 1 would enable them... perhaps allows_anon, skip_auth, ...?
for more information, see https://pre-commit.ci
pmtiles.{require_credentials,force_path_style}
pmtiles.{skip_credentials,force_path_style}
I think I ommitted loading because then we would need to explain with a half sentence that we are loading them into the aws sdk. |
Since this is the only thing blocking 0.17 and if we get this in today, we can get into the newsletter for this, rather than next month Could we gain concensus, that (if there are things which are opposing a merge+release, that is fine too. skipping an newsletter if we did not have content is fine ^^) |
Sounds good, approved! |
this PR is the followup talked about in #1477