Skip to content

refactor(internal/librarian/golang): use ReleaseLevels in serviceconfig.API for release level detection#4558

Merged
JoeWang1127 merged 7 commits intomainfrom
chore/use-rl
Mar 13, 2026
Merged

refactor(internal/librarian/golang): use ReleaseLevels in serviceconfig.API for release level detection#4558
JoeWang1127 merged 7 commits intomainfrom
chore/use-rl

Conversation

@JoeWang1127
Copy link
Copy Markdown
Contributor

Set GAPIC option, release-level, from ReleaseLevels in serviceconfig.API.

Set release-level in repo metadata according to API path and ReleaseLevels in serviceconfig.API. This logic is ported from legacylibrarian (source)

Fixes #4435

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 the release level detection for Go libraries, shifting the logic from being derived from API paths and library versions to using the ReleaseLevels map within serviceconfig.API. This change centralizes configuration and simplifies the codebase. The modifications in generate.go and repometadata.go are well-executed, and the tests have been updated accordingly to validate the new approach. The logic for determining the repo metadata release level has been correctly ported from legacylibrarian. I have one suggestion to further improve code conciseness.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.88%. Comparing base (a3f1b43) to head (47170cc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4558      +/-   ##
==========================================
- Coverage   79.90%   79.88%   -0.02%     
==========================================
  Files         109      109              
  Lines        9115     9099      -16     
==========================================
- Hits         7283     7269      -14     
+ Misses       1322     1321       -1     
+ Partials      510      509       -1     

☔ 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.

@JoeWang1127 JoeWang1127 marked this pull request as ready for review March 12, 2026 22:29
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner March 12, 2026 22:29
@jameslynnwu
Copy link
Copy Markdown
Contributor

I thought release level was supposed to be language neutral per #3954

@JoeWang1127
Copy link
Copy Markdown
Contributor Author

I thought release level was supposed to be language neutral per #3954

It is, but we are not there yet. Moving it to sdk.yaml is the first step.

I need this change now because we want to achieve 0 diff during Go migration. We can update the logic so that all languages have the same way to retrieve the value.

@JoeWang1127 JoeWang1127 merged commit 51c9057 into main Mar 13, 2026
29 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/use-rl branch March 13, 2026 14:30
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.

serviceconfig: add ReleaseLevel in API struct

3 participants