Skip to content

fix(ci): pin gapic-showcase and stabilize cloud integration tests - #320

Merged
kevmoo merged 7 commits into
mainfrom
fix_ci
Aug 12, 2026
Merged

fix(ci): pin gapic-showcase and stabilize cloud integration tests#320
kevmoo merged 7 commits into
mainfrom
fix_ci

Conversation

@kevmoo

@kevmoo kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Fixes CI failures across GitHub Actions and Cloud Build integration tests:

Pin gapic-showcase installation in showcase_server.dart to v0.40.0 instead of @latest.

- Upstream gapic-showcase v0.41.1/v0.42.0 fails to compile due to an undefined tls.SecP256r1MLKEM768 identifier in Go TLS adapters.
- Pinned version resolves all showcase conformance test failures in CI.
- Ran dart format across modified test files.
@kevmoo
kevmoo requested a review from brianquinlan August 11, 2026 20:44

@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 formats a test case in echo_test.dart and pins the gapic-showcase installation version to v0.40.0 instead of latest in showcase_server.dart to ensure reproducible builds. There are no review comments, and I have no feedback to provide.

@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gcbrun

@kevmoo
kevmoo requested a review from natebosch August 11, 2026 20:49
Fix the log query in the structured logging integration test and add diagnostic logging to waitForLogs.

- Update the 'structured logging' test in pkgs/google_cloud_shelf/test/logging_test.dart to query 'jsonPayload.message' instead of 'textPayload' (Cloud Run ingests structured JSON logs into jsonPayload).
- Add a 2-minute timeout to the 'logging server' test group so waitForLogs has sufficient time to complete.
- Add polling progress logs in test_utils/lib/src/cloud.dart to show query attempts and elapsed time.
@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gcbrun

@natebosch

Copy link
Copy Markdown
Contributor

I don't think we should add print statements in the tests. At most printOnFailure. I could easily approve a PR that does what the original first comment describes separately.

@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

I don't think we should add print statements in the tests. At most printOnFailure. I could easily approve a PR that does what the original first comment describes separately.

oh I know. Just doing it now to debug. will remove!

kevmoo added 2 commits August 11, 2026 14:31
…ntries

- In test_utils/lib/src/cloud.dart, avoid printing the raw filter string to stdout during polling, which was getting ingested by Cloud Logging in Cloud Build and causing textPayload queries to match Cloud Build's own output.
- In pkgs/google_cloud_shelf/test/logging_test.dart, query textPayload for 'structured logging' because GCP Cloud Logging maps structured logs with only a message string to textPayload.
- In generated/google_cloud_logging_v2/test/write_log_test.dart, use waitForLogs instead of a brittle 15-second fixed delay.
Use printOnFailure from package:test in waitForLogs so full filter and attempt diagnostics are only printed if a test fails, preventing stdout pollution in Cloud Logging on success.
@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gcbrun

…in tearDown

- Add a 2-minute timeout to the LoggingServiceV2 test group so waitForLogs has sufficient time to complete under normal Cloud Logging indexing latency.
- Catch and ignore NotFoundException in writeLogEntries tearDown.
@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gcbrun

@kevmoo kevmoo changed the title test(showcase): pin gapic-showcase to v0.40.0 fix(ci): pin gapic-showcase and stabilize cloud integration tests Aug 11, 2026
@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 improves test reliability and logging. It adds timeouts to test groups, replaces hardcoded delays with retry-based log polling, and pins the gapic-showcase version. Feedback is provided on the waitForLogs implementation, suggesting the use of a Stopwatch instead of DateTime.now() to ensure monotonic time measurement and to accurately capture the duration of the final successful API call.

Comment thread test_utils/lib/src/cloud.dart Outdated
Use Stopwatch to track elapsed polling time monotonically and ensure the final API call duration is included in diagnostic logs.
@kevmoo

kevmoo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/gcbrun

@kevmoo
kevmoo merged commit 0f9fe93 into main Aug 12, 2026
26 checks passed
@kevmoo
kevmoo deleted the fix_ci branch August 12, 2026 00:02
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