Skip to content

Add MAPBOX_CLI_EXTRA_QUERY for query params the spec has no flag for - #34

Merged
zmofei merged 1 commit into
mainfrom
extra-query-param
Sep 23, 2026
Merged

zmofei merged 1 commit into
mainfrom
extra-query-param

Conversation

@zmofei

@zmofei zmofei commented Sep 22, 2026

Copy link
Copy Markdown
Member

Summary

  • MAPBOX_CLI_EXTRA_QUERY appends raw query parameters to every request (same k1=v1&k2=v2 shape as a URL query string), for API parameters this CLI's specs don't declare a flag for.
  • --debug/--dry-run show it alongside the rest of the request.
  • Adds the CHANGELOG heading for the already-bumped 0.3.0 version, which was missing.

Test plan

  • cargo build --release
  • scripts/live-smoke.sh 20 (fonts scenario, now using MAPBOX_CLI_EXTRA_QUERY=fresh=true instead of --fresh) against the live API — 14 ok, 0 failed

Some API parameters aren't exposed as CLI flags. This env var appends
raw query parameters (k1=v1&k2=v2) to every request, giving an escape
hatch without adding a flag per undeclared parameter.
@zmofei
zmofei marked this pull request as ready for review September 22, 2026 08:33
@zmofei
zmofei requested a review from a team as a code owner September 22, 2026 08:33

@mattpodwysocki mattpodwysocki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff (CHANGELOG.md, README.md, src/executor.rs). extra_query_from_env is sound: unset/empty is a clean no-op, the URL-based parsing handles the query-string edge cases well, and the &-inside-a-value limitation is clearly documented in both the doc comment and the test. Keeping it out of --help matches the existing convention for MAPBOX_DEBUG/MAPBOX_TIMEOUT. Test coverage is thorough, including the single-test-not-two reasoning for the env-var mutation. No issues found.

@zmofei
zmofei merged commit dbc3a35 into main Sep 23, 2026
8 checks passed
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