[FLINK-40592][metrics] Fix PushGateway basic authentication without JAXB - #29151
Open
weicheng-07 wants to merge 1 commit into
Open
[FLINK-40592][metrics] Fix PushGateway basic authentication without JAXB#29151weicheng-07 wants to merge 1 commit into
weicheng-07 wants to merge 1 commit into
Conversation
Encode the Basic Authorization header with JDK Base64 and UTF-8 while preserving the default connection factory and credential configuration. Cover PUT and DELETE requests with regression tests that isolate JAXB. Generated-by: OpenAI Codex 0.153.4
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
Fixes FLINK-40592.
Configuring both credentials causes
PrometheusPushGatewayReporterto fail during initialization when JAXB is absent. Use JDK Base64 encoding so Basic authentication no longer requires JAXB.Brief change log
java.util.Base64, preserving the default connection factory and existing credential behavior.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 verifypassed on macOS aarch64 with JDK 17 and Maven 3.9.16: 34 tests, including all six new cases; Checkstyle, Spotless, and japicmp passed.6f0650c, including compilation, QA checks, all six module test groups, and all four E2E groups.Does this pull request potentially affect one of the following parts:
@Public(Evolving): yes — the reporter is@PublicEvolving; only private implementation changes, with no public signature or configuration changes.Documentation
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex 0.153.4