-
Notifications
You must be signed in to change notification settings - Fork 111
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
base: main
Are you sure you want to change the base?
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.07% 90.95% -0.12%
==========================================
Files 174 175 +1
Lines 32666 32798 +132
==========================================
+ Hits 29749 29830 +81
- Misses 2205 2246 +41
- Partials 712 722 +10 ☔ 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... |
…eload Signed-off-by: Vladimir Ermakov <[email protected]>
dff945a
to
e5bc703
Compare
- rewrite htpasswd watcher not to store context - improve logging Signed-off-by: Vladimir Ermakov <[email protected]>
e5bc703
to
7b1a4d2
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.