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

[3] Move the Misc group over to the tox gen script #3982

Merged
merged 20 commits into from
Feb 13, 2025

Conversation

sentrivana
Copy link
Contributor

  • remove hardcoded entries for loguru, trytond, and typer from the tox template
  • remove them from the ignore list in populate_tox.py
  • run populate_tox.py to fill in entries for them
  • run split_gh_tox_actions.py to generate the CI yaml files so that they correspond to the new tox.ini

Note that this effectively eliminates the -latest tests for the Misc group. The script doesn't generate any -latest tests since it always makes sure to add a pinned entry for the latest version. So in case all of the integrations in a single group are using the script, the whole -latest test category is removed.

@sentrivana sentrivana changed the title [12] Move the Misc group over to the tox gen script [3] Move the Misc group over to the tox gen script Jan 20, 2025
@szokeasaurusrex
Copy link
Member

szokeasaurusrex commented Jan 21, 2025

Note that this effectively eliminates the -latest tests for the Misc group. The script doesn't generate any -latest tests since it always makes sure to add a pinned entry for the latest version. So in case all of the integrations in a single group are using the script, the whole -latest test category is removed.

How often does the Tox script run, @sentrivana? Could this end up being a problem?

Also, right now the latest tests, I believe, are not required for CI to pass. Which I think is good, because if a change in a new version of an integration breaks the SDK, this is not a regression in the SDK, and so we should not be blocked from making other PRs until it is fixed. This Tox script basically now makes it a requirement for the latest tests to pass, right? If yes, have we considered the consequences of this and thought of any alternative solutions, e.g. only adding the tests for latest versions if they pass?

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.32%. Comparing base (5a5a1cf) to head (180746a).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3982   +/-   ##
=======================================
  Coverage   80.32%   80.32%           
=======================================
  Files         140      140           
  Lines       15510    15510           
  Branches     2628     2628           
=======================================
  Hits        12458    12458           
  Misses       2209     2209           
  Partials      843      843           
Files with missing lines Coverage Δ
sentry_sdk/integrations/__init__.py 77.01% <ø> (ø)

@sentrivana
Copy link
Contributor Author

sentrivana commented Jan 22, 2025

@szokeasaurusrex That's correct, latest tests will essentially become required for all frameworks managed by the script.

My plan would be to have the script run automatically every week (the freq can be tweaked anytime) in a GitHub action, which would ideally then also create a PR with the changed tox.ini. (Until we have this, I'll do this manually.) If possible, I'd like to eventually automate this fully and have it commit the changes as long as CI passes.

So in general, the only point in time the contents of tox.ini would change and potentially introduce a new version that needs SDK or test changes is disconnected from other workflows like merging a PR. Someone will still need to address possible CI issues stemming from introducing a new version, but they can do it when they have time and it's not blocking anything else.

Wdyt?

@szokeasaurusrex
Copy link
Member

@sentrivana i guess if it is nonblocking and if we update the tox.ini often, this should be okay. Running the script every week might even be overkill but we can always tweak I guess

Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

This PR appears to remove tests for trytond version 4. Is this intentional?

Base automatically changed from ivana/tox-script-4 to master February 11, 2025 10:26
@sentrivana
Copy link
Contributor Author

This PR appears to remove tests for trytond version 4. Is this intentional?

Good catch. Looks like trytond 4 is the first victim of the new 5 year cutoff period. I'll add it to the script's ignore list for now and let's properly remove it in #4045

"strawberry": {
"package": "strawberry-graphql[fastapi,flask]",
"deps": {
"*": ["httpx"],
},
},
"trytond": {
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'm keeping the config around even if the script is not generating stuff for trytond atm. Once we enable it, it should just work out of the box.

@sentrivana sentrivana merged commit c6b5994 into master Feb 13, 2025
145 checks passed
@sentrivana sentrivana deleted the ivana/tox-script-12 branch February 13, 2025 15:33
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.

2 participants