fix: Improve Kubernetes Example reliability on CI#435
fix: Improve Kubernetes Example reliability on CI#435kabir merged 2 commits intoa2aproject:maina2aproject/a2a-java:mainfrom
Conversation
- exit early once we have the two required pods - increased count until we expect 2 pods
Summary of ChangesHello @kabir, 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 significantly improves the reliability and efficiency of the Kubernetes example test within CI environments. By introducing configurable parameters and a dedicated CI mode, the test can now dynamically adjust its behavior to wait longer for necessary resources (pods) to become available, while also terminating early once conditions are met. This change aims to reduce test flakiness and speed up CI feedback cycles without compromising test coverage. Highlights
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request improves the reliability of the Kubernetes example test on CI by introducing a configurable CI mode. In this mode, the test sends messages until it observes two distinct pods, with a maximum message limit to prevent indefinite runs. This is a solid approach to handle potential flakiness in a load-balanced environment. The implementation is correct. I've added a couple of suggestions to replace a magic number with a constant for better code maintainability.
examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java
Show resolved
Hide resolved
examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java
Show resolved
Hide resolved
- exit early once we have the two required pods - increased count until we expect 2 pods Fixes a2aproject#396 🦕
Fixes #396 🦕