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

chore: add namesapce list #6232

Merged
merged 3 commits into from
Oct 24, 2024
Merged

chore: add namesapce list #6232

merged 3 commits into from
Oct 24, 2024

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Oct 21, 2024

Summary

Part of #5373


Important

Add namespace handling to query service with new repository, API routes, and model support.

  • Behavior:
    • Add namespacesRepo to APIHandler in http_handler.go.
    • Register new namespace routes in RegisterInfraMetricsRoutes() in http_handler.go.
    • Add methods getNamespaceAttributeKeys, getNamespaceAttributeValues, and getNamespaceList in infra.go.
  • Repositories:
    • Create NamespacesRepo in namespaces.go with methods for fetching namespace attributes and lists.
    • Implement getMetadataAttributes and getTopNamespaceGroups in namespaces.go.
  • Models:
    • Add NamespaceListRequest, NamespaceListResponse, and NamespaceListRecord to infra.go.
  • Misc:
    • Add getParamsForTopNamespaces in common.go for namespace query parameters.

This description was created by Ellipsis for 7cb8e4e. It will automatically update as commits are pushed.

@github-actions github-actions bot added the chore label Oct 21, 2024
@srikanthccv srikanthccv marked this pull request as ready for review October 24, 2024 06:15
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 7cb8e4e in 42 seconds

More details
  • Looked at 530 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. pkg/query-service/app/inframetrics/namespaces.go:181
  • Draft comment:
    Ensure that req.Offset + req.Limit does not exceed the length of formattedResponse[0].Series to prevent slicing out of bounds.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. pkg/query-service/app/http_handler.go:112
  • Draft comment:
    Avoid adding non-ClickHouse related functions to the ClickHouseReader interface. Use the DAO in the telemetry instance for namespace-related functions instead. This applies to the addition of namespacesRepo.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment suggests a design concern about adding non-ClickHouse related functions to the ClickHouseReader interface. However, the diff does not show any changes to the ClickHouseReader interface itself, only the addition of a new repository to the APIHandler struct. Without evidence of changes to the ClickHouseReader interface, the comment seems speculative.
    I might be missing the context of how namespacesRepo is used elsewhere in the codebase, but based on the diff alone, there is no indication that it affects the ClickHouseReader interface.
    The comment should be evaluated based on the changes in the diff. Since the diff does not show changes to the ClickHouseReader interface, the comment seems speculative and not directly related to the changes made.
    The comment should be deleted as it does not directly relate to the changes made in the diff and seems speculative.

Workflow ID: wflow_FCdLW8QAvgs9AFEz


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srikanthccv srikanthccv merged commit 36012c9 into k8s-nodes Oct 24, 2024
7 checks passed
@srikanthccv srikanthccv deleted the k8s-namespaces branch October 24, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants