-
Notifications
You must be signed in to change notification settings - Fork 409
pkg/chartmuseum,cmd: introduce the new keep-chart-always-up-to-date flag and the default cache interval when not set.
#593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <scbizu@gmail.com> Signed-off-by: scbizu <scbizu@gmail.com>
…index refresher works. Signed-off-by: scbizu <scbizu@gmail.com>
Signed-off-by: scbizu <scbizu@gmail.com>
123cf9f to
d8e389d
Compare
|
Seems like resolved it , so many lock tricks XD PTAL @cbuto |
cmd/chartmuseum/main.go
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice pickup ~
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <cbuto@d2iq.com> Signed-off-by: Nace Sc <scbizu@icloud.com> Signed-off-by: scbizu <scbizu@gmail.com>
d8e389d to
a1cefb9
Compare
|
Solved |
jdolitsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍

Closes #444
cache-intervalflag not set which we suggests in the issue list.Signed-off-by: scnace scbizu@gmail.com