improve yaml IT infra - #4171
Conversation
derrickaw
commented
Aug 21, 2026
- fix potential resource leak
- wait for additional job state of unknown
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (12.50%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4171 +/- ##
=============================================
+ Coverage 33.88% 55.89% +22.01%
- Complexity 503 7473 +6970
=============================================
Files 215 1134 +919
Lines 13133 70132 +56999
Branches 1304 8013 +6709
=============================================
+ Hits 4450 39203 +34753
- Misses 8318 28382 +20064
- Partials 365 2547 +2182
🚀 New features to boost your workflow:
|
Summary of ChangesHello, 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 enhances the stability and resource management of the integration testing infrastructure. By refining the polling logic for Dataflow jobs and ensuring proper disposal of Iceberg catalog resources, the changes improve the reliability of test execution and prevent resource accumulation. Highlights
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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the Dataflow pipeline launcher to treat the UNKNOWN job state as pending, and updates the Iceberg resource manager to safely close the cached catalog during cleanup. Regarding the changes in the pipeline launcher, there is a concern that waiting indefinitely on an UNKNOWN state could lead to infinite loops and hang the test suite; it is recommended to implement a timeout or retry limit for this state.
| while (PENDING_STATES.contains(state) || state == JobState.UNKNOWN) { | ||
| if (!logOnce) { | ||
| LOG.info("Job still pending. Will check again in 15 seconds"); | ||
| LOG.info("Job still pending or unknown. Will check again in 15 seconds"); | ||
| logOnce = true; |
There was a problem hiding this comment.
Waiting indefinitely when the job state is UNKNOWN can lead to infinite loops and hang the integration test suite in CI/CD pipelines if the job fails to initialize or is permanently in an unknown state. Consider adding a maximum retry limit or timeout for the UNKNOWN state to prevent potential hangs.
int unknownStateCount = 0;
while (PENDING_STATES.contains(state) || state == JobState.UNKNOWN) {
if (state == JobState.UNKNOWN) {
unknownStateCount++;
if (unknownStateCount > 10) {
throw new RuntimeException("Job state remained UNKNOWN for too long (exceeded 150 seconds).");
}
} else {
unknownStateCount = 0;
}
if (!logOnce) {
LOG.info("Job still pending or unknown. Will check again in 15 seconds");
logOnce = true;