-
-
Notifications
You must be signed in to change notification settings - Fork 693
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: Generates error in plan phase if runtime is not available #358
fix: Generates error in plan phase if runtime is not available #358
Conversation
I have validated in my own project that this does cause the necessary failure during the plan phase...
And also, that it still does not fail if the runtime is available. 😁 |
### [4.1.2](v4.1.1...v4.1.2) (2022-10-20) ### Bug Fixes * Generates error in plan phase if runtime is not available ([#358](#358)) ([f9bf21d](f9bf21d))
Now that this PR is merged, I'm getting the following error: Program: /opt/hostedtoolcache/Python/3.9.15/x64/bin/python3
Error Message: Traceback (most recent call last):
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 1401, in <module>
main()
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 1397, in main
exit(args.command(args))
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 1204, in prepare_command
content_hash = bpm.hash(hash_extra_paths)
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 636, in hash
content_hash = generate_content_hash(content_hash_paths,
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 248, in generate_content_hash
update_hash(hash_obj, source_dir, source_file)
File "/home/runner/work/bernese/bernese/infrastructure/environments/staging/.terraform/modules/redefine_serverless.list_queries_lambda/package.py", line 263, in update_hash
with open(relative_path, 'rb') as open_file:
NotADirectoryError: [Errno 20] Not a directory:
'lambda_folder/main.py/requirements.txt' Even though I didn't set the source_path = "lambda_folder/list_queries/main.py" An hour ago this exact same |
@lorengordon Could you please take a look at this issue? |
Oh, I see the logic error. My apologies. One sec. |
Please see #359 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Fixes #357
Description
Raises plan-time error if the python or nodejs runtime is not present in the PATH. This matches the apply-time behavior, but generates the error during the plan instead of waiting until the apply.
Motivation and Context
See #357
Breaking Changes
I don't think so, unless people were somehow exploiting the prior behavior. But I can't really think of a situation where anyone would want a plan-time success and an apply-time failure...
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request