-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(jetstream): Raise an error if leader not found and added v2.10 e2e coverage #5358
Conversation
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
Thank you for your contribution! 🙏 We will review your PR as soon as possible. While you are waiting, make sure to:
Learn more about: |
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e jetstream |
Signed-off-by: Jorge Turrado <[email protected]>
/run-e2e jetstream |
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.
lgtm
just mind the unit test failure, not sure if it's a flake or related
nats_jetstream_scaler_test.go:311: Expected success for 'All Good - messages waiting (clustered)' but got error leader node not found for consumer pull_consumer
I've triggered it again and it's worked, so maybe it's been any kind of transient error. Just in case, I'm going to check it again to prevent flaky tests |
/run-e2e jetstream |
…e coverage (kedacore#5358) * fix(jetstream): Scaler doesn't print multiple (wrong) errors Signed-off-by: Jorge Turrado <[email protected]> * Add error on failed leader search Signed-off-by: Jorge Turrado <[email protected]> * update changelog Signed-off-by: Jorge Turrado <[email protected]> * . Signed-off-by: Jorge Turrado <[email protected]> --------- Signed-off-by: Jorge Turrado <[email protected]> Signed-off-by: anton.lysina <[email protected]>
Fixing this issue generated by NATS arch changes, we added a logic that iterates over all the nodes of the cluster looking for the leader, but if the leader isn't found KEDA doesn't raise any error and silently fails.
This PR revisit that logic adding an error in that case, and also removing an unnecessary iteration over a repeated element (current leader is already inside the cluster_uls). As an extra point, I've added explicit coverage to NATS JetStream v2.10 as they introduced the changes of the issue, enforcing the usage of the headless service.
Checklist
Relates to #4524