Skip to content

test(routing): stabilise TopologyServiceIT topic id resolution - #4973

Merged
k-wall merged 1 commit into
kroxylicious:mainfrom
robobario:fix/topology-it-metadata-propagation
Sep 25, 2026
Merged

k-wall merged 1 commit into
kroxylicious:mainfrom
robobario:fix/topology-it-metadata-propagation

Conversation

@robobario

Copy link
Copy Markdown
Member

Type of change

  • Bugfix

Description

createTopics returns once the controller commits the creation, but the metadata may not have reached the broker that serves the subsequent describeTopics. That broker replies UnknownTopicOrPartition until the metadata propagates, surfacing as "This server does not host this topic-partition" and failing the test intermittently.

Retry the describe via Awaitility until the broker can resolve the topic, using succeedsWithin so a transiently failed future retries rather than aborting the await.

Note that I think it could be a good utility to add to the junit extension, the lazy propagation of new topic metadata to brokers bites us regularly so maybe it would be good if all happy-path topic creations flow through a utility method, or use a shared waitForTopicMetadata type method. I think we want an explicit utility type method rather than adding any specialized behaviours to the Closeable Clients so as not to diverge from the upstream apache kafka client code.

Assisted-by: Claude Opus 4.8 [email protected]

Closes #4963

Checklist

The checklist is used to help Committers judge a PR's readiness for merge.
Contributors: please check off items you consider done.

  • New tests written (where applicable).
  • If making a user-facing change, documentation is provided, or if the intent is to provide documentation in a follow up PR, an issue is raised tracking the need for the documentation update. Link the to issue in this checklist.
  • Existing unit/integration/system tests passing.
  • Any Sonarcloud warnings are addressed (or suppressed with @SuppressWarnings and a justifying comment).
  • PR references related GitHub issue(s) so they are closed on merging.
  • If AI tools assisted with code changes, ensure commit messages include Assisted-by: trailer (see DEV_GUIDE.md).
  • For user facing changes, add a logchange entry YAML file to changelog/unreleased/ (remember to include changes affecting the API of the test artefacts too). See DEV_GUIDE.md for the entry format.

@robobario
robobario requested a review from a team as a code owner September 23, 2026 03:57
@robobario robobario added kind/bug Something isn't working test Relates to testing labels Sep 23, 2026
@robobario

Copy link
Copy Markdown
Member Author

failed on a blimmin 403 to central, seems to be more frequent last few days

[ERROR] Failed to execute goal on project kroxylicious-integration-tests: Could not collect dependencies for project io.kroxylicious:kroxylicious-integration-tests:jar:0.25.0-SNAPSHOT
[ERROR] Failed to read artifact descriptor for org.bitbucket.b_c:jose4j:jar:0.9.7
[ERROR] 	Caused by: The following artifacts could not be resolved: org.bitbucket.b_c:jose4j:pom:0.9.7 (absent): Could not transfer artifact org.bitbucket.b_c:jose4j:pom:0.9.7 from/to central (https://repo.maven.apache.org/maven2): status code: 403, reason phrase: Forbidden (403)

@robobario
robobario force-pushed the fix/topology-it-metadata-propagation branch 3 times, most recently from ce82718 to d291721 Compare September 24, 2026 23:19

@k-wall k-wall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Thanks @robobario

createTopics returns once the controller commits the creation, but the
metadata may not have reached the broker that serves the subsequent
describeTopics. That broker replies UnknownTopicOrPartition until the
metadata propagates, surfacing as "This server does not host this
topic-partition" and failing the test intermittently.

Retry the describe via Awaitility until the broker can resolve the topic,
using succeedsWithin so a transiently failed future retries rather than
aborting the await.

Assisted-by: Claude Opus 4.8 <[email protected]>
Signed-off-by: Robert Young <[email protected]>
@k-wall
k-wall force-pushed the fix/topology-it-metadata-propagation branch from d291721 to 0d71c71 Compare September 25, 2026 17:21
@k-wall
k-wall enabled auto-merge (squash) September 25, 2026 17:21
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@k-wall
k-wall merged commit 3a4e1ce into kroxylicious:main Sep 25, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working test Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Non-Deterministic Test TopologyServiceIT

2 participants