Skip to content

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Apr 28, 2022

get_teams_for_user might return an empty list which would leave team and cluster_name unbound:

2022-04-28 07:38:23,972 ERROR: Exception on /operator/clusters/default/foobar-minimal-cluster/logs [GET]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 2077, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1525, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1523, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.8/site-packages/flask/app.py", line 1509, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/operator_ui/main.py", line 207, in wrapper
    return f(*args, **kwargs)
  File "/operator_ui/main.py", line 975, in get_operator_get_logs_per_cluster
    return proxy_operator(f'/clusters/{team}/{namespace}/{cluster_name}/logs/')
UnboundLocalError: local variable 'team' referenced before assignment

@FxKu FxKu added the bug label Apr 28, 2022
@FxKu FxKu added this to the 1.8.1 milestone Apr 28, 2022
@FxKu
Copy link
Member Author

FxKu commented Apr 29, 2022

👍

2 similar comments
@idanovinda
Copy link
Member

👍

@jopadi
Copy link
Member

jopadi commented Apr 29, 2022

👍

@FxKu FxKu merged commit 97c7091 into master Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants