Skip to content
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

Query all greenwave decision contexts together #4821

Merged
merged 1 commit into from
Nov 5, 2022

Conversation

AdamWill
Copy link
Contributor

Since release-engineering/greenwave#95 , greenwave allows clients to query on multiple decision contexts at once. All relevant policies for all specified decision contexts are then applied to the decision. This means we no longer need to iterate over all relevant decision contexts and send a separate decision query for each one; we can just send one query (per greenwave_batch_size subjects, still) with all the decision contexts in it. This makes the code simpler and will make Bodhi more efficient.

Signed-off-by: Adam Williamson awilliam@redhat.com

@AdamWill AdamWill requested a review from a team as a code owner October 29, 2022 00:15
@AdamWill
Copy link
Contributor Author

Note this ironically acts almost as a reversion of #4266 - we're almost back to the code before that change, except now we're passing a list of contexts instead of a single string.

@AdamWill AdamWill force-pushed the combine-decision-contexts branch 3 times, most recently from 8704ba9 to df96581 Compare October 29, 2022 06:25
@AdamWill
Copy link
Contributor Author

I think the integration tests will fail until a greenwave version with the change is marked as production.

@AdamWill
Copy link
Contributor Author

AdamWill commented Nov 3, 2022

greenwave change is tagged for prod now. I've rebased this, let's see how it goes.

@mattiaverga
Copy link
Contributor

The code looks good and tests are happy now, with the updated greenwave in prod and the fix for poetry installation in Rawhide.
Just missing a release note 😋

@AdamWill
Copy link
Contributor Author

AdamWill commented Nov 4, 2022

It's arguable whether it needs one, really, as it's barely a user-visible change (the only thing a user will notice is that gating status updates faster). But I can add one, sure...

Since release-engineering/greenwave#95 ,
greenwave allows clients to query on multiple decision contexts
at once. All relevant policies for all specified decision
contexts are then applied to the decision. This means we no
longer need to iterate over all relevant decision contexts and
send a separate decision query for each one; we can just send
one query (per `greenwave_batch_size` subjects, still) with all
the decision contexts in it. This makes the code simpler and will
make Bodhi more efficient.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Copy link
Contributor

@mattiaverga mattiaverga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@mergify mergify bot merged commit e3c342f into fedora-infra:develop Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants