Skip to content

fix(previews): set initial version on add#5232

Merged
noahdietz merged 3 commits intogoogleapis:mainfrom
noahdietz:preview-go-initial-version
Apr 9, 2026
Merged

fix(previews): set initial version on add#5232
noahdietz merged 3 commits intogoogleapis:mainfrom
noahdietz:preview-go-initial-version

Conversation

@noahdietz
Copy link
Copy Markdown
Contributor

Rather than letting the preview library to accidentally resolve its version from the containing stable, set it to a reasonable initial value derived from the containing stable version.

We may need to implement per-language switch for this in addPreviewLibrary e.g. if future languages use a different prerelease suffix.

Should've been done as part of #4986
Toward #4867

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements automatic version derivation for preview libraries. The addPreviewLibrary function now utilizes the semver package to calculate an initial preview version based on the stable version. Test cases in add_test.go have been updated to reflect these versioning changes. I have no feedback to provide.

@noahdietz noahdietz marked this pull request as ready for review April 8, 2026 22:09
@noahdietz noahdietz requested a review from a team as a code owner April 8, 2026 22:09
@noahdietz noahdietz requested a review from jskeet April 8, 2026 23:01
@noahdietz noahdietz removed the request for review from jskeet April 9, 2026 15:09
@noahdietz noahdietz merged commit 36aa71f into googleapis:main Apr 9, 2026
18 of 19 checks passed
@noahdietz noahdietz deleted the preview-go-initial-version branch April 9, 2026 15:20
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