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

Swap calls to extractall for TarSafe equivalent - 2.8.x #9851

Merged
merged 4 commits into from
Oct 13, 2021
Merged

Conversation

usc-m
Copy link
Contributor

@usc-m usc-m commented Oct 12, 2021

Proposed changes:

Status (please check what you already did):

  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@usc-m usc-m requested a review from a team as a code owner October 12, 2021 16:21
Copy link
Contributor

@rasa-jmac rasa-jmac left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Member

@ancalita ancalita left a comment

Choose a reason for hiding this comment

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

Looks good 💯 Had one query on the changes in poetry.lock 🤔

poetry.lock Outdated
@@ -1849,18 +1849,18 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"

[[package]]
name = "pyjwt"
version = "2.1.0"
version = "2.2.0"
Copy link
Member

Choose a reason for hiding this comment

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

There are quite a few packages being updated - I am not very familiar with poetry, why would this be caused by adding the tarsafe requirement? Perhaps this could also be the reason why a test in test_server.py was failing at first with an error related to JWT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That could be - I added the package with poetry add tarsafe and it went around updating things (I thought within the version specifications, but maybe not). I'll have a look into this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it looks like the pyproject.toml specifies what versions we accept and it may be that there's some breaking change in a later version that is accepted

Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to revert pyjwt to version 2.1.0 then since fixing this is out of scope of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can probably alter the lock file but that's not a good idea generally. It looks like we don't use it as an immediate dependency so it must be a transitive dependency, and whatever is pulling it in isn't specifying what version it wants clearly enough maybe?

Copy link
Contributor Author

@usc-m usc-m Oct 13, 2021

Choose a reason for hiding this comment

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

Yes - it looks like oauthlib is pulling it in, and it's specifying "pyjwt (>=2.0.0,<3)", and sanic-jwt is pulling it in specifying *. The latest release of pyjwt is 2.2.0 and that fits the constraints so that's been updated, but I think the constraint set by sanic-jwt doesn't take into account the changes made in it. It looks like on the sanic-jwt repo this was fixed 2 months ago, but to pull that in we'd have to bump it's version to 1.7.0. Not sure what the best approach here is going to be, any ideas @wochinge? It looks as if the changes in 1.7.0 vs 1.5.0 (what we have now) are fairly minor, so I could try bumping it on this PR and if the tests pass we go ahead with it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Mhm, weird that poetry add tarsafe caused this. My suggested approach would be to limit the upper bound for now via pyproject.toml and then create an issue to bump this + fix any related issues. This avoids mixing the scopes (especially since this will also effect Rasa Enterprise which makes quite heavy use of sanic-jwt)

Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏻

Real fix is to update sanic-jwt (and then drop the pin) but we are concerned about breakage at the moment so this is an easy temporary fix
@usc-m usc-m merged commit 0e8ef43 into 2.8.x Oct 13, 2021
@usc-m usc-m deleted the tarsafe-on-2.8.x branch October 13, 2021 16:14
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.

4 participants