Skip to content

feat(workloadidentity): generate library - #16349

Open
scotthart wants to merge 3 commits into
googleapis:mainfrom
scotthart:feat-workloadidentity-generate-library
Open

feat(workloadidentity): generate library#16349
scotthart wants to merge 3 commits into
googleapis:mainfrom
scotthart:feat-workloadidentity-generate-library

Conversation

@scotthart

@scotthart scotthart commented Aug 14, 2026

Copy link
Copy Markdown
Member

PiperOrigin-RevId: 962846928

@scotthart scotthart changed the title Feat workloadidentity generate library feat(workloadidentity): generate library Aug 14, 2026

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

Copy link
Copy Markdown

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 introduces the new Workload Identity API C++ client library, including its generated implementation, build configurations, documentation, and a quickstart sample. The review feedback highlights a critical issue in the quickstart's WORKSPACE.bazel file, which incorrectly fetches v3.8.0 of google-cloud-cpp instead of v3.9.0, leading to build failures. Additionally, it is recommended to use conditional assignment (?=) in the quickstart's Makefile to allow users to override compiler and flag variables.

Comment on lines +27 to +28
strip_prefix = "google-cloud-cpp-3.8.0",
url = "https://github.com/googleapis/google-cloud-cpp/archive/v3.8.0.tar.gz",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The quickstart WORKSPACE.bazel currently fetches v3.8.0 of google-cloud-cpp. However, workloadidentity is a new library being introduced in v3.9.0 (as per the changelog). Consequently, building this quickstart using this WORKSPACE.bazel will fail because the workloadidentity target does not exist in v3.8.0. Please ensure that when updating the version of google-cloud-cpp in the http_archive rule, the sha256 hash is also updated to match the new version's content.

References
  1. When updating the version of a dependency in an http_archive rule in a Bazel WORKSPACE file, the sha256 hash must also be updated to match the new version's content.

Comment on lines +20 to +22
CXX=g++
CXXFLAGS=-std=c++17
CXXLD=$(CXX)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Hardcoding CXX, CXXFLAGS, and CXXLD prevents users from easily overriding the compiler and flags (e.g., to clang++ on macOS). Using ?= allows these variables to be overridden from the environment or command line.

CXX?=g++
CXXFLAGS?=-std=c++17
CXXLD?=$(CXX)

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (b6ddf66) to head (48759fe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16349   +/-   ##
=======================================
  Coverage   92.23%   92.24%           
=======================================
  Files        2227     2227           
  Lines      209543   209543           
=======================================
+ Hits       193282   193288    +6     
+ Misses      16261    16255    -6     

☔ View full report in Codecov by Harness.
📢 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.

@scotthart
scotthart marked this pull request as ready for review August 14, 2026 21:30
@scotthart
scotthart requested a review from a team as a code owner August 14, 2026 21: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.

1 participant