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

fix: Preemptively fix API change in NDB. #7361

Merged
merged 1 commit into from
Aug 7, 2023
Merged

Conversation

NeilFraser
Copy link
Contributor

Glockenspiel broke due to 'query' now being required within a client context. This change fixed Glockenspiel. Blockly samples doesn't appear to be broken yet, but Glockenspiel broke at midnight yesterday.

Similar change being made to Blockly Games.

google.cloud.ndb.exceptions.ContextError
No current context. NDB calls must be made in context established by google.cloud.ndb.Client.context.
Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 271, in handle keepalive = self.handle_request(req, conn) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 323, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/srv/main.py", line 42, in app return storage.app(environ, start_response) File "/srv/storage.py", line 89, in app out = xmlToKey(forms["xml"].value) File "/srv/storage.py", line 47, in xmlToKey lookup_query = Xml.query(Xml.xml_hash == xml_hash) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/google/cloud/ndb/utils.py", line 118, in wrapper return wrapped(*args, **new_kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/google/cloud/ndb/model.py", line 5545, in _query default_options=kwargs["default_options"], File "/layers/google.python.pip/pip/lib/python3.7/site-packages/google/cloud/ndb/query.py", line 1384, in init database = context_module.get_context().client.database or None File "/layers/google.python.pip/pip/lib/python3.7/site-packages/google/cloud/ndb/context.py", line 118, in get_context raise exceptions.ContextError() google.cloud.ndb.exceptions.ContextError: No current context. NDB calls must be made in context established by google.cloud.ndb.Client.context.

Glockenspiel broke due to 'query' now being required within a client context.  This change fixed Glockenspiel.  Blockly samples doesn't appear to be broken yet, but Glokenspeil broke at midnight yesterday.

Similar change being made to Blockly Games.
@NeilFraser NeilFraser requested a review from a team as a code owner August 7, 2023 01:13
@NeilFraser NeilFraser changed the title Preemptively fix API change in NDB. fix: Preemptively fix API change in NDB. Aug 7, 2023
@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Aug 7, 2023

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@github-actions github-actions bot added the PR: fix Fixes a bug label Aug 7, 2023
@BeksOmega BeksOmega requested review from BeksOmega and removed request for maribethb August 7, 2023 17:07
@BeksOmega BeksOmega assigned BeksOmega and unassigned maribethb Aug 7, 2023
@NeilFraser NeilFraser merged commit 826510f into develop Aug 7, 2023
14 of 15 checks passed
@NeilFraser NeilFraser deleted the fraser-storageClient branch August 7, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants