-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: implement namespaces list table in infra monitoring #6617
feat: implement namespaces list table in infra monitoring #6617
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
ef641e7
to
2e8350b
Compare
0e1f256
to
728f325
Compare
26a6959
to
b5d57e1
Compare
728f325
to
d5cd9f7
Compare
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this 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 98e5fe6 in 1 minute and 44 seconds
More details
- Looked at
947
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/api/infraMonitoring/getK8sNamespacesList.ts:53
- Draft comment:
Useresponse.status
instead of hardcoded200
for statusCode to ensure it reflects the actual response status. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
This is a new API endpoint file. The comment suggests a change that could make the code more dynamic, but there are several issues: 1) This is a success case in the try block, so we know it succeeded 2) Axios successful responses always have status 200 3) The statusCode is part of our own response wrapper, not the HTTP status 4) The suggestion could actually introduce bugs if the backend returns a different 2xx status code.
Maybe using response.status would be more accurate for non-200 success codes like 201 Created. The current approach might hide important status information.
This is a GET endpoint that returns a list - it will always be 200 on success. Other status codes would be caught in the catch block and handled by ErrorResponseHandler.
The comment should be deleted. The hardcoded 200 is correct here as it's in the success path, and using response.status could actually introduce bugs.
2. frontend/src/api/infraMonitoring/getK8sNamespacesList.ts:55
- Draft comment:
Useresponse.statusText
instead of hardcoded 'Success' for the message to ensure it reflects the actual response message. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is about code style/implementation choice, not a clear bug. Using response.statusText isn't necessarily better - it would make the response message less predictable and consistent. The hardcoded 'Success' is a deliberate choice to provide a consistent response format. HTTP status texts can vary between servers and implementations.
Maybe using the actual HTTP status text would provide more detailed information about the response. The hardcoded message could hide useful information.
The purpose of this message field seems to be providing a consistent, predictable success indicator rather than detailed status information. The actual response data is already included in the payload.
This comment should be deleted as it suggests a change that isn't clearly better and could make the API response less consistent.
Workflow ID: wflow_rotZg7lxf6EgSuYM
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.
98e5fe6
to
a0c8bf9
Compare
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on a0c8bf9 in 1 minute and 3 seconds
More details
- Looked at
757
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/InfraMonitoringK8s.tsx:324
- Draft comment:
Avoid using inline styles in React components. Instead, use external stylesheets, CSS classes, or styled components. This applies to all similar instances in this file. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_UgbcDEXuPKcSMRQY
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.
return ( | ||
<div className="pod-group"> | ||
{groupByValues.map((value) => ( | ||
<Tag key={value} color="#1D212D" className="pod-group-tag-item"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use design tokens or predefined color constants instead of hardcoding color values in the Tag
component.
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this 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! Incremental review on 384b309 in 25 seconds
More details
- Looked at
111
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Namespaces/K8sNamespacesList.tsx:325
- Draft comment:
Ensure that settingshowHeader={false}
is intentional. Hiding table headers can reduce clarity for users. - Reason this comment was not posted:
Confidence changes required:50%
TheshowHeader
property is set tofalse
for theTable
component, which might not be the intended behavior if headers are needed for clarity.
2. frontend/src/container/InfraMonitoringK8s/Namespaces/utils.tsx:28
- Draft comment:
Ensure that the renaming ofcpuUsage
tocpu
andmemoryUsage
tomemory
is consistent across the codebase. This change is also applicable inK8sNamespacesRowData
andcolumnsConfig
. - Reason this comment was not posted:
Confidence changes required:50%
Thecpu
andmemory
fields have been renamed fromcpuUsage
andmemoryUsage
. Ensure consistency across the codebase.
Workflow ID: wflow_wV26lGxAs0EeFQm3
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this 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! Incremental review on 79e07b7 in 12 seconds
More details
- Looked at
24
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. frontend/src/hooks/infraMonitoring/useGetK8sNamespacesList.ts:37
- Draft comment:
The change fromGET_HOST_LIST
toGET_NAMESPACE_LIST
in the query key is correct and aligns with the new functionality of fetching namespaces. - Reason this comment was not posted:
Confidence changes required:0%
The change fromGET_HOST_LIST
toGET_NAMESPACE_LIST
in the query key is correct and aligns with the new functionality of fetching namespaces.
2. frontend/src/hooks/infraMonitoring/useGetK8sNamespacesList.ts:37
- Draft comment:
Ensure thatREACT_QUERY_KEY.GET_NAMESPACE_LIST
is defined inreactQueryKeys.ts
to maintain consistency and avoid hardcoding. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_OBlofEjwc5hhz7Da
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
c89ffab
to
79cae2d
Compare
a294614
to
6855009
Compare
2edb730
to
579c7cb
Compare
579c7cb
to
22a33e3
Compare
79e07b7
to
ec352eb
Compare
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on ec352eb in 59 seconds
More details
- Looked at
3965
lines of code in38
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. frontend/src/api/infraMonitoring/getK8sNamespacesList.ts:60
- Draft comment:
Consider adding validation for the response data to ensure it matches the expected structure. This can help prevent runtime errors if the API response changes unexpectedly. - Reason this comment was not posted:
Confidence changes required:50%
The functiongetK8sNamespacesList
is used to fetch data, but there is no validation or error handling for the response data. This could lead to runtime errors if the response structure is not as expected.
2. frontend/src/hooks/infraMonitoring/useGetK8sNamespacesList.ts:34
- Draft comment:
EnsurequeryKey
is always returned as an array for consistency with React Query's expectations. Ifoptions.queryKey
is a string, consider wrapping it in an array. - Reason this comment was not posted:
Confidence changes required:50%
ThequeryKey
in theuseGetK8sNamespacesList
hook is constructed based on theoptions.queryKey
. However, ifoptions.queryKey
is a string, it is returned directly, which might not be the intended behavior as it should be an array for consistency with React Query's expectations.
3. frontend/src/container/InfraMonitoringK8s/Namespaces/NamespaceDetails/Traces/constants.ts:95
- Draft comment:
Consider generating a unique ID for each query instance to avoid potential conflicts when multiple queries are executed simultaneously. - Reason this comment was not posted:
Confidence changes required:50%
ThegetNamespaceTracesQueryPayload
function uses a hardcoded UUID for the query ID. This could lead to issues if multiple instances of this function are used simultaneously, as they would share the same ID.
Workflow ID: wflow_bKMCHPmD86ouUkLl
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.
return ( | ||
<div className="pod-group"> | ||
{groupByValues.map((value) => ( | ||
<Tag key={value} color="#1D212D" className="pod-group-tag-item"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use design tokens or predefined color constants instead of hardcoding color values for consistency.
There was a problem hiding this 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! Incremental review on 4f07338 in 21 seconds
More details
- Looked at
126
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_wStJCZjRjMhhFo54
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
2 similar comments
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this 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! Incremental review on 7a9b5d5 in 1 minute and 12 seconds
More details
- Looked at
517
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/commonUtils.tsx:207
- Draft comment:
Avoid using inline styles. Use CSS classes or styled components instead. - Reason this comment was not posted:
Marked as duplicate.
2. frontend/src/container/InfraMonitoringK8s/Namespaces/utils.tsx:137
- Draft comment:
Avoid using inline styles. Use CSS classes or styled components instead. This is also applicable in other parts of the code where inline styles are used. - Reason this comment was not posted:
Comment was on unchanged code.
3. frontend/src/container/InfraMonitoringK8s/Namespaces/K8sNamespacesList.tsx:508
- Draft comment:
Avoid using inline styles. Use CSS classes or styled components instead. This is also applicable in other parts of the code where inline styles are used. - Reason this comment was not posted:
Marked as duplicate.
4. frontend/src/container/InfraMonitoringK8s/Namespaces/NamespaceDetails/Events/NamespaceEvents.tsx:184
- Draft comment:
Avoid using inline styles. Use CSS classes or styled components instead. This is also applicable in other parts of the code where inline styles are used. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_ksUuYqNttACdxdhr
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
type: 'tag', | ||
isColumn: true, | ||
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already exists
key: 'responseStatusCode-string-tag', | ||
width: 145, | ||
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see and refactor code accordingly to reduce these larger duplications with the already merged code and with the other 3 PRs
7a9b5d5
to
f6c7740
Compare
dfcc2b4
to
de33336
Compare
Generated with ❤️ by ellipsis.dev |
…monitoring-k8s-namespaces
22cae31
into
feat/infra-monitoring-k8s-deployments
Summary
Implement namespaces entity in Infra Monitoring
Related Issues / PR's
N/A
Screenshots
N/A
Affected Areas and Manually Tested Areas
Infra Monitoring section
Important
Implement Kubernetes namespaces monitoring in Infra Monitoring with list and detail views, including metrics, logs, events, and traces.
InfraMonitoringK8s
.getK8sNamespacesList
function ingetK8sNamespacesList.ts
.useGetK8sNamespacesList
hook inuseGetK8sNamespacesList.ts
.NamespaceDetails
,NamespaceMetrics
,NamespaceLogs
,NamespaceEvents
, andNamespaceTraces
components..scss
files.utils.tsx
for formatting and data handling.reactQueryKeys.ts
andconstants.ts
with new keys and configurations.This description was created by for 7a9b5d5. It will automatically update as commits are pushed.