weicheng-07 opened a new pull request, #29151:
URL: https://github.com/apache/flink/pull/29151

   ## What is the purpose of the change
   
   Fixes [FLINK-40592](https://issues.apache.org/jira/browse/FLINK-40592).
   Configuring both credentials causes `PrometheusPushGatewayReporter` to fail 
during initialization when JAXB is absent. Use JDK Base64 encoding so Basic 
authentication no longer requires JAXB.
   
   ## Brief change log
   
   - Add a private connection factory that encodes the Authorization header 
with UTF-8 and `java.util.Base64`, preserving the default connection factory 
and existing credential behavior.
   - Add six parameterized cases that isolate JAXB and verify Authorization 
headers on HTTP PUT and DELETE, including non-ASCII, empty, absent, and 
incomplete credentials.
   
   ## Verifying this change
   
   Local verification was performed before applying the patch to the latest 
master, preserving the two changed files byte for byte.
   
   - `./mvnw -Djdk17 -Pjava17-target -pl flink-metrics/flink-metrics-prometheus 
clean verify` passed on macOS aarch64 with JDK 17 and Maven 3.9.16: 34 tests, 
including all six new cases; Checkstyle, Spotless, and japicmp passed.
   - Before the fix, the same new test reproduces three JAXB initialization 
errors; the other three cases pass.
   - Packaged-JAR checks reproduced the baseline failure. With the fix, all six 
cases passed using Java 11-targeted artifacts on Java 11 and Java 17-targeted 
artifacts on Java 17 and 21.
   - Earlier full-reactor verification did not pass completely: an unrelated 
`YARNSessionFIFOSecuredITCase` assertion still fails because it searches the 
current log file while the expected login message is in a rolled `.log.1` file. 
The explicit E2E profile and independent Python/tox suite were not run.
   
   ## 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)`: yes — the reporter is `@PublicEvolving`; only private 
implementation changes, with no public signature or configuration changes.
   - The serializers: no.
   - The runtime per-record code paths (performance sensitive): no.
   - Anything that affects deployment or recovery: no; the change is limited to 
metrics reporter authentication.
   - 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: OpenAI Codex 0.153.4
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to