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

FE: Fix Default Consumer's Lag Value with nullish coalescing #720

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

K-Diger
Copy link

@K-Diger K-Diger commented Dec 20, 2024

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

Reasons for setting up Git incorrectly
#686
created a new PR with the same content as the PR above.

close #675

The default value of Consumer Lag displayed when searching the Consumer List has been modified.

The existing displayed value is 'N/A', which is different from the response value of '0' that the server responds to.

We believe that 'N/A' may mean a state of disuse, so we write it as 0 to make it clear.

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@K-Diger K-Diger requested a review from a team as a code owner December 20, 2024 05:05
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress area/consumers status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Dec 20, 2024
@Haarolean
Copy link
Member

  1. There's no need to spam with PRs, in favor of keeping the history. You can rebase or merge your PRs.
  2. I still have no faintest clue what you are trying to achieve here
    As I mentioned in your previous PR (FE: Fix Default Consumer's Lag Value #686 (comment)), 0 and N/A are two distinct values.
    The current implementation looks fine, we interpret both values separately. With your changes, replacing a logical or with a bullish coalesce operator, you'd mutate the 0 value into being displayed as 0 rather than N/A.
image

Please cover your changes with unit tests, thanks.

Copy link

kapybro bot commented Dec 20, 2024

Further user feedback is requested. Please reply within 7 days or we might close the issue.

@K-Diger
Copy link
Author

K-Diger commented Dec 20, 2024

  1. I still have no faintest clue what you are trying to achieve here

Before adding unit test code, I will first explain my position on your response.

The intention is to apply the results you tested in the console to the actual service.

When you test on the console, if 0 is assigned to the variable value,

When you run the existing code, you may have seen it displayed as 'N/A'.

However, in the code I modified, it be displayed as 0.

This is my intention with this example.

This is because 'N/A' has a different meaning from '0'.

To summarize again:
If the server responds with a Consumer Lag value of 0, it must be displayed as 0.

I only want to mark as N/A situations where Consumer Lag cannot be delivered due to an actual problem within the server, such as a Null on the server, or a problem within the Kafka ecosystem.

I think '0' and 'N/A' should be interpreted differently.

Copy link

kapybro bot commented Dec 20, 2024

Thanks for the additional feedback! We'll get back to your issue soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/consumers status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I propose to modify the notation method when the LAG of Consumer Group is 0.
2 participants