-
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
[PR #51363] Added an implementation of event_return for the etcd returner (returners/etcd_return.py) #51346
Conversation
@arizvisa can you please check on the linter errors and see if the failed tests are related to your change here? |
It looks like the lint errors are related to a uuid module that I imported, a '%r' being used in a format string, and whitespace issues. Let's see how it goes this time... Can I use formatspecs for this? Most instances that call the log functions use formatstrings which is why I chose to use it... |
Btw, this is dependent on the etcd returner module being fixed as per #51345. I'll submit my PR for that issue in a second here. |
As a reminder, this PR is dependent on #51363 being merged. When (or if) that happens, I'll remove the WIP tag from this (unless y'all want to manage that dependency). |
235ec27
to
0c09357
Compare
…d into salt.utils but didn't test anything and hid all the exceptions. To restore functionality we just pass through to the client attribute.
…table manner by ensuring None is always returned (the caller seems to depend on this) and empty strings aren't deserialized.
…hing the EtcdKeyNotFound exception, added a ton of comments, and debug + trace logs.
…ropery, leaves. Fixed.
…organized the trace logs to output the key that was returned from EtcdResult, and re-worded the logs so they use the word "job" when referring to a jid.
…ing for the format method).
… exceptions when writing the job fields so it doesn't get interrupted part of the way through.
0c09357
to
a97c8e2
Compare
a97c8e2
to
3f20311
Compare
…thon3 compatibility.
…salt.returners.etcd_return` to formatspecs.
…his with the `.__format__()` formatspec instead.
…nd added a loop that walks through and logs the exceptions that were aggregated.
…turn() function within the etcd returner, and moved the json serialization within the try-catch block.
3f20311
to
a52a7fe
Compare
I'm closing this as I merged the into my other PR that fixes the etcd returner. It was becoming too hard to maintain both separate PRs separately since I'm using the merged version of them anyways. The other PR is also just a lot larger and so I considered it a lot less likely to get merged. |
What does this PR do?
This implements
event_return
for the etcd returner which allows etcd to be specified via theevent_return
option.What issues does this PR fix or reference?
This PR is dependent on issue #51345 being fixed as it seems that
etcd.set
doesn't return anEtcdResult
(or raise exceptions anymore in favor ofNone
), and there's a number of things that thepython-etcd
module uses in order to inform the caller how to handle it. This PR is marked WIP pending that issue being fixed.New Behavior
Adds support for using etcd via the
event_return
option, instead of being forced to lookup jobs.Tests written?
:-J