Skip to content

feat: Add possibility to allowlist integrations in toxgen - #6996

Merged
sentrivana merged 1 commit into
masterfrom
ivana/add-selective-update-to-toxgen
Aug 3, 2026
Merged

feat: Add possibility to allowlist integrations in toxgen#6996
sentrivana merged 1 commit into
masterfrom
ivana/add-selective-update-to-toxgen

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

We can already skip specific integrations. Add the opposite, too -- only updating specific integrations and skipping everything else.

@sentrivana
sentrivana marked this pull request as ready for review August 3, 2026 08:51
@sentrivana
sentrivana requested a review from a team as a code owner August 3, 2026 08:51
Comment on lines +1218 to +1223
parser.add_argument(
"--only-update",
nargs="*",
default=[],
help="Only update versions for these integrations (all others will be skipped).",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Using the --only-update flag without any integration names causes all integrations to be updated, which is counter-intuitive and the opposite of the flag's intent.
Severity: LOW

Suggested Fix

Add a check after parsing arguments to ensure that if the --only-update flag was provided, its corresponding list of integrations is not empty. If it is empty, print an error message informing the user that they must provide at least one integration name and exit.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: scripts/populate_tox/populate_tox.py#L1218-L1223

Potential issue: When the `--only-update` flag is used without any integration names, it
is parsed as an empty list. This empty list is treated as a falsy value in the script's
logic. Consequently, the condition `only_update and integration not in only_update` in
the skip logic always evaluates to `False`. This causes the script to bypass the
intended filtering and proceed to update all integrations, which is the opposite of the
flag's purpose and happens without any warning to the user.

Also affects:

  • scripts/populate_tox/populate_tox.py:1286~1288
  • scripts/populate_tox/populate_tox.py:1306~1308

Did we get this right? 👍 / 👎 to inform future reviews.

@sentrivana
sentrivana enabled auto-merge (squash) August 3, 2026 09:02
@sentrivana
sentrivana merged commit a3f45e3 into master Aug 3, 2026
140 checks passed
@sentrivana
sentrivana deleted the ivana/add-selective-update-to-toxgen branch August 3, 2026 09:04
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

94982 passed | ⏭️ 6343 skipped | Total: 101325 | Pass Rate: 93.74% | Execution Time: 341m 6s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +99072
Passed Tests 📈 +93000
Failed Tests
Skipped Tests 📈 +6072

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2511 uncovered lines.
✅ Project coverage is 89.89%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    37.77%    89.89%   +52.12%
==========================================
  Files          193       193         —
  Lines        24832     24832         —
  Branches      8912      8912         —
==========================================
+ Hits          9378     22321    +12943
- Misses       15454      2511    -12943
- Partials       496      1415      +919

Generated by Codecov Action

mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
…6996)

We can already skip specific integrations. Add the opposite, too -- only
updating specific integrations and skipping everything else.
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