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

Replace ValueError with RasaException in replace_environment_variables function #8382

Merged
merged 5 commits into from
Apr 7, 2021

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Apr 7, 2021

Proposed changes:

Status (please check what you already did):

  • updated tests
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@alwx alwx requested a review from ancalita April 7, 2021 13:54
@@ -314,7 +315,7 @@ def env_var_constructor(loader, node):
w for w in expanded_vars.split() if w.startswith("$") and w in value
]
if not_expanded:
raise ValueError(
raise RasaException(
"Error when trying to expand the environment variables"
" in '{}'. Please make sure to also set these environment"
" variables: '{}'.".format(value, not_expanded)
Copy link
Member

Choose a reason for hiding this comment

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

More of a style comment, shouldn't this be updated to a f-string according to Notion code convention ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch!

@alwx alwx marked this pull request as ready for review April 7, 2021 15:25
@alwx alwx requested a review from ancalita April 7, 2021 15:29
Copy link
Member

@ancalita ancalita left a comment

Choose a reason for hiding this comment

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

Looks all good with me 👍 although not sure why the docstring for read_yaml mentions a 3rd argument that doesn't seem present in the function signature?

@alwx
Copy link
Contributor Author

alwx commented Apr 7, 2021

@ancalita I guess it's a leftover. I will remove it :)

@alwx alwx requested a review from ancalita April 7, 2021 15:34
@alwx alwx enabled auto-merge April 7, 2021 15:37
@alwx alwx merged commit 4d00378 into main Apr 7, 2021
@alwx alwx deleted the bug/7932-update branch April 7, 2021 15:51
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.

read_yaml fails when it tries to expand an environment variable which contains a $
2 participants