Skip to content

Conversation

shahvrushali22
Copy link

@shahvrushali22 shahvrushali22 commented Jun 26, 2025

This PR adds support for securely fetching charts from both Vanilla Helm and Artifact Hub repositories using the /serviceproxy route.

Changes:

  • Added serviceproxy support for secure in-cluster chart access.
  • Enabled support for Helm repositories via index.yaml parsing.
  • Dynamically generated sidebars and routes based on catalog metadata.
  • Updated UI components (List, EditorDialog, Details) to support both Helm and ArtifactHub protocols.
  • Fallback support for Electron via externalproxy

Related and required Headlamp backend PR:

@illume illume requested a review from Copilot July 2, 2025 09:34
@illume
Copy link
Contributor

illume commented Jul 2, 2025

Hello,

thanks for this. I hope to try it out and review in more detail soon.

There's some type check issues being reported:

npm run tsc

https://github.com/headlamp-k8s/plugins/actions/runs/15910734305/job/45199330949?pr=304#step:6:12

".": tsc-ing, :node_modules/.bin/tsc --noEmit:...
Error: src/api/charts.tsx(57,30): error TS2339: Property 'headers' does not exist on type 'Promise<any>'.
Error: src/components/charts/Details.tsx(92,51): error TS2339: Property 'icon' does not exist on type '{ name: string; description: string; logo_image_id: string; readme: string; app_version: string; maintainers: { name: string; email: string; }[]; home_url: string; package_id: string; version: string; }'.
Error: src/components/charts/List.tsx(194,25): error TS2339: Property 'entries' does not exist on type '{}'.
Error: src/components/charts/List.tsx(197,74): error TS2339: Property 'entries' does not exist on type '{}'.
Error: src/components/charts/List.tsx(199,25): error TS2339: Property 'packages' does not exist on type '{}'.
Error: src/components/charts/List.tsx(219,36): error TS2339: Property 'map' does not exist on type 'unknown'.

Would you mind adding the signoff to the commit? This repo requires it.

git commit --amend -s

Copilot

This comment was marked as outdated.

@illume
Copy link
Contributor

illume commented Jul 29, 2025

Hi @shahvrushali22

Please let us know if you're able to work on the fixes needed for this mentioned previously?

If you're not able to, we could take this over for you. However, we'd need the commit signed off with:

git commit --amend -s

@muraliinformal muraliinformal force-pushed the serviceproxy-app-catalog branch 2 times, most recently from ae85a79 to 7776b8c Compare August 20, 2025 19:42
@muraliinformal
Copy link

@illume Could you please take a look and submit your feedback ? Thanks

Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for those updates.

I marked all the conversations resolved where you'd made changes. Also I left a few notes.

A few questions:

  • How can I test this manually?
  • what is /service proxy
  • I think instead of using global variables, the plugin configuration to use a helm repo instead of artifact hub can be passed into the components as properties.

variant: 'error',
autoHideDuration: 5000,
});
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this return is needed so when the fetch fails it doesn't continue on, because the code below uses that fetch response.

Copy link
Contributor

Choose a reason for hiding this comment

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

@muraliinformal can you please check this one?

@illume illume requested a review from Copilot August 27, 2025 11:29
@illume
Copy link
Contributor

illume commented Aug 27, 2025

Oh. btw...
The github checks are failing with similar TypeScript errors as mentioned here: #304 (comment)

Also please check if npm run lint and npm run format have been run?

@illume illume requested review from Copilot and removed request for Copilot August 27, 2025 11:31
Copy link

@Copilot Copilot AI left a comment

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 adds support for securely fetching charts from both Vanilla Helm and Artifact Hub repositories using the /serviceproxy route, enabling dynamic catalog management in the app-catalog plugin.

  • Added serviceproxy support for secure in-cluster chart access
  • Enabled support for Helm repositories via index.yaml parsing
  • Dynamically generated sidebars and routes based on catalog metadata

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
app-catalog/src/index.tsx Updated plugin initialization to dynamically register sidebars and routes based on catalog metadata
app-catalog/src/helpers/catalog.ts Added catalog listing functionality and component version mapping
app-catalog/src/components/releases/EditorDialog.tsx Fixed chart name handling for app-catalog helm repository
app-catalog/src/components/charts/List.tsx Enhanced chart list to support both Helm and ArtifactHub protocols with icon fetching
app-catalog/src/components/charts/EditorDialog.tsx Added support for vanilla Helm repository chart installation
app-catalog/src/components/charts/Details.tsx Added conditional icon rendering for different chart protocols
app-catalog/src/api/charts.tsx Implemented serviceproxy support and added chart icon fetching functionality
app-catalog/src/api/catalogs.tsx Added catalog management API with protocol support for Helm and ArtifactHub

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@muraliinformal
Copy link

@illume I have addressed your comments, could you please take a look ?

@illume
Copy link
Contributor

illume commented Sep 11, 2025

Thank you very much @muraliinformal

I will do another review shortly.

Seems there's quite a lot of type errors. Would you mind have a look?npm run tsc
See here: https://github.com/headlamp-k8s/plugins/actions/runs/17623959373/job/50120975133?pr=304#step:6:12

@illume illume requested a review from Copilot September 11, 2025 08:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@muraliinformal muraliinformal force-pushed the serviceproxy-app-catalog branch from 27a1aca to e377060 Compare September 11, 2025 20:13
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks for all those changes.

I went through all of the conversations and resolved the ones done. There were a few still open. Also, I left a couple more questions.

@illume illume requested a review from Copilot September 26, 2025 18:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@illume
Copy link
Contributor

illume commented Oct 3, 2025

@muraliinformal theres a few open conversations. Can you please let me know what you think about each of them?

Please see the commit guidelines https://headlamp.dev/docs/latest/contributing#2-follow-commit-guidelines

Could you please squash your changes and rebase against main? If it makes sense to break it up into some smaller independent atomic commits, please do that?

@muraliinformal muraliinformal force-pushed the serviceproxy-app-catalog branch from e721581 to 46820a2 Compare October 3, 2025 19:46
@muraliinformal muraliinformal force-pushed the serviceproxy-app-catalog branch from 46820a2 to 3f9c810 Compare October 3, 2025 19:54
@illume illume requested a review from yolossn October 7, 2025 15:49
@illume illume added enhancement New feature or request app-catalog app-catalog (helm charts) plugin related issues labels Oct 7, 2025
@illume
Copy link
Contributor

illume commented Oct 7, 2025

@yolossn can you please review this too?

@illume
Copy link
Contributor

illume commented Oct 7, 2025

@muraliinformal Do you have some steps to test this?

I will run through this manually testing it, and ask another person to also help me manually test it.

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

Labels

app-catalog app-catalog (helm charts) plugin related issues enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants