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

start e2e before all clusters are ready #127

Merged
merged 1 commit into from
Apr 10, 2023
Merged
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: 13 additions & 0 deletions rosa-hypershift/rosa-hosted-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,14 @@ def _watcher(rosa_cmnd, my_path, cluster_name_seed, cluster_count, delay, my_uui
time.sleep(60)
logging.info('Watcher thread started')
logging.info('Getting status every %d seconds' % int(delay))
# watcher will stop iterating and notify to run e2e if one of the below conditions met
# 1) look if all the clusters move to ready state or
# 2) if the user created e2e file in the test directory
file_path = os.path.join(my_path, "e2e")
if os.path.exists(file_path):
os.remove(file_path)
time.sleep(60)

cmd = [rosa_cmnd, "list", "clusters", "-o", "json"]
while True:
logging.debug(cmd)
Expand Down Expand Up @@ -843,6 +851,11 @@ def _watcher(rosa_cmnd, my_path, cluster_name_seed, cluster_count, delay, my_uui
else:
logging.info("Waiting %d seconds for next watcher run" % delay)
time.sleep(delay)
elif os.path.isfile(file_path):
with all_clusters_installed:
logging.info("User requested the wrapper to start e2e testing by creating e2e file in the test directory")
all_clusters_installed.notify_all()
break
else:
logging.info("Waiting %d seconds for next watcher run" % delay)
time.sleep(delay)
Expand Down