Skip to content

refactor(serviceconfig): move release level from config to serviceconfig#4835

Merged
julieqiu merged 14 commits intogoogleapis:mainfrom
julieqiu:move-release-level-to-serviceconfig
Mar 25, 2026
Merged

refactor(serviceconfig): move release level from config to serviceconfig#4835
julieqiu merged 14 commits intogoogleapis:mainfrom
julieqiu:move-release-level-to-serviceconfig

Conversation

@julieqiu
Copy link
Copy Markdown
Member

Release level is now determined by serviceconfig.API.ReleaseLevel() instead of config.Library.ReleaseLevel, which looks up the release level for a given language, falling back to the "all" language setting, then to "stable".

The ReleaseLevel field has been removed from both config.Library and config.Default.

All language packages now read release levels from serviceconfig (sdk.yaml) rather than librarian.yaml. Go's generator maps "stable" to "ga" since it uses different terminology (#4834).

Migration tools no longer write release level to librarian.yaml, since the data lives in sdk.yaml as the source of truth.

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 refactors how release levels are handled across different language generators. It removes the ReleaseLevel field from config.Default and config.Library structs, centralizing the logic within a new ReleaseLevel method in serviceconfig.API. This method determines the release level for a given language, falling back to a general setting or "stable" if not specified. The changes update various language-specific generation and migration tools to use this new centralized ReleaseLevel determination. Review comments suggest that the ReleaseLevel hardcoding in internal/librarian/python/generate.go should be updated to use the serviceconfig.API object for correct derivation, and a redundant empty string check for sc.ReleaseLevel() in internal/librarian/rust/codec.go can be removed for simplification.

@julieqiu julieqiu force-pushed the move-release-level-to-serviceconfig branch from e403a32 to 5688a22 Compare March 25, 2026 20:42
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.46%. Comparing base (8e9bf97) to head (860274b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tool/cmd/migrate/nodejs.go 0.00% 1 Missing ⚠️

❌ Your project status has failed because the head coverage (77.55%) is below the target coverage (78.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4835      +/-   ##
==========================================
- Coverage   81.47%   81.46%   -0.02%     
==========================================
  Files         130      130              
  Lines       10885    10872      -13     
==========================================
- Hits         8869     8857      -12     
+ Misses       1383     1382       -1     
  Partials      633      633              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julieqiu julieqiu force-pushed the move-release-level-to-serviceconfig branch from 90c0b69 to 2a343de Compare March 25, 2026 21:21
julieqiu added 13 commits March 25, 2026 17:43
Release level is now determined by serviceconfig.API.ReleaseLevel()
instead of config.Library.ReleaseLevel. This adds a ReleaseLevel method
to serviceconfig.API that looks up the release level for a given
language, falling back to the "all" language setting, then to "stable".

The ReleaseLevel field has been removed from both config.Library and
config.Default. All language packages now read release levels from
serviceconfig (sdk.yaml) rather than librarian.yaml. Go's generator
maps "stable" to "ga" since it uses different terminology. Migration
tools no longer write release level to librarian.yaml, as the data
lives in sdk.yaml and can be populated via the update-release-level
import tool.
The Rust integration test (librarian generate --all + cargo check) is
temporarily enabled for pull requests to validate the release level
refactoring against google-cloud-rust.
@julieqiu julieqiu force-pushed the move-release-level-to-serviceconfig branch from 4799c62 to 2580509 Compare March 25, 2026 21:43
@julieqiu julieqiu marked this pull request as ready for review March 25, 2026 21:50
@julieqiu julieqiu requested a review from a team as a code owner March 25, 2026 21:50
@julieqiu julieqiu enabled auto-merge (squash) March 25, 2026 21:50
@julieqiu julieqiu merged commit fd4003b into googleapis:main Mar 25, 2026
24 of 26 checks passed
@julieqiu julieqiu deleted the move-release-level-to-serviceconfig branch March 25, 2026 22:09
zhumin8 added a commit that referenced this pull request Mar 27, 2026
…neration_config.yaml (#4862)

Ports over release_level info from
google-cloud-java/generation_config.yaml to sdk.yaml. Filled out
"preview" for empty values (default in java's current hermetic build
logic), removed "stable" as it is
[default](https://github.com/googleapis/librarian/blob/cec5d8b73019bdf85d7bd0843a74f84897b641c9/internal/serviceconfig/api.go#L167).
Changes are made by running a temporarily script (included in commit
[957dceb](957dceb)
for record sake).
This is a fix after #4835 moved the source of truth for release levels
to sdk.yaml.

Fix #4859
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