-
Notifications
You must be signed in to change notification settings - Fork 197
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
Replace greenwave message consumer with resultsdb and waiverdb message consumers #4224
Comments
Worth noting that I'm kind of filing this as an alternative to filing several issues for making the current design work properly with openQA test gating. It currently does not work properly for several reasons, which would require changes on both Bodhi and Greenwave sides to fix. If others agree that the current design is kind of not the best idea, I would rather work on replacing it than work on digging the hole even deeper. :D |
So I decided to just go ahead and write the ResultsDB handler as a PoC. It didn't seem very hard. This isn't tested yet, but I think it should more or less work (typos, thinkos etc. excepted) and do the job:
I'll maybe polish it up into a full PR (and add a waiverdb handler) tomorrow. |
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
…a#4224) This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This replaces the consumer that listens for Greenwave 'decision change' messages with consumers that listen for ResultsDB and WaiverDB "new result" / "new waiver" messages and update gating decisions if the message may cause a change. The goal here is to make it possible to remove the "decision change" message code from Greenwave entirely, because in order to publish those messages, Greenwave has to duplicate a lot of Bodhi's knowledge about what kinds of decisions to ask for. This being in Greenwave is really against the intended design of the system, and means whenever anything changes about what kinds of decision Bodhi might request, we need to change both Bodhi and the Greenwave "decision change" publishing code. Signed-off-by: Adam Williamson <awilliam@redhat.com>
As detailed in #4219 (comment) , I feel like the current design where Greenwave publishes 'decision change' messages and Bodhi listens for them to update the gating status for updates is fundamentally problematic. It requires greenwave to duplicate logic and knowledge from greenwave clients (Bodhi, in this case) which it should not do.
I think a more fundamentally sensible design would be for Bodhi to replace its greenwave 'decision change' message consumer with a resultsdb message consumer which would listen out for results that might potentially change a decision, and query Greenwave for an updated decision when they see one. And, I guess, a waiverdb consumer that would look out for waiver changes similarly.
Bodhi already has a lot of knowledge about what kinds of results and waivers are significant and what decisions to ask Greenwave for; this consumer would only have to reuse that. And it would allow us to throw away all the duplication of that knowledge on the Greenwave side.
@hluk @mattiaverga for comment.
The text was updated successfully, but these errors were encountered: