pkg/chartmuseum,cmd: introduce the new keep-chart-always-up-to-date flag and the default cache interval when not set.#593
Conversation
dea15fe to
44034ff
Compare
739b0a7 to
7b02ed0
Compare
|
looks like there is a new data race |
Yes , I will try to resolve it |
810daba to
e029f4c
Compare
… flag and the default cache interval when not set. * The flags works to always get the realtime index for the chart repository(which is the behavior before v0.13.0), it will cost more fs I/O. * Default interval is now set to 5m when `cache-interval` flag not set which we suggests in the issue list. The patch includes: * increases most of the museum api throughout by wrapping the event emitter into goroutine since the event listener already holds on the concurrent lock(#396). * adds the new server option `keep-chart-always-up-to-date` to force use the latest version. * `getIndexFile` rollbacks to fully reload index only if cacheinterval not set for better backward compatibility before v0.13.0(#444). Signed-off-by: scnace <[email protected]> Signed-off-by: scbizu <[email protected]>
…index refresher works. Signed-off-by: scbizu <[email protected]>
Signed-off-by: scbizu <[email protected]>
123cf9f to
d8e389d
Compare
|
Seems like resolved it , so many lock tricks XD PTAL @cbuto |
| PerChartLimit: conf.GetInt("per-chart-limit"), | ||
| WebTemplatePath: conf.GetString("web-template-path"), | ||
| ArtifactHubRepoID: conf.GetStringMapString("artifact-hub-repo-id"), | ||
| AlwaysRegenerateIndex: conf.GetBool("always-regenerate-index"), |
There was a problem hiding this comment.
to make sure this matches the flag name in pkg/config/vars.go
| AlwaysRegenerateIndex: conf.GetBool("always-regenerate-index"), | |
| AlwaysRegenerateIndex: conf.GetBool("always-regenerate-chart-index"), |
|
nice @scbizu! looks good aside from the one comment. is it worth running a quick loadtest locally to compare main vs these changes (mainly the new locks)? |
|
@cbuto Sorry for my low local machine setup , I need your help for the loadtest xD |
no problem! I'll try to get some time to run a few and post the results |
|
I ran three tests:
Overall it seems like these changes without the flag set shouldn't have any affect, but setting this flags introduces a ton of latency, which I think is expected. |
|
I think so , thank you @cbuto |
cbuto
left a comment
There was a problem hiding this comment.
Lgtm! We’ll just need to address the flag name issue in the other comment
|
Really eager to see this fix merged in :) The PR has been reviewed, does it need to also wait for @jdolitsky to review? |
|
It would be better to be so , and I think cbuto and me also can handle it and make the canary(main) release , thoughts @cbuto ? |
|
@scbizu I'd be good with merging this after #593 (comment) is resolved! |
|
okay , I will resolve it soon ~ |
Co-authored-by: Casey Buto <[email protected]> Signed-off-by: Nace Sc <[email protected]> Signed-off-by: scbizu <[email protected]>
d8e389d to
a1cefb9
Compare
|
Solved |

Closes #444
cache-intervalflag not set which we suggests in the issue list.Signed-off-by: scnace [email protected]