Skip to content
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
13 changes: 7 additions & 6 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Contributors

| GitHub user | Real Name | Affiliation | Date |
| ----------------- | --------------- | ----------- | ---------- |
| yaswant | Yaswant Pradhan | Met Office | 2026-07-17 |
| jfrost-mo | James Frost | Met Office | 2026-09-04 |
| james-bruten-mo | James Bruten | Met Office | 2026-09-10 |
| ericaneininger | Erica Neininger | Met Office | 2026-10-05 |
| GitHub user | Real Name | Affiliation | Date |
| ----------------- | ---------------- | ----------- | ---------- |
| yaswant | Yaswant Pradhan | Met Office | 2026-07-17 |
| jfrost-mo | James Frost | Met Office | 2026-09-04 |
| james-bruten-mo | James Bruten | Met Office | 2026-09-10 |
| ericaneininger | Erica Neininger | Met Office | 2026-10-05 |
| t00sa | Sam Clarke-Green | Met Office | 2026-10-13 |
21 changes: 15 additions & 6 deletions nightly_testing/retrigger_nightlies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@
from time import sleep


def run_command(command):
def run_command(command, environment=None):
"""
Launch a subprocess command and return the output
"""
result = subprocess.run(command.split(), capture_output=True, text=True)
if environment:
env = os.environ.copy().update(environment)
else:
env = None

result = subprocess.run(command.split(), capture_output=True, text=True, env=env)
return result


Expand Down Expand Up @@ -90,8 +95,10 @@ def restart_suite(suite):
print(f"Restarting {suite}")
play_command = f"cylc play -q {suite}"
if "next-cylc" in suite:
play_command = f"export CYLC_VERSION=8-next ; {play_command}"
_ = run_command(play_command)
environment = {"CYLC_VERSION": "8-next"}
else:
environment = None
_ = run_command(play_command, environment)


def retrigger_suite(suite, tasks):
Expand All @@ -104,8 +111,10 @@ def retrigger_suite(suite, tasks):
print(f"\rTask {i + 1}/{ntasks}", end="", flush=True)
failed_command = f"cylc trigger {suite}//*/{task[0]}"
if "next-cylc" in suite:
failed_command = f"export CYLC_VERSION=8-next ; {failed_command}"
_ = run_command(failed_command)
environment = {"CYLC_VERSION": "8-next"}
else:
environment = None
_ = run_command(failed_command, environment)
print()


Expand Down
Loading