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 clusters list #6234

Merged
merged 1 commit into from
Oct 24, 2024
Merged

chore: add clusters list #6234

merged 1 commit into from
Oct 24, 2024

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Oct 22, 2024

Summary

Part of #5373


Important

Adds cluster data handling to the query service with new repository, API routes, and models.

  • Behavior:
    • Adds clustersRepo to APIHandler in http_handler.go for handling cluster data.
    • Registers new routes for clusters in RegisterInfraMetricsRoutes() in http_handler.go.
    • Implements getClusterAttributeKeys, getClusterAttributeValues, and getClusterList in infra.go.
  • Models:
    • Adds ClusterListRequest, ClusterListResponse, and ClusterListRecord to infra.go.
  • Repositories:
    • Introduces ClustersRepo in clusters.go with methods GetClusterAttributeKeys, GetClusterAttributeValues, and GetClusterList.
  • Utilities:
    • Adds getParamsForTopClusters() in common.go for query parameter handling.

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

@github-actions github-actions bot added the chore label Oct 22, 2024
@srikanthccv srikanthccv marked this pull request as ready for review October 24, 2024 06:15
@srikanthccv srikanthccv merged commit 3a16ce0 into k8s-namespaces Oct 24, 2024
7 checks passed
@srikanthccv srikanthccv deleted the k8s-cluster branch 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.

❌ Changes requested. Reviewed everything up to 5ecae7c in 49 seconds

More details
  • Looked at 501 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. pkg/query-service/app/infra.go:323
  • Draft comment:
    The error type for JSON decoding errors should be ErrorBadData instead of ErrorInternal to accurately reflect the nature of the error.
  • Reason this comment was not posted:
    Marked as duplicate.
2. pkg/query-service/app/inframetrics/clusters.go:1
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_qiihTsj9krQ8E9jx


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

req := model.ClusterListRequest{}

err := json.NewDecoder(r.Body).Decode(&req)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

The error type for JSON decoding errors should be ErrorBadData instead of ErrorInternal to accurately reflect the nature of the error.

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