[6.16.z] Add missing timeout when calling entity with timeout - #1321
Merged
sambible merged 1 commit intoJul 9, 2025
Merged
Conversation
I found this issue while working on a Robottelo upgrade scenario refactor. I found that a test syncing the RHEL 7 server RPMs repo was consistently timing out after 300 seconds, though the `enable_sync_redhat_repo` API factory method uses a timeout of 1500 seconds by default. Eventually, I found that `nailgun.entity_mixins.call_entity_with_timeout()` was invoking the entity callable without specifically passing the timeout. After the repo sync was initiated, `nailgun.entity_mixins._poll_task()` was being called with no timeout value specified, causing the `timeout` variable to be set to the `TASK_TIMEOUT` constant defined in the entity_mixins module, which has a value of 300 seconds. My repo sync was completing in ~360 seconds, so the test was consistently failing. This PR adds a `timeout` keyword argument to the `entity_callable()` in `call_entity_with_timeout()` and, in the repository `sync()` entity method, changes the `timeout` argument in the call to `_handle_response()` from a keywork argument to a positional argument.
sambible
approved these changes
Jul 9, 2025
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.
Manual cherry pick of #1311.