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

Timeout on custom plays explicitly set to 60 seconds #638

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions osism/commands/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,18 @@ def handle_role(
if overwrite:
environment = overwrite

logger.info(
f"An attempt is made to execute a role that is provided in the configuration repository. "
f"If there is no further output following this output, the role {role} in the environment"
f" {environment} was not found."
)
if environment in ["custom"] or role not in MAP_ROLE2ENVIRONMENT:
task_timeout = 60
timeout = 60

logger.info(
"An attempt is made to execute a role that is provided in the "
"configuration repository. If there is no further output "
f"following this output, the role {role} in the environment "
f"{environment} was not found. The timeout is explicitly "
f"set to {timeout} seconds."
)

t = ansible.run.delay(
environment, role, arguments, auto_release_time=task_timeout
)
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/custom-plays-timeout-9fd5f0452a11aae5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
Timeout on custom plays explicitly set to 60 seconds.