Skip to content

chore: update librarian to v0.23.1-0.20260630163952-027103b81777 and update utilities to address new .repo-metadata.json values#13586

Closed
sofisl wants to merge 7 commits into
mainfrom
fixJavaTransport
Closed

chore: update librarian to v0.23.1-0.20260630163952-027103b81777 and update utilities to address new .repo-metadata.json values#13586
sofisl wants to merge 7 commits into
mainfrom
fixJavaTransport

Conversation

@sofisl

@sofisl sofisl commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This PR is an accompaniment to googleapis/librarian#6582. It regenerates all libraries to librarian to v0.23.1-0.20260630163952-027103b81777 and updates the accompanying scripts that modify the repo-metadata values.

@sofisl sofisl requested review from a team as code owners June 30, 2026 00:20
@sofisl sofisl changed the title build: remove logic to normalize the repo-metadata values build: remove logic to normalize the repo-metadata values, keep original values instead Jun 30, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request simplifies transport handling by removing the conversion mapping in utilities.py and directly using the transport value. It also updates the README Jinja template to support rest and grpc+rest transport types, and updates the golden test metadata accordingly. The review feedback suggests using the in operator with a list of values in the Jinja template instead of multiple or conditions to make the code more concise and maintainable.

Comment on lines +160 to 163
{% elif metadata['repo']['transport'] == 'http' or metadata['repo']['transport'] == 'rest' -%}
{{metadata['repo']['name_pretty']}} uses HTTP/JSON for the transport layer.
{% elif metadata['repo']['transport'] == 'both' -%}
{% elif metadata['repo']['transport'] == 'both' or metadata['repo']['transport'] == 'grpc+rest' -%}
{{metadata['repo']['name_pretty']}} uses both gRPC and HTTP/JSON for the transport layer.

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.

medium

Using the in operator with a list of values is more concise and idiomatic in Jinja templates than multiple or conditions. This also makes it easier to maintain if more transport types are added in the future.

Suggested change
{% elif metadata['repo']['transport'] == 'http' or metadata['repo']['transport'] == 'rest' -%}
{{metadata['repo']['name_pretty']}} uses HTTP/JSON for the transport layer.
{% elif metadata['repo']['transport'] == 'both' -%}
{% elif metadata['repo']['transport'] == 'both' or metadata['repo']['transport'] == 'grpc+rest' -%}
{{metadata['repo']['name_pretty']}} uses both gRPC and HTTP/JSON for the transport layer.
{% elif metadata['repo']['transport'] in ['http', 'rest'] -%}
{{metadata['repo']['name_pretty']}} uses HTTP/JSON for the transport layer.
{% elif metadata['repo']['transport'] in ['both', 'grpc+rest'] -%}
{{metadata['repo']['name_pretty']}} uses both gRPC and HTTP/JSON for the transport layer.

sofisl added a commit to googleapis/librarian that referenced this pull request Jun 30, 2026
…etadata (#6582)

Remove the Java-specific mapping in RepoMetadataTransport that
translated transport values to "http" or "both". Now it returns the
standard values ("grpc", "rest", "grpc+rest") directly, aligning Java
with other languages.

After merging, we will merge
googleapis/google-cloud-java#13586, once we
update the librarian pseudo-version and regenerate the repo-metadata
values.

Fixes #4854
@sofisl sofisl requested review from a team as code owners June 30, 2026 18:47
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sofisl

sofisl commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Blocked by b/529301688, attempting to diagnose the other errors.

@sofisl sofisl changed the title build: remove logic to normalize the repo-metadata values, keep original values instead chore: update librarian to v0.23.1-0.20260630163952-027103b81777 and update utilities to address new .repo-metadata.json values Jun 30, 2026
@zhumin8

zhumin8 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

I would not update anything inside sdk-platform-java/hermetic_build/library_generation. These are hermetic build scripts that I am working on deleting next (we are unblocked from deleting after #13569)

@zhumin8

zhumin8 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Also, I've seen a few checks flaky lately. If the ci failures are unrelated and the check required, retry it.

@zhumin8

zhumin8 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Close in favor of #13619 that updates to a newer version

@zhumin8 zhumin8 closed this Jul 1, 2026
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