-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fixes salt.utils.EtcdClient.write so it distinguishes between the different python-etcd logic for files/directories #51538
Conversation
This PR was only written for the file-directory duality in the This is done by the Nonetheless, this only fixes the |
@arizvisa are you able to create a test that verifies this functionality? I think it will prevent us from having a regression in the future. |
I'll see what I can do in the future, it'll take some time though as my primary job isn't related to development or even close to this sorta devops stuff so it's hard to find business cause for this sorta thing. Honestly I expected using saltstack was to be a quick effort, but I ended up spending a lot more time on this due to the Etcd support apparently being underused (Such as #51345 which you were a part of, then PRs #51363 and #51346). Still a fan of the whole design of salt, just wasn't expecting to do so much work for my one very-specific configuration. |
Oh also, I think I mentioned the issue with the I didn't create the issue yet because I don't have too much time to fix and test it. So just a heads up if someone else gets to writing tests for this PR before I do, they'll still see an error in the logs when using |
@arizvisa One of the existing Etcd unit tests is failing, This needs to be fixed before we can merge. |
7bcccf3
to
6ea8c7a
Compare
force-push due to a rebase against develop. added unit tests for both keys and directories. we'll see how it turns out.. |
Grr...first force-push was against develop instead of origin/develop. This next push will be against the correct branch... |
…t it handles directories properly instead of assuming that everything is a file by default.
…ry already exists. Updated salt.utils.etcd_util to catch it for write_directory and return True if so.
6ea8c7a
to
25775dd
Compare
Um...am I reading this error right from py2-windows-2016? It seems to have terminated before it even ran my tests?
|
Yes, we still have some issues in the test runner. Having said that, it looks like the next test run passed. :) Merging. |
Thx. |
[master] Porting #51538 to master
What does this PR do?
Fixes some oversights in the salt.utils.etcd_util module when creating directories vs files.
What issues does this PR fix or reference?
Closes issue #51537
Previous Behavior
When creating a directory an error message is logged saying the path is not a file.
New Behavior
Fixes the prior mentioned behaviour.
Tests written?
I'm tired.
Commits signed with GPG?
No.