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

refactor: unique function name validation #236

Merged
merged 12 commits into from
Aug 7, 2024

Conversation

hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Aug 6, 2024

Main change:

  • Refactor checking for unique function names logic into higher level class.
  • FunctionBuilder object is at the function level. FunctionRegister class is at the app level, so it is more suited for validation across the app as a whole.
  • Now, function name dict is a property of the FunctionRegister class. There is a new method added to the FunctionRegister class for validating the function names. It loops through all the functions in the apps, adds the function name to the dict, and throws an error if there's a repeat of function names. This validation method is added as part of get_functions so the non-distinct function name error is thrown in the same spot as it was previously.

Extra change:

  • removes dummy username values from kafka tests to fix security warning

@hallvictoria hallvictoria marked this pull request as ready for review August 6, 2024 19:57
@hallvictoria hallvictoria changed the title fix: set functions_bindings to None refactor: unique function name validation Aug 6, 2024
azure/functions/decorators/function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/function_app.py Show resolved Hide resolved
azure/functions/decorators/function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/function_app.py Outdated Show resolved Hide resolved
azure/functions/decorators/function_app.py Outdated Show resolved Hide resolved
@hallvictoria hallvictoria merged commit 0617cd7 into dev Aug 7, 2024
13 checks passed
@hallvictoria hallvictoria deleted the hallvictoria/functionbuilder branch August 7, 2024 19:37
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.

2 participants