jenkins-x-plugins / jx-gitops

a simple CLI tool for working with kubernetes resources files in a GitOps repository
Apache License 2.0
32 stars 50 forks source link

Speed up helmfile report #957

Closed msvticket closed 3 months ago

msvticket commented 3 months ago

jx gitops helmfile report can be quite slow. This should improve the performance quite a bit.

This is done by checking only once for each repository whether it is added and at the same time also load the index file. The chart metadata is then fetched from the index file directly instead of executing helm show chart.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

msvticket commented 3 months ago

I have now tested this by building the binary locally, copying it to a running jx boot pod and executing that binary. It worked fine. Since the jx gitops helmfile report report had already run no changes where made. Then I removed the docs directory and ran jx gitops helmfile report again with the new binary. The only changes where that releases without versions specified in the helmfiles got the version added to the files in docs. This is an intended improvement.

The execution took a few seconds, compared to the many minutes it would have taken in this cluster to regenerate the full files with the previous versions of jx gitops.

jenkins-x-bot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tomhobson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/jenkins-x-plugins/jx-gitops/blob/main/OWNERS)~~ [tomhobson] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jenkins-x-bot commented 3 months ago

Failed to merge this PR due to:

failed merging [957]: [Method Not Allowed]