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

build: Remove tox constraint. #354

Closed
wants to merge 2 commits into from
Closed

Conversation

feanil
Copy link
Contributor

@feanil feanil commented Jul 12, 2023

The tox package is already 6 minor revisions ahead at 4.6.4. If there
are still plugins that don't support 4.x.x, then they are likely
stagnant and need to be removed or updated ourselves.

However, as long as we keep this constraint here, we can't easily find
and fix those issues. In many of the cases, this constraint was added
due to the incompatibility of tox-battery with tox 4.x.x. However,
tox-battery has updated its install_requires to be explicit of this
dependency.

https://github.com/signalpillar/tox-battery/blob/master/setup.py#L20

Another issue we're running into is that some of the dependencies of tox
are starting to publish security vulnerabilities. It's lower risk since
this is in dev and CI but leaving this as is will increase security
noise making it harder to respnod to real signals.

Specifically, tox<4.0.0 depends on a version of py which has a
security vulnerability. Dependabot is picking this up and making some
noise in a lot of our repos.

Closes openedx/public-engineering#203

Process Note

Before merging this, I'll be posting a detailed message on Discourse(cross posted to slack) to let people know it's coming, what to look for and how to fix it locally in their repos. That should allow people to fix forward locally without the need for the global constraint. This will also allow us to incrementally move forward and fix one or two repos at a time.

@feanil feanil requested review from jmbowman and a team July 12, 2023 18:11
@feanil feanil force-pushed the feanil/remove_tox_constraint branch 2 times, most recently from 9281bb7 to 19e3738 Compare July 12, 2023 18:13
@feanil feanil requested a review from a team July 12, 2023 20:19
@@ -21,7 +21,3 @@ elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
Copy link
Contributor

Choose a reason for hiding this comment

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

... causing CI failures in almost all repos.

This scares me, and seem like a good reason to have a common constraint. Did you confirm that a repo that was failing on 4.0.0 now works with the latest upgrade, and that we can reasonably expect that it is now passing for most repos?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, it's nearly impossible to test this because of how the common constraints are setup in a repo. You can't actually remove the constraint at the repo level without make upgrade automatically adding it back before it rebuilds requirements.

That said, this could be added to the constraints at the repo level and my plan was to do a big announce so that maintainers are prepared to do that if they see issues. As I said in the description, most of our repos have tox-battery as a dependency and that already constrains tox<4.0.0 so I'm less concerned about this breaking everything like it did when tox 4.0.0 was first released. (At that time tox-battery did not have its constraint on tox<4.0.0.

Copy link
Contributor

Choose a reason for hiding this comment

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

We could use this hacky solution on a branch just for testing: openedx/edx-platform@56d12bf. I think it would be useful. If we discover a problem that is easily fixable, but that all or many repos might run into, it might be nice to provide the solution rather than having everyone add constraints, and then having the same problem we have now (a constraint where we don't want one), only a much more global version of it. Thoughts?

Copy link
Contributor

@robrap robrap Jul 13, 2023

Choose a reason for hiding this comment

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

Also see #355 which I just moved from Jira. This ticket is for fixing this common constraints issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robrap good call on digging further into this. I had missed the fact that 0.6.2 of tox-battery(the version that constrains tox) has been merged but has not been released. I think the real path forward is gonna have to be dropping the dependency on tox-battery everywhere first and then dropping this common constraint.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool. Thanks for digging further. Good luck. Should this ticket be closed for now, or will you block on some new issue?

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 think the order of the work changes, this is now blocked on fixing tox-battery to publishing a new version or for us to drop our dependency on tox-battery in all repos(This might be the fastest way forward.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. Are you planning on ticketing and pushing forward the tox-battery work? Was this all just inform for me at this point? Thanks.

@feanil feanil requested a review from robrap July 13, 2023 15:13
The `tox` package is already 6 minor revisions ahead at 4.6.4.  If there
are still plugins that don't support 4.x.x, then they are likely
stagnant and need to be removed or updated ourselves.

However, as long as we keep this constraint here, we can't easily find
and fix those issues.  In many of the cases, this constraint was added
due to the incompatibility of tox-battery with tox 4.x.x.  However,
tox-battery has updated its `install_requires` to be explicit of this
dependency.

https://github.com/signalpillar/tox-battery/blob/master/setup.py#L20

Another issue we're running into is that some of the dependencies of tox
are starting to publish security vulnerabilities.  It's lower risk since
this is in dev and CI but leaving this as is will increase security
noise making it harder to respnod to real signals.

Specifically, tox<4.0.0 depends on a version of `py` which has a
security vulnerability.  Dependabot is picking this up and making some
noise in a lot of our repos.
@feanil feanil force-pushed the feanil/remove_tox_constraint branch from 19e3738 to 635e31c Compare October 12, 2023 19:40
@feanil feanil closed this Oct 12, 2023
@feanil feanil reopened this Oct 12, 2023
@iamsobanjaved
Copy link
Contributor

We have an issue on our board for this and was pending due to the team focusing on the Django upgrade, but now we have prioritized this and will work on first upgrading tox in edx-platform and then remove this constraint. Also this constraint removal work is blocked this issue edx/edx-arch-experiments#130

@feanil
Copy link
Contributor Author

feanil commented Dec 18, 2023

This got fixed in a different PR.

@feanil feanil closed this Dec 18, 2023
@feanil feanil deleted the feanil/remove_tox_constraint branch December 18, 2023 19:48
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.

Remove tox<4.0.0 from the common constraints
4 participants