-
Notifications
You must be signed in to change notification settings - Fork 10
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
API logger work #603
Open
Sigfried
wants to merge
16
commits into
main
Choose a base branch
from
api-logger
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
API logger work #603
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what calls are comming in - Moved load_dotenv(ENVFILE) out of db/config and enclave_wrangler/config into backend.config. If you import that, it will get loaded - Working on make_new_versions_of_csets for N3C Recommended updates
it runs or fails, it should update the log with success/error message and how long it took
appeared there after i did the pip freeze
- Changed it from middleware to a regular function that needs to be called by any route handlers that want to use it. It adds seven lines to those functions, but the logger code is much easier to deal with now. - Added that code to every almost route called by the front on the search and comparison pages. - It finally logs useful information when errors occur - Had to make return_err_with_trace async - Moved redundant config stuff to backend/config
Sigfried
temporarily deployed
to
Backend: Development
November 2, 2023 23:59
— with
GitHub Actions
Inactive
Sigfried
temporarily deployed
to
Backend: Development
November 3, 2023 02:01
— with
GitHub Actions
Inactive
Sigfried
commented
Nov 3, 2023
@@ -243,12 +175,14 @@ def set_nested_in_dict(d: Dict, key_path: List, value: Any): | |||
|
|||
def return_err_with_trace(func): | |||
"""Handle exceptions""" | |||
# @joeflack4: is this helping us? it's used for four routes. it took me a while to track down | |||
# that it needed to be async and have `await func(..)` |
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 fastapi (which chatgpt recommended while debugging)
Sigfried
temporarily deployed
to
Backend: Development
November 3, 2023 12:57
— with
GitHub Actions
Inactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some refactoring here. Oh, and forgot to mention in the commit msg that schema override is still in middleware that always runs, but by itself now. It allows us to put schema=foo in the query string of any api call and expect to get the schema we want.