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

Software tests start failing with Apache Superset 3.x/4.x and PyJWT 2.10 #741

Closed
amotl opened this issue Nov 20, 2024 · 5 comments
Closed

Comments

@amotl
Copy link
Member

amotl commented Nov 20, 2024

Problem

As per CI job report summary, we observed the software tests accompanying the CrateDB integration started failing. It doesn't necessarily need to be related to CrateDB, but we don't know yet.

Details

 >           assert response.status_code in [200, 404], response.json()
E           AssertionError: {'msg': 'Subject must be a string'}
E           assert 422 in [200, 404]
E            +  where 422 = <Response [422]>.status_code
ERROR test.py::test_api - AssertionError: {'msg': 'Subject must be a string'}
assert 422 in [200, 404]
 +  where 422 = <Response [422]>.status_code
ERROR test.py::test_ui - AssertionError: {'msg': 'Subject must be a string'}
assert 422 in [200, 404]
 +  where 422 = <Response [422]>.status_code

-- Test run #332

Version

In both cases, it is using Apache Superset 3.1.3.

Quick Evaluation

We had a package switchover in this context recently. However, this has been validated sucessfully on the CI run #329 two days earlier already, so we guess it is not the culprit.

References

Image

-- Build Status

@amotl
Copy link
Member Author

amotl commented Nov 20, 2024

That's the 422 response code at this spot now, instead of 200 or 404, as previously expected: HTTP 422 Unprocessable Content.

@amotl
Copy link
Member Author

amotl commented Nov 20, 2024

Apparently, PyJWT 2.10 was responsible, released on Nov 17, i.e. three days ago. Downgrading to PyJWT 2.9 helped to make the test suite succeed again.

I don't know if this is any kind of red flag for you, @villebro? Within our test cases, we are not using the jwt module directly, only orchestrate CLI invocations of the superset program and HTTP calls to the Superset API. In this spirit, there is a chance others may also run into this problem?

@amotl amotl changed the title Software tests for Apache Superset 3.1.3 started failing Software tests for Apache Superset start failing with PyJWT 2.10 Nov 20, 2024
@amotl amotl changed the title Software tests for Apache Superset start failing with PyJWT 2.10 Software tests start failing with Apache Superset 3.1.3 and PyJWT 2.10 Nov 20, 2024
@amotl
Copy link
Member Author

amotl commented Nov 20, 2024

We've just verified the problem also happens with Apache Superset 4.1.0.

@amotl amotl changed the title Software tests start failing with Apache Superset 3.1.3 and PyJWT 2.10 Software tests start failing with Apache Superset 3.x/4.x and PyJWT 2.10 Nov 20, 2024
@amotl
Copy link
Member Author

amotl commented Nov 20, 2024

Here we go.

{'msg': 'Subject must be a string'}

We reported the problem to the Apache Superset issue tracker.

@amotl
Copy link
Member Author

amotl commented Nov 22, 2024

We have been able to resolve this by updating to Flask-JWT-Extended 4.7.1 and configuring it using JWT_VERIFY_SUB = False.

@amotl amotl closed this as completed Nov 22, 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

No branches or pull requests

1 participant