Skip to content

fix: emit X-Glean-Include-Experimental header (not X-Glean-Experimental)#153

Merged
travis-hoover-glean merged 1 commit into
mainfrom
fix/x-glean-include-experimental-header
Jul 2, 2026
Merged

fix: emit X-Glean-Include-Experimental header (not X-Glean-Experimental)#153
travis-hoover-glean merged 1 commit into
mainfrom
fix/x-glean-include-experimental-header

Conversation

@travis-hoover-glean

Copy link
Copy Markdown
Contributor

Summary

The XGlean before_request hook correctly reads the include_experimental SDK option and the X_GLEAN_INCLUDE_EXPERIMENTAL env var, but sets the wrong header name. It emits X-Glean-Experimental when the backend expects X-Glean-Include-Experimental.

This corrects the header name in the hook and its tests. Behavior (opt-in, env var precedence) is unchanged.

Changes

  • src/glean/api_client/_hooks/x_glean.py — header name (and docstring)
  • tests/test_x_glean_hook.py — updated assertions

Verification

  • poetry run pytest tests/test_x_glean_hook.py → 15 passed

Related

Same bug exists in the TypeScript, Go, and Java SDKs; companion PRs fix each. Env var name was already correct and is unchanged.

The XGlean before_request hook read the correct include_experimental
option and X_GLEAN_INCLUDE_EXPERIMENTAL env var but emitted the wrong
header name. The backend expects X-Glean-Include-Experimental. Correct
the header name in the hook and tests.
@travis-hoover-glean travis-hoover-glean marked this pull request as ready for review July 2, 2026 03:43
@travis-hoover-glean travis-hoover-glean requested a review from a team as a code owner July 2, 2026 03:43
@travis-hoover-glean travis-hoover-glean requested a review from a team July 2, 2026 14:06

@steve-calvert-glean steve-calvert-glean 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.

Thanks for the fix, @travis-hoover-glean. Can we just make this a const so we don't have to update it in so many places?

@travis-hoover-glean travis-hoover-glean merged commit 86ac051 into main Jul 2, 2026
2 checks passed
@travis-hoover-glean travis-hoover-glean deleted the fix/x-glean-include-experimental-header branch July 2, 2026 16:52
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