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 #686

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

K-Diger
Copy link

@K-Diger K-Diger commented Nov 30, 2024

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

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 November 30, 2024 06:06
@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 Nov 30, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi K-Diger! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@Haarolean
Copy link
Member

N/A and 0 values for this field are two distinct things, please see provectus/kafka-ui#3728 for more details. Unless you can provide additional information on why we should treat both the same, I doubt we need these changes. Let me know what you think.

Copy link

kapybro bot commented Dec 5, 2024

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

@kapybro kapybro bot assigned K-Diger Dec 5, 2024
@K-Diger
Copy link
Author

K-Diger commented Dec 6, 2024

@Haarolean

N/A and 0 values for this field are two distinct things, please see provectus/kafka-ui#3728 for more details. Unless you can provide additional information on why we should treat both the same, I doubt we need these changes. Let me know what you think.

Since the server responds with exactly 0, I think this is different from the situation where it displays 'N/A' for the issue you tagged.

{
    "pageCount": 1,
    "consumerGroups": [
        {
            "inherit": "ConsumerGroupDTO",
            "groupId": "connect-secom-alarm-sink-connector",
            "members": 1,
            "topics": 1,
            "simple": false,
            "partitionAssignor": "range",
            "state": "STABLE",
            "coordinator": {
                "id": 1,
                "host": "�localhost",
                "port": 29092,
                "bytesInPerSec": null,
                "bytesOutPerSec": null,
                "partitionsLeader": null,
                "partitions": null,
                "inSyncPartitions": null,
                "partitionsSkew": null,
                "leadersSkew": null
            },
            "consumerLag": 0
        }
    ]
}

The value displayed in the JSON response above is the same as the photo I attached.

스크린샷 2024-12-06 오전 10 24 23

In conclusion, the tagged issue appears to be a proposal to indicate N/A when data cannot be loaded.

What I am suggesting is to not represent 0 as 'N/A'.

Also /ui/clusters/kafka_cluster/consumer-groups/{consumer-group-name}

In the URL above, the receiving consumer LAG will receive something labeling 0 if it receives 0 from the server.

{
    "inherit": "details",
    "groupId": "connect-secom-alarm-sink-connector",
    "members": 1,
    "topics": 1,
    "simple": false,
    "partitionAssignor": "range",
    "state": "STABLE",
    "coordinator": {
        "id": 2,
        "host": "localhost",
        "port": 29092,
        "bytesInPerSec": null,
        "bytesOutPerSec": null,
        "partitionsLeader": null,
        "partitions": null,
        "inSyncPartitions": null,
        "partitionsSkew": null,
        "leadersSkew": null
    },
    "consumerLag": 0,
    "partitions": [
        {
            "topic": "tlm.v1.secom-alarm",
            "partition": 0,
            "currentOffset": 33682842,
            "endOffset": 33682842,
            "consumerLag": 0,
            "consumerId": "connector-consumer-secom-alarm-sink-connector-0-eb96be4f-dcdf-47c4-8267-f0505116c6e9",
            "host": "localhost"
        }
    ]
}

Copy link

kapybro bot commented Dec 6, 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