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

Fix #329 #330

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Fix #329 #330

merged 2 commits into from
Feb 25, 2024

Conversation

qsdrqs
Copy link
Contributor

@qsdrqs qsdrqs commented Feb 25, 2024

This PR tries to fix #329. After a basic inspection of the codebase, I find the current Acto does have some retry mechanisms. However, because of some subprocess.run for command execution have an argument of check=True, according to the document:

If check is true, and the process exits with a non-zero exit code, a CalledProcessError exception will be raised. Attributes of that exception hold the arguments, the exit code, and stdout and stderr if they were captured.

If check is set to True and the command failed, a CalledProcessError will be raised and the following returncode logic becomes meaningless. So currently, I only correct some check arguments to make the current retry mechanisms meaningful.

Besides, I also mentioned that although create_cluster logic for all 3 tools(kind, minikube, k3s) will retry for 3 times before if fails, the delete_cluster logic will forever try to delete if the command fails:

def delete_cluster(self, name: str, kubeconfig: str):
    ...

    while subprocess.run(cmd, check=False).returncode != 0:
        continue

Is this an expected design? Do we need to change this into the same as create_cluster logic (retry for 3 times and fail)?

@tylergu tylergu merged commit 674438f into xlab-uiuc:main Feb 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to execute the system commands will cause a CRITICAL error and make one thread exit
2 participants