-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat(htpasswd): add autoreload for htpasswd #2933
Conversation
Unsure, htpasswd change do not require full reload with server restarts. But putting the logic into existing watcher much easier. |
Looks like it works, but not as fast as file updates. |
1f35ccb
to
e4605a5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2933 +/- ##
==========================================
- Coverage 91.06% 90.98% -0.08%
==========================================
Files 174 175 +1
Lines 32666 32798 +132
==========================================
+ Hits 29747 29841 +94
- Misses 2207 2234 +27
- Partials 712 723 +11 ☔ View full report in Codecov by Sentry. |
e4605a5
to
259df17
Compare
Ideally, we need the watching logic to move outside the server/controller logic, so it is just another config file we watch (along with zot config) That could be second step. Let other folks take a look also. |
What do you mean by file updates? |
@andaaron i mean the delay observed after file write. |
If a separate watcher is an improvement, I think we should go for it. It doesn't make sense to restart the whole server for a new user. |
8db17b2
to
3790d39
Compare
@andaaron i've added separate watcher. Need to test it, and also write some tests, but I'm more used to testify... |
e5bc703
to
7b1a4d2
Compare
7b1a4d2
to
d3057cc
Compare
6aeb9b1
to
c82c2ae
Compare
@andaaron i have added test. And the reloader been tested few weeks - works as expected. |
Please fix the linter failure, otherwise looks good. |
…eload Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
- rewrite htpasswd watcher not to store context - improve logging Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
c82c2ae
to
2916f19
Compare
What type of PR is this?
feature
Which issue does this PR fix:
Fix #2925
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.