fix the allow_empty_target OU path issue #786
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why?
When I enable the allow_empty_target parameter in the adfconfig.yml file, if I set a target OU path which does not exist in my AWS organization, I will get following error.
My deployment map file look like below:
What?
The reason of above error is that the
src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/python/target.py
only capture the boto3 Client Error and ignore the Error raised in the method get_accounts_in_path in orgnizations.py. So, an easy fix is to change the boto3 Client Error to Exception and ignore it if the allow_empty_target was enabled.