Skip to content

Conversation

@jinseopkim0
Copy link
Collaborator

@jinseopkim0 jinseopkim0 commented Dec 5, 2025

Summary
This PR fixes build and test failures in the Kokoro Windows Bazel environment. It configures the build to correctly handle OpenSSL certificate roots for curl and temporarily excludes specific targets that are currently unstable on Windows.

kokoro/windows/bazel-release-2019 and kokoro/windows/bazel-release-2022 pass with this PR.

Changes

  • Stabilize CI: Temporarily excluded specific Bigtable, Storage, and Pub/Sub targets that are causing CI failures on Windows (see Failing google/cloud/bigtable:internal_query_plan_test for kokoro windows bazel CI #15678).
  • Update Examples: Modified the Storage quickstart and README documentation to support the CURL_CA_BUNDLE environment variable. This allows the examples to locate the custom CA bundle required in the hermetic build environment.
  • Configure Roots: Updated bazel.ps1 to install root certificates and set the CURL_CA_BUNDLE environment variable during the test phase.

Reasoning
The Windows CI environment uses a hermetic build where standard system roots may not be sufficient or accessible. Configuring the client to use explicitly provided roots via environment variables resolves authentication failures during integration tests.

Note: #15822 has been created to investigate automatic detection of CA roots from environment variables (e.g. CURL_CA_BUNDLE)

@gemini-code-assist
Copy link

Summary of Changes

Hello @jinseopkim0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses and resolves build and test failures occurring in the Kokoro Windows CI environment. It implements a robust mechanism for the C++ client to correctly locate and utilize CA certificates by integrating the CURL_CA_BUNDLE environment variable. Additionally, it temporarily excludes specific Bazel targets that are currently causing instability on Windows from the automated build and test processes, aiming to restore CI stability.

Highlights

  • Windows CI CA Bundle Configuration: The C++ client initialization in quickstart examples and READMEs now conditionally uses the CURL_CA_BUNDLE environment variable to specify CA roots, addressing certificate issues in the Windows CI environment.
  • Bazel Build/Test Exclusions: Several problematic Bazel targets, including specific Bigtable, Storage, and Pub/Sub samples/tests, are now explicitly excluded from the Windows Bazel build and test commands to prevent failures.
  • Kokoro Environment Variable Setup: The Kokoro Windows build script (bazel.ps1) has been updated to set the CURL_CA_BUNDLE environment variable, ensuring the C++ client can locate the necessary CA certificates during integration tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@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 introduces fixes for the Kokoro Windows Bazel CI build. The changes include updating the C++ quickstart examples to respect the CURL_CA_BUNDLE environment variable for custom CA certificates, which is necessary for the hermetic build environment. The corresponding Bazel build script is updated to set this environment variable during integration tests. Additionally, several build targets that are failing on Windows are now excluded from the bazel build and bazel test commands to unblock the CI. The changes are correct and well-implemented. I have no specific comments.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (826dd38) to head (e4b98e3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15818      +/-   ##
==========================================
- Coverage   92.95%   92.94%   -0.01%     
==========================================
  Files        2458     2458              
  Lines      227589   227589              
==========================================
- Hits       211547   211537      -10     
- Misses      16042    16052      +10     

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

@jinseopkim0 jinseopkim0 changed the title fix: Fix kokoro windows bazel 2 fix(windows): use OpenSSL in Bazel builds for curl Dec 8, 2025
Temporarily excludes specific Bigtable, Storage, and Pub/Sub targets
that are currently unstable or failing in the Windows Bazel CI environment.

References #15678.
Updates the Storage quickstart and READMEs to conditionally check for
the `CURL_CA_BUNDLE` environment variable. This allows the examples
to run in environments (like Windows CI) that require a custom CA bundle path.
Installs root certificates and sets the `CURL_CA_BUNDLE` and
`GRPC_DEFAULT_SSL_ROOTS_FILE_PATH` environment variables in the
Kokoro Windows Bazel build. This enables the client to authenticate
correctly when built against OpenSSL on Windows.
@jinseopkim0 jinseopkim0 force-pushed the fix-kokoro-windows-bazel-2 branch from d9ea7c2 to 38cab95 Compare December 8, 2025 20:07
@jinseopkim0 jinseopkim0 changed the title fix(windows): use OpenSSL in Bazel builds for curl fix(windows): configure OpenSSL roots and stabilize Bazel builds Dec 8, 2025
@jinseopkim0 jinseopkim0 merged commit d0dc97e into main Dec 8, 2025
69 of 70 checks passed
@jinseopkim0 jinseopkim0 deleted the fix-kokoro-windows-bazel-2 branch December 8, 2025 23:58
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