Skip to content

fix(ci): update constraint deps script to handle missing and regular dependencies#5865

Merged
leseb merged 1 commit into
ogx-ai:mainfrom
leseb:leseb/add-missing-constraint-dep
May 18, 2026
Merged

fix(ci): update constraint deps script to handle missing and regular dependencies#5865
leseb merged 1 commit into
ogx-ai:mainfrom
leseb:leseb/add-missing-constraint-dep

Conversation

@leseb

@leseb leseb commented May 18, 2026

Copy link
Copy Markdown
Member

What does this PR do?

The Dependabot constraint-update workflow was silently skipping dependencies not already listed in constraint-dependencies (e.g. google-genai), causing Dependabot PRs to miss version floor updates in pyproject.toml. See CI run for the SKIP: google-genai not found in constraint-dependencies output.

This PR teaches the update_constraint_deps.py script a three-way lookup strategy:

  1. constraint-dependencies (checked first, authoritative) — if found, update the >= floor there. Upper-bound constraints like <2.12.0 are respected.
  2. Regular dependency arrays ([project] dependencies, [project.optional-dependencies], [dependency-groups]) — if found with a >= floor, update all occurrences in place.
  3. Neither — insert a new entry into constraint-dependencies in alphabetical order.

Also adds find_dependency_lines() to search all non-constraint dependency arrays, and insert_constraint() for alphabetically-ordered insertion.

Test Plan

Unit tests expanded from 31 to 42, covering all three lookup paths, alphabetical insertion edge cases, and the fall-through behavior when a bare dep (no >= floor) exists in regular deps but a floor exists in constraint-deps.

uv run pytest tests/unit/test_update_constraint_deps.py -x --tb=short -v

Output:

42 passed in 1.62s

Pre-commit:

uv run pre-commit run --all-files
# All hooks passed

…dependencies

The Dependabot constraint-update workflow was skipping dependencies not
already in constraint-dependencies (e.g. google-genai). The script now
follows a three-way lookup: constraint-dependencies first (authoritative),
then regular dependency arrays in-place, then adds new entries to
constraint-dependencies in alphabetical order if not found anywhere.

Signed-off-by: Sébastien Han <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Sébastien Han <[email protected]>
@leseb
leseb added this pull request to the merge queue May 18, 2026
Merged via the queue into ogx-ai:main with commit daf0b35 May 18, 2026
19 checks passed
@leseb
leseb deleted the leseb/add-missing-constraint-dep branch May 18, 2026 18:23
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