[6.16.z] ContentCredentials CLI fix for stream #15228
Merged
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.
Cherrypick of PR: #15165
Problem Statement
In Stream runs, for ContentCredentials, we see some occasional failures in several tests,
that attempt to add/update gpg key associated to repo/product with repo(s), then read info of the product/repo and assert the key name:
Solution
We need to wait for an in-progress Repository Metadata Generate task,
that is not handled synchronously by cli
.update
or cli.info
. Else, the GPG key is not yet present in repo/product.In any CLI tests adding/updating a GPG key associated to repo, or adding the key to a product containing repos,
we should wait for these repo metadata task(s), before calling info of product/repo, and asserting the key.
Related Issues
KeyError
. Locally reproduced when full cli module is run.but it is enough for an intermittent failure when trying to read the entity (repos or product) and find the key, before the task(s) finished.
PRT Case