Skip to content

test_lab_fn: Error when triggered by unlabeled test #64

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

Closed
kevinthecheung opened this issue Apr 19, 2023 · 1 comment · Fixed by #80
Closed

test_lab_fn: Error when triggered by unlabeled test #64

kevinthecheung opened this issue Apr 19, 2023 · 1 comment · Fixed by #80

Comments

@kevinthecheung
Copy link
Collaborator

When an unlabeled test triggers on_test_matrix_completed, it throws the following:

Traceback (most recent call last):
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/functions_framework/__init__.py", line 174, in view_func
    function(event)
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/firebase_functions/test_lab_fn.py", line 273, in on_test_matrix_completed_wrapped
    return _event_handler(func, raw)
  File "/layers/google.python.pip/pip/lib/python3.10/site-packages/firebase_functions/test_lab_fn.py", line 225, in _event_handler
    details=event_data["clientInfo"]["details"],
KeyError: 'details'
Salakar added a commit to invertase/firebase-functions-python2 that referenced this issue May 3, 2023
@Salakar
Copy link
Member

Salakar commented May 3, 2023

It seems that 'details' in client info can sometimes be undefined, I based the python code off the JS Functions SDK code - the types there should probably also be updated since there it indicates that details is always defined but it's not always available as shown by this issue). I've pushed a fix for Python on PR #80

cc @taeold

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 a pull request may close this issue.

2 participants