Skip to content

fix(coral): resolve schemaEnv param to Kafka env in schema request form - #3086

Merged
aindriu-aiven merged 3 commits into
mainfrom
2773-coral-schema-redirect-bug
Nov 25, 2026
Merged

aindriu-aiven merged 3 commits into
mainfrom
2773-coral-schema-redirect-bug

Conversation

@programmiri

Copy link
Copy Markdown
Contributor

Linked issue

Resolves: #2773

What kind of change does this PR introduce?

  • Bug fix
  • New feature
  • Refactor
  • Docs update
  • CI update

What is the current behavior?

  • see bug report

Recording bug

bug-recording.mov

What is the new behavior?

Recording fix

bug-fix.mov

Changes

The button passed the schema registry env name as URL param, but the guard in TopicSchemaRequest only matched Kafka env id/name from getAllEnvironmentsForTopicAndAcl(). When no match was found, it redirected back.

Changes

  • Renamed URL param env to schemaEnv to be more clear (only way this param was used)
  • Resolve schemaEnv via useMemo to the matching Kafka env (associatedEnv) and set the form value to the Kafka env id
  • If schemaEnv can't be resolved (unknown value, or env where the Kafka association was removed): show a warning alert and disable submit instead of a silent redirect
  • added regression tests
Notes

Potential follow ups:

  • internal link button now causes redirect that flickers
  • investigate if / how we could handle missing associated env better, for example right now, when I have a topic on a cluster and that has a schema, but my schema env in Klaw is not associated to the kafka env my cluster belongs to, I see warning that this topic has no schemas and the button to create one is diabled without explanation

Signed-off-by: Mirjam Aulbach <me@programmiri.rocks>
@programmiri programmiri self-assigned this Nov 21, 2026

@aindriu-aiven aindriu-aiven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM thank you for this

@aindriu-aiven
aindriu-aiven merged commit e70977f into main Nov 25, 2026
18 checks passed
@aindriu-aiven
aindriu-aiven deleted the 2773-coral-schema-redirect-bug branch November 25, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coral UI: Request a new schema version button doesn't work

2 participants