Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coral): Subscription details: Fix consumer offsets #2017

Merged
merged 7 commits into from
Nov 24, 2023

Conversation

mathieu-anderson
Copy link
Contributor

Linked issue

Resolves: #1453

What kind of change does this PR introduce?

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

What is the current behavior?

The consumers offset is a dynamic value which should only be displayed on user request, and should be able to be refetched on user request.

Currently it is fetched once and then cached. It also only shows the offsets for partion 0.

What is the new behavior?

  • Do not fetch when viewing a subscription detail modal
  • Fetch when clicking the fetch button
  • Refetch when clicking the button again
  • Remove cached value from react-query when modal is closed
Screen.Recording.2023-11-23.at.17.08.07.mov

Other information

  • made OffsetDetails model prperties required for openapi spec.
  • removed prettier check on openapi.yaml, it's autogenerated. Also, thought I did that before :o

Requirements (all must be checked before review)

  • The pull request title follows our guidelines
  • Tests for the changes have been added (if relevant)
  • The latest changes from the main branch have been pulled
  • pnpm lint has been run successfully

Sorry, something went wrong.

Mathieu Anderson added 2 commits November 23, 2023 16:34

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…ions

Signed-off-by: Mathieu Anderson <mathieu.anderson@aiven.io>
…ier check on openapi.yaml

Signed-off-by: Mathieu Anderson <mathieu.anderson@aiven.io>
@mathieu-anderson mathieu-anderson added bug Something isn't working enhancement New feature or request Backend Backend tasks Frontend Relates to coral (react app) labels Nov 23, 2023
@mathieu-anderson mathieu-anderson self-assigned this Nov 23, 2023
Mathieu Anderson added 3 commits November 23, 2023 17:18
@@ -36,9 +36,6 @@
],
"**/*.{md, css}": [
"prettier --check"
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Weird, I also thought we've already removed that 🤔

onClick: closeDetailsModal,
onClick: () => {
closeDetailsModal();
queryClient.removeQueries({ queryKey: ["getConsumerOffsets"] });
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL about removeQueries 💡

@programmiri programmiri merged commit f0aff57 into main Nov 24, 2023
21 checks passed
@programmiri programmiri deleted the 1453-fix-consumer-offsets branch November 24, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Backend tasks bug Something isn't working enhancement New feature or request Frontend Relates to coral (react app)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(coral): Topic details - Subscriptions: do not eagerly fetch Consumer offset in Subscription details modal
2 participants