Repository navigation
Look up TriggerDB objects by id / uid if available - #2788
Merged
Merged
Conversation
If id or uid is available, use that instead of trying to look up trigger by "parameters" dictionary. This way we can avoid parameters dictionary lookup related bugs in pymongo / mongoengine.
Contributor
|
No bueno. |
…ing id, uid, type + parameters) when creating a TriggerInstanceDB.
Contributor
|
This seems to work for me. When I manually applied this patch to our dev cluster which was exhibiting these issues, jobs started triggering again immediately. I'm feeling hopeful. I'm keeping an eye on it today and will check when I return from vacation after next week to see how well its done. My colleagues will likely just yank our jobs back out of st2 while I'm gone, so hopefully this patch holds. :) Once you merge, we'll upgrade to the latest unstable/dev version which is slightly better than my manually-patched version. ;) Then we'll upgrade to 1.5.1 once its out. Thanks Kami. |
Member
Author
|
@codyaray Great, thanks for reporting and confirming. And yeah, please keep us posted :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this change we now try to look up TriggerDB objects by id / uid if either of those fields is available.
This way we can avoid lookup by type and parameters dictionary which fails in some scenarios. There are at least two bugs related "by parameters dictionary" lookup. One is related to unicode caching bug in mongoengine (I've added a nasty hack / work-around for it a while back) and the other one is yet to be tracked down.
My goal also is to confirm that id / uid field is always available so we can get rid of parameters dictionary lookup all together (that's something I wanted to do more than a year ago and I believe now it's finally possible to do that without much effort).
This hopefully resolves issue described in #2765.
TODO