Skip to content

HPCC-34064 New getPODs response structure#19843

Merged
GordonSmith merged 1 commit into
hpcc-systems:candidate-9.6.xfrom
GordonSmith:HPCC-34064-BUMP_GETPODS_VERSION
May 16, 2025
Merged

HPCC-34064 New getPODs response structure#19843
GordonSmith merged 1 commit into
hpcc-systems:candidate-9.6.xfrom
GordonSmith:HPCC-34064-BUMP_GETPODS_VERSION

Conversation

@GordonSmith

@GordonSmith GordonSmith commented May 8, 2025

Copy link
Copy Markdown
Member

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

@GordonSmith GordonSmith requested review from Copilot and jeclrsg May 8, 2025 12:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread esp/src/src-react/hooks/cloud.ts Outdated
@GordonSmith GordonSmith force-pushed the HPCC-34064-BUMP_GETPODS_VERSION branch from 5a7f0c1 to 7b80882 Compare May 8, 2025 12:16
@GordonSmith

Copy link
Copy Markdown
Member Author

@jeclrsg this is dependent on: hpcc-systems/Visualization#4377

@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown

Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-34064

Jirabot Action Result:
Workflow Transition To: Merge Pending
Updated PR

@GordonSmith GordonSmith requested a review from Copilot May 9, 2025 09:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 },

@GordonSmith GordonSmith force-pushed the HPCC-34064-BUMP_GETPODS_VERSION branch from 7b80882 to 12cae72 Compare May 13, 2025 09:54
@GordonSmith GordonSmith requested a review from Copilot May 13, 2025 09:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 => {

@GordonSmith GordonSmith force-pushed the HPCC-34064-BUMP_GETPODS_VERSION branch from 12cae72 to 21393f9 Compare May 13, 2025 10:00
@GordonSmith GordonSmith force-pushed the HPCC-34064-BUMP_GETPODS_VERSION branch from 21393f9 to b07f8e1 Compare May 14, 2025 12:15
@GordonSmith GordonSmith marked this pull request as ready for review May 14, 2025 12:15
@GordonSmith GordonSmith requested a review from Copilot May 14, 2025 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@GordonSmith GordonSmith force-pushed the HPCC-34064-BUMP_GETPODS_VERSION branch from b07f8e1 to 70137eb Compare May 14, 2025 14:38
@GordonSmith GordonSmith merged commit 3902325 into hpcc-systems:candidate-9.6.x May 16, 2025
52 checks passed
@github-actions

Copy link
Copy Markdown

Jirabot Action Result:
Added fix version: 9.6.108
Added fix version: 9.8.84
Added fix version: 9.10.30
Added fix version: 9.12.4
Workflow Transition: 'Resolve issue'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants