You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "sangkyoonnam (via GitHub)" <gi...@apache.org> on 2026/10/20 16:00:36 UTC

[PR] [FLINK-40791][metrics] Expect the counter delta in OpenTelemetryMetricReporterITCase.testCounterDelta [flink]

sangkyoonnam opened a new pull request, #29534:
URL: https://github.com/apache/flink/pull/29534

   ## What is the purpose of the change
   
   `OpenTelemetryMetricReporterITCase.testCounterDelta` intermittently fails with `expected: 1234 but was: 25`. The reporter exports counter deltas, so the second report after `counter.inc(25)` contains 25, but the second check still expects 1234.
   
   `eventuallyConsumeJson` checks the last line of the collector's output file, and export completion does not guarantee that the collector has flushed the second report to that file. The wrong expectation can therefore pass by reading the first report. If the second report is already visible, the check keeps failing until the two-minute timeout. Expecting 25 makes the check wait for the second report.
   
   ## Brief change log
   
     - The second check in `testCounterDelta` expects the delta of the second report, 25.
   
   ## Verifying this change
   
   Verified on master at `77c3daea10d` with JDK 17. With a temporary 5 s delay before the second check, the original assertion failed after 126.9 s with `expected: 1234 but was: 25`; the corrected assertion passed under the same condition. The delay is not included in this PR. `./mvnw -pl flink-metrics/flink-metrics-otel clean verify` passes.
   
   Without the delay, `OpenTelemetryMetricReporterITCase` passed in seven of eight runs. One run timed out in the first check while reading empty collector output, before reaching the modified assertion; this change does not address that failure.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code 2.1.303 (Claude Opus 5.5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40791][metrics] Expect the counter delta in OpenTelemetryMetricReporterITCase.testCounterDelta [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #29534:
URL: https://github.com/apache/flink/pull/29534#issuecomment-6295597766

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e5e6bd56410cbd55298f94972a4b0605c4d5a733",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e5e6bd56410cbd55298f94972a4b0605c4d5a733",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e5e6bd56410cbd55298f94972a4b0605c4d5a733 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org