Closed zoxpx closed 3 years ago
NOTE - travis build 238947217 failed due to missing DCO
4 travis_time:end:00370f50:start=1633113282796449520,finish=1633113287471497912,duration=4675048392,event=install^M^[[0Ktravis_fold:end:install.3^M^[[0Ktravis_time:start:0861fd3c^M^[[0K$ git-validation -run DCO,short-subject
3 * 7aaa3bc "expanding UTs (review feedback)" ... FAIL
2 - FAIL - does not have a valid DCO
1 * 2b48ecc "PWX-21389: `etcd3.Keys()` fix and optimization" ... FAIL
486 - FAIL - does not have a valid DCO
1 2 commits to fix
Will fix with the merge-commit
Thanks for the review Aditya -- merging the PR
What this PR does / why we need it: The
etcd3.Keys()
method was FAILING when user-authentication was turned on:--from-key
to--prefix
handling (see test-results below)Which issue(s) this PR fixes (optional) Closes # PWX-21389
Special notes for your reviewer:
Test case Setup:
Test#1: using
--from-key
--from-key
has an issue when browsing AuthN-protected Etcd3 (works for root, but FAILS for regular users)Test#2: using
--prefix
The
Test#1
was the original implementation ofetcd3.Keys()
method, which does not work properly when AuthN is turned on. TheTest#2
is the re-implementation w/ this PR, that works properly with or without AuthN. Also, since "stop condition" is no longer an issue, we were able to optimize the number of calls / retrievals to etcd (e.g. only 1 retrieval, then pruned from memory).