HPCC-34064 New getPODs response structure#19843
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the HPCC getPODs response structure to align with the new WsCloud API and adjusts related components and configurations accordingly.
- Updated tsconfig.json to target ES2020.
- Refactored the usePods hook to extract and format pod details based on the new WsCloud.Pod structure.
- Adjusted the UI grid columns in the Pods component to reflect the updated pod property names.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| esp/src/tsconfig.json | Upgraded library target from ES2019 to ES2020. |
| esp/src/src-react/hooks/cloud.ts | Updated pod extraction logic and type interface usage. |
| esp/src/src-react/components/Pods.tsx | Updated column names to match new pod property keys. |
| esp/src/package.json | Removed deprecated dependency on @kubernetes/client-node. |
5a7f0c1 to
7b80882
Compare
|
@jeclrsg this is dependent on: hpcc-systems/Visualization#4377 |
|
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-34064 Jirabot Action Result: |
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the pod response structure to align with the new API while also modernizing the TypeScript configuration and cleaning up unused dependencies.
- Updated tsconfig.json to use ES2020.
- Refactored the usePods hook and associated components (Pods.tsx) to reference new pod property names (e.g. Name, ContainerName, Status, etc.).
- Removed the dependency on @kubernetes/client-node from package.json.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| esp/src/tsconfig.json | Updated lib from ES2019 to ES2020 to support new JavaScript features. |
| esp/src/src-react/hooks/cloud.ts | Modified usePods hook to extract new pod properties and refactored mapping logic. |
| esp/src/src-react/components/Pods.tsx | Updated column definitions to reflect new pod property naming. |
| esp/src/package.json | Removed unused dependency on @kubernetes/client-node. |
Comments suppressed due to low confidence (4)
esp/src/package.json:65
- Ensure that the removal of the '@kubernetes/client-node' dependency is intentional and that no remaining code relies on it.
"@kubernetes/client-node": "1.0.0",
esp/src/tsconfig.json:25
- Ensure that updating the lib to ES2020 aligns with the project's target environments and does not impact compatibility with older browsers or runtime environments.
"ES2020"
esp/src/src-react/hooks/cloud.ts:87
- Confirm that the new API response includes the property 'Name' as expected for pod names; adjust the mapping if the property differs.
return pods.map(pod => pod.Name);
esp/src/src-react/components/Pods.tsx:33
- Verify that the new API response includes 'ContainerName' so that the column mapping displays container names correctly.
ContainerName: { label: nlsHPCC.Container, width: 120 },
7b80882 to
12cae72
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the getPODs response structure and adapts the corresponding front-end components to use the new field names and API changes. Key changes include:
- Upgrading the tsconfig lib from ES2019 to ES2020.
- Adapting pod data extraction and mapping in cloud hooks, including introducing a new extractPorts helper.
- Updating grid column mappings in the Pods component and bumping various dependencies in package.json.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| esp/src/tsconfig.json | Upgraded library target to ES2020. |
| esp/src/src-react/hooks/cloud.ts | Modified pod mapping, replaced V1Pod with WsCloud.Pod, and removed filtering based on labels. |
| esp/src/src-react/components/Pods.tsx | Updated grid columns to align with the new pod property names. |
| esp/src/package.json | Bumped several dependency versions. |
Comments suppressed due to low confidence (2)
esp/src/src-react/hooks/cloud.ts:59
- [nitpick] Ensure that the properties 'ContainerReadyCount' and 'ContainerCount' used here are consistently defined in the API response and that their naming aligns with the rest of the codebase.
ready: `${pod.ContainerReadyCount}/${pod.ContainerCount}`,
esp/src/src-react/hooks/cloud.ts:52
- The filtering logic based on the 'app.kubernetes.io/part-of' label was removed. Please confirm that this change is intentional as it may lead to processing pods from unexpected sources.
service.getPODs().then(pods => {
12cae72 to
21393f9
Compare
21393f9 to
b07f8e1
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR updates the getPODs response structure for the HPCC platform by adjusting the pod data mapping in the hooks and components, along with related dependency and configuration updates.
- Upgrade TypeScript configuration to ES2020
- Refactor the usePods hook to use WsCloud.Pod and adjust pod property naming
- Update package versions for @hpcc-js modules and remove @kubernetes/client-node
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| esp/src/tsconfig.json | Updated lib from ES2019 to ES2020 |
| esp/src/src-react/hooks/cloud.ts | Refactored usePods mapping using WsCloud.Pod and introduced extractPorts |
| esp/src/src-react/components/Pods.tsx | Updated column definitions to use capitalized property names |
| esp/src/package.json | Upgraded module versions and removed an unused dependency |
Files not reviewed (1)
- esp/src/package-lock.json: Language not supported
Comments suppressed due to low confidence (2)
esp/src/src-react/components/Pods.tsx:33
- [nitpick] The change from using lowercase property names (e.g., 'name') to capitalized ones (e.g., 'Name', 'ContainerName') requires careful alignment with the underlying API in usePods. Ensure that these naming updates correctly reflect the API response structure.
ContainerName: { label: nlsHPCC.Container, width: 120 },
esp/src/src-react/hooks/cloud.ts:52
- The removal of the filter that limited pods to those with the 'app.kubernetes.io/part-of' label may inadvertently include unintended pods in the result. Please confirm that this behavior change is intentional.
service.getPODs().then(pods => {
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
b07f8e1 to
70137eb
Compare
|
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: