Skip to content

refactor: extract X-Glean header names into constants#155

Merged
travis-hoover-glean merged 1 commit into
mainfrom
refactor/x-glean-header-consts
Jul 2, 2026
Merged

refactor: extract X-Glean header names into constants#155
travis-hoover-glean merged 1 commit into
mainfrom
refactor/x-glean-header-consts

Conversation

@travis-hoover-glean

Copy link
Copy Markdown
Contributor

Follow-up to #153 addressing @steve-calvert-glean's review comment (review):

Can we just make this a const so we don't have to update it in so many places?

The X-Glean-Include-Experimental / X-Glean-Exclude-Deprecated-After header names (and their env var names) were duplicated in the hook and repeated 20+ times in tests, so the rename in #153 had to touch many places. This defines them once as module-level constants in x_glean.py and references them from both the hook and the tests, so a future rename only changes one line.

No behavior change; all 15 hook tests pass.

Follow-up to #153. The X-Glean-Include-Experimental / X-Glean-Exclude-Deprecated-After
header names and their env var names were duplicated across the hook and tests, so a
rename had to touch many places. Define them once as module-level constants in
x_glean.py and reference them everywhere.
@travis-hoover-glean travis-hoover-glean requested a review from a team as a code owner July 2, 2026 17:04
@travis-hoover-glean travis-hoover-glean merged commit df7cb07 into main Jul 2, 2026
2 checks passed
@travis-hoover-glean travis-hoover-glean deleted the refactor/x-glean-header-consts branch July 2, 2026 17:06
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