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

Server response log examples #53

Merged
merged 5 commits into from
Jan 11, 2022
Merged

Conversation

Andy-Grigg
Copy link
Collaborator

@Andy-Grigg Andy-Grigg commented Jan 10, 2022

To be merged after #51. I have created the diff with the #51 branch as a base for easier reviewing.

Uses monkey patching of the Connection and Client classes to ensure we can inject server URL and credentials when running examples. This replaces the previous method of using a hidden cell, which would have been visible in download .py and .ipynb files.

The monkey patching is done in the ipython profile, which means it's available for all notebooks. This approach requires running the examples tests in ipython as well, otherwise the required monkey patching doesn't happen.

I'm not convinced this is better than having the deleted cell, it's ultimately a tradeoff between:

  • More complexity when running the examples and building the docs, or
  • Additional code in the examples which isn't needed and may be confusing

…e background on fluent interfaces. Requires an alternative way of "faking" the connection with monkey patching.
Base automatically changed from feat/49-response-messages to main January 11, 2022 14:17
Copy link
Collaborator

@da1910 da1910 left a comment

Choose a reason for hiding this comment

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

This all looks good. I like not repeating ourselves with hidden cells.

@@ -121,7 +121,9 @@ def messages(self) -> List[LogMessage]:
"""[TECHDOCS] Messages generated by Granta MI when running the query. The presence of one or more messages means
something unexpected happened when running the query, but the query could still be completed.

Messages are sorted in order of decreasing severity.
Messages are sorted in order of decreasing severity. Messages are also logged in the Service Layer log on the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have we documented which logger the messages are logged to?

@Andy-Grigg Andy-Grigg merged commit 27b9eec into main Jan 11, 2022
@Andy-Grigg Andy-Grigg deleted the doc/49-server-response-logs branch January 11, 2022 18:55
Andy-Grigg pushed a commit that referenced this pull request Jan 11, 2024
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