Skip to content

[6.16.z] Add missing timeout when calling entity with timeout - #1321

Merged
sambible merged 1 commit into
SatelliteQE:6.16.zfrom
synkd:pass_timeout_through_repo_sync_flow_6.16.z
Jul 9, 2025
Merged

[6.16.z] Add missing timeout when calling entity with timeout#1321
sambible merged 1 commit into
SatelliteQE:6.16.zfrom
synkd:pass_timeout_through_repo_sync_flow_6.16.z

Conversation

@synkd

@synkd synkd commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Manual cherry pick of #1311.

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.
@synkd synkd added No-CherryPick PR doesnt need CherryPick to previous branches 6.16.z labels Jul 8, 2025
@sambible
sambible merged commit 71639fa into SatelliteQE:6.16.z Jul 9, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.16.z No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants