Skip to content

[BP-2.3][FLINK-40592][metrics] Fix PushGateway basic authentication without JAXB - #29170

Merged
MartijnVisser merged 1 commit into
apache:release-2.3from
weicheng-07:flink-40592-release-2.3
Sep 14, 2026
Merged

[BP-2.3][FLINK-40592][metrics] Fix PushGateway basic authentication without JAXB#29170
MartijnVisser merged 1 commit into
apache:release-2.3from
weicheng-07:flink-40592-release-2.3

Conversation

@weicheng-07

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Backport of #29151 (master commit 189b6ca8313ada196596cb53315866e7a531d441) to release-2.3 for FLINK-40592.

Fix PrometheusPushGatewayReporter initialization with Basic authentication when JAXB is absent.

Brief change log

  • Encode the Authorization header with JDK Base64 and UTF-8, preserving the default connection factory and existing credential handling.
  • Include six JAXB-isolated regression cases covering Authorization headers on PUT and DELETE requests.

Verifying this change

  • ./mvnw -Djdk17 -Pjava17-target -pl flink-metrics/flink-metrics-prometheus clean verify passed on release-2.3 for commit 10eb8b30 with Maven 3.8.6 and JDK 17: 34 tests, including all six authentication cases; Checkstyle, Spotless, and japicmp passed.
  • The original 28 module tests pass on the unmodified branch. With the regression test added, the unfixed reporter produces three expected JAXB initialization errors; the other three cases pass.
  • Community CI is pending.

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?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex 0.153.4

…AXB (apache#29151)

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
Co-authored-by: jiweicheng <jiweicheng@soulapp.cn>
(cherry picked from commit 189b6ca)
@flinkbot

flinkbot commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@weicheng-07

Copy link
Copy Markdown
Contributor Author

The e2e_2_ci job in Azure build 79023 failed in the Kubernetes Materialized Table test because pulling minio/minio:latest returned pull access denied, leaving the S3 endpoint as http://.

All 34 Prometheus tests passed, including the six authentication regression cases. This failure appears unrelated to the backport. MinIO was replaced on master in #28369, while release-2.3 still uses it. Could you advise on the preferred handling of this CI dependency for release-2.3?

@MartijnVisser

Copy link
Copy Markdown
Contributor

I'll look into that issue, and merge this one. Thanks @weicheng-07

@MartijnVisser
MartijnVisser merged commit ad50e9b into apache:release-2.3 Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants