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

[cadl pipeline] fix for async problem of os.makedirs in docker #26973

Closed
wants to merge 1 commit into from

Conversation

msyyc
Copy link
Member

@msyyc msyyc commented Oct 21, 2022

@@ -354,6 +355,8 @@ def gen_cadl(cadl_relative_path: str, spec_folder: str) -> Dict[str, Any]:
output_path = Path(os.getcwd()) / project_yaml["emitters"][cadl_python]["sdk-folder"]
if not output_path.exists():
os.makedirs(output_path)
while(not output_path.exists()):
time.sleep(1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os.makedirs is not sync operation so we have to make sure the path exists before running the codegen

@msyyc msyyc closed this Oct 26, 2022
@msyyc msyyc deleted the cadl-pipeline-fix-os-mkdirs branch October 26, 2022 02:22
@msyyc
Copy link
Member Author

msyyc commented Oct 26, 2022

The issue is fixed

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.

1 participant