-
Notifications
You must be signed in to change notification settings - Fork 92
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
Use api key helper during app creation. #4969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for completing the todo!!
server/__init__.py
Outdated
return '' | ||
|
||
# If key is not found, return an empty string | ||
logging.warning(f'No key found for project: {gcp_project}; path:{gcp_path}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not necessarily true because this is also a case of the key not found in the environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the log to include the environment variables that were also checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow using a helper there makes a big difference! THank you!
|
||
TODO: use this method everywhere else in this file | ||
""" | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ultra nit: might be nice to take this helper method into a helper file, to keep this a bit emptier.
Obviously you're not introducing this so no pressure to make the change now :) but at least a TODO would be good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted offline, will move to website/shared/lib/utils.py in follow up PR today!
Migrate each instance of fetching api keys to use a single helper function.
Add a check to ensure that DC_API_KEY was provided as an environment variable when running in LITE mode.