-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added support for digest auth and ACLs #49
Conversation
Hi @detro can I get a review, please? While waiting, I published the updated version to the registry: https://registry.terraform.io/providers/SiftScience/zookeeper/latest |
I don't know how, but I have never received a notification from GitHub about this PR: so sorry @abarabash-sift for having to wait on this. I think I might have messed up my notification config, because I only got it now that you mentioned my handle. I'll look into this asap. |
internal/client/client.go
Outdated
@@ -99,16 +109,13 @@ func NewClientFromEnv() (*Client, error) { | |||
return nil, fmt.Errorf("failed to convert '%s' to integer: %w", zkSession, err) | |||
} | |||
|
|||
return NewClient(zkServers, zkSessionInt) | |||
return NewClient(zkServers, zkSessionInt, "", "") |
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.
Please provide an implementation for reading the username/password
from ENV variables as well.
I suggest:
ZOOKEEPER_USERNAME
ZOOKEEPER_PASSWORD
Being those credentials, it's quite likely that env vars are how a production system would provide those anyway.
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.
I added reading ZOOKEEPER_USERNAME
and ZOOKEEPER_PASSWORD
environment variables to set up provider and client for testing (in the NewClientFromEnv()
function)
@detro thank you for the review! Please take a look at the updates, no rush :) By the way, when I'm typing your nickname here, the popup suggestion shows that you're busy. Maybe that's why you didn't get the notification. I attached the screenshot. |
Thank you @abarabash-sift. I think we are really close now, but it needs a few things:
Thank you so much - very excited to release this. |
@detro the PR is updated, could you run the workflow, please? |
Also, I didn't find the document explaining the proper way of updating the |
Unfortunately it seems tests are failing. |
Sorry, I think I misspoke and confused for another repo. Anyway, yours are new features and should be in a new features section. |
So, I tried to test this code (#51) and sorted out the connectivity errors visible in the workflow execution, to see if it was the cause of the issue. The issue has to be with the new functionality. It's not clear to me what is going wrong, but I haven't spend a lot of time digging back into the tests. I appreciate the additional features that this brings, but until I can see a clean set of tests I won't be able to pick this up. |
The problem is the connection pool exhaustion. You can see the corresponding logs in the
Funny enough, the problem appeared after I added more tests to the suite. I also tested it on your Here is how to reproduce it locally on your
To summarize, I added a workaround to allow Zookeeper to accept more connections and also |
@abarabash-sift I just wanted to leave a note to say "I'm on it". Thanks for digging so much and finding the root cause of this: maybe you even identified an actual bug here, that is great! |
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.
You did an amazing job nailing down what the problem actually is. Thank you so much @abarabash-sift.
I'm going to merge this and work on fixing the underlying problem insite the Provider: I'm sure it is possible to handle connection closure correctly in the Provider.
username
andpassword
optional fields into the provider configuration. Onlydigest
auth is supported.