Skip to content

Conversation

CommanderStorm
Copy link
Member

this PR is the followup talked about in #1477

@CommanderStorm CommanderStorm changed the title support configuring no_credentials and force_path_style chore: support configuring no_credentials and force_path_style May 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@CommanderStorm CommanderStorm changed the title chore: support configuring no_credentials and force_path_style chore: support configuring pmtiles.{no_credentials,force_path_style} May 24, 2025
Comment on lines 16 to 24
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`
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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_*?

Copy link
Member

@nyurik nyurik left a 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

Comment on lines 16 to 24
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`
Copy link
Member

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.

@CommanderStorm CommanderStorm requested review from nyurik and Copilot May 26, 2025 16:03
Copilot

This comment was marked as resolved.

Co-authored-by: Copilot <[email protected]>
@CommanderStorm CommanderStorm changed the title chore: support configuring pmtiles.{no_credentials,force_path_style} chore: support configuring pmtiles.{require_credentials,force_path_style} May 27, 2025
Copy link
Member

@nyurik nyurik left a 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, ...?

@CommanderStorm CommanderStorm changed the title chore: support configuring pmtiles.{require_credentials,force_path_style} chore: support configuring pmtiles.{skip_credentials,force_path_style} May 27, 2025
@CommanderStorm
Copy link
Member Author

I think skip_credentials does convey what we do.
We skip loading credentials.

I ommitted loading because then we would need to explain with a half sentence that we are loading them into the aws sdk.

@CommanderStorm CommanderStorm requested a review from Copilot May 27, 2025 01:10
Copilot

This comment was marked as resolved.

@CommanderStorm CommanderStorm requested a review from nyurik May 27, 2025 01:11
@CommanderStorm CommanderStorm enabled auto-merge (squash) May 27, 2025 23:25
@CommanderStorm
Copy link
Member Author

CommanderStorm commented May 30, 2025

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 pmtiles.skip_credentials is fine? 👉🏻👈🏻
@nyurik @sharkAndshark

(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 ^^)

@CommanderStorm CommanderStorm merged commit 0419cec into maplibre:main May 30, 2025
32 of 33 checks passed
@nyurik
Copy link
Member

nyurik commented May 30, 2025

Sounds good, approved!

@CommanderStorm CommanderStorm deleted the s3-followup branch May 30, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants