Skip to content

refactor(transform): read only x-glean-release - #192

Merged
travis-hoover-glean merged 1 commit into
mainfrom
thoov/devplat-1615-remove-old-annotation-fallback
Nov 30, 2026
Merged

travis-hoover-glean merged 1 commit into
mainfrom
thoov/devplat-1615-remove-old-annotation-fallback

Conversation

@travis-hoover-glean

@travis-hoover-glean travis-hoover-glean commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Makes the open-api transforms read lifecycle stages and deprecations only from x-glean-release. The published specs no longer carry x-glean-experimental or x-glean-deprecated, so the fallback to them in src/release.js and its callers is dead code.

Changes

  • src/release.js drops the x-glean-experimental and x-glean-deprecated readers. Beta, deprecated, and deprecated-enum-value nodes are found only through x-glean-release.
  • src/source-spec-transformer.js and src/code-sample-transformer.js stop mentioning the old annotations. The Speakeasy deprecation conversion and the beta SDK opt-in flag read x-glean-release only.
  • Tests and fixtures now check that a node carrying only an old annotation is ignored.

Verification

  • pnpm test and pnpm lint pass.
  • On source_specs/ at main, pnpm transform:source_specs and pnpm transform:merged_code_samples_specs change nothing in generated_specs/, modified_code_samples_specs/, or final_specs/ besides the source and open-api commit SHAs.

Merge Danger

Door: two-way. Reverting restores the fallback.

Blast Radius: none for the current specs, since none of them carry the old annotations. If an old annotation reached source_specs/ anyway, it would be ignored rather than published as beta or deprecated. askscio/scio's scio api validate rejects them in every spec it publishes from.

Context: DEVPLAT-1615, epic DEVPLAT-1593. The matching developer site change is gleanwork/glean-developer-site#940. The two can merge in either order.

The published specs no longer carry x-glean-experimental or
x-glean-deprecated, so the transforms stop falling back to them. The
generated, modified code sample, and final specs are byte-identical.

DEVPLAT-1615

@chris-freeman-glean chris-freeman-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.

No actionable findings. Verified all 142 tests and formatting pass, production specs contain no legacy lifecycle annotations, and all seven source/code-sample transforms produce identical base/head output.

@travis-hoover-glean
travis-hoover-glean merged commit 3435a34 into main Nov 30, 2026
3 checks passed
@travis-hoover-glean
travis-hoover-glean deleted the thoov/devplat-1615-remove-old-annotation-fallback branch November 30, 2026 21: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