Skip to content

Make requirements-dev.txt installable, alone and alongside requirements.txt - #36

Merged
OkiriGabriel merged 1 commit into
open-devops-agent:mainfrom
Nitjsefnie-OSC:fix/29-align-dev-test-pins
Aug 2, 2026
Merged

OkiriGabriel merged 1 commit into
open-devops-agent:mainfrom
Nitjsefnie-OSC:fix/29-align-dev-test-pins

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Bug Description / Summary

requirements-dev.txt and requirements.txt cannot be installed together, and requirements-dev.txt
is not installable on its own either.

Fixes #29.

The issue named two conflicting pins; there are four, and the second failure mode was not in the issue
at all:

$ pip install --dry-run -r requirements.txt -r requirements-dev.txt
ERROR: Cannot install pytest==7.4.3 and pytest>=8.2.0 because these package versions
have conflicting dependencies.
ERROR: ResolutionImpossible

$ pip install --dry-run -r requirements-dev.txt
ERROR: Cannot install -r requirements-dev.txt (line 10), (line 17) and (line 4) ...
    pytest 7.4.3 depends on packaging
    black 23.12.1 depends on packaging>=22.0
    safety 2.3.5 depends on packaging<22.0 and >=21.0
ERROR: ResolutionImpossible

Worth knowing structurally: pytest==7.4.3 was already dead the moment requirements.txt gained
pytest>=8.2.0. No working environment has ever run this suite under pytest 7 — CI has been resolving
pytest 9 all along, because its install ignores requirements-dev.txt entirely.

What changed

Four specifiers in requirements-dev.txt, nothing else:

-pytest==7.4.3            +pytest>=8.2.0
-pytest-asyncio==0.21.1   +pytest-asyncio>=0.23.0
-safety==2.3.5            +safety>=3.0.0
-httpx==0.25.2            +httpx>=0.27.0

Floors rather than new exact pins, and each is lifted from a declaration you already maintain:
pyproject.toml:100-106 has pytest>=8.2.0, pytest-asyncio>=0.23.0 and safety>=3.0.0;
requirements.txt:9 has httpx>=0.27.0. Nothing is invented. Re-pinning would re-freeze the file the
same way it froze at the initial commit while requirements.txt moved on — which is how this arose.

requirements.txt, pyproject.toml and black are all untouched. Bumping safety alone clears the
packaging conflict, so black did not need to move — which also avoids a needless textual conflict
with dependabot PR #3, which edits this same file (and does not fix this on its own: it leaves
pytest-asyncio, httpx and the safety/packaging conflict in place).

Testing

Both dry-runs now exit 0, resolving pytest 9.1.1, pytest-asyncio 1.4.0, httpx 0.28.1,
safety 3.8.1, with black 23.12.1 and packaging 26.2 co-existing.

The suite is unchanged, which is the claim that matters for a dependency bump. Real installs on
both sides, dummy .env created exactly as ci.yml:57-85:

  • base (CI-way install at 1736350): 1 failed, 145 passed, 2 skipped
  • fixed: 1 failed, 145 passed, 2 skipped

Delta zero, same failing node id. Per-test outcomes were also extracted from -v on both sides and
diffed: empty — no test silently changed status, same two skips.

pytest 8/9 and pytest-asyncio 1.x were checked for the specific things that break suites across those
boundaries: there is no [tool.pytest.ini_options], no pytest.ini/setup.cfg/tox.ini, so no
asyncio_mode to migrate; no event_loop override and no loop_scope; all 18 async def test_
carry @pytest.mark.asyncio (strict mode confirmed live); and the only nose-style survivals are four
setup_method, which pytest 9 still supports.

A green CI run would not prove this fix. All eight jobs install -r requirements.txt plus ad-hoc
package names; requirements-dev.txt is installed in no job at all, and mypy runs in none. The
proofs above are the only proof.

The one failure is pre-existing and unrelated — tests/test_mcp.py::test_register_agent_tools_registers_all_tools,
from requirements.txt:15's unbounded mcp[cli]>=1.9.0 resolving to mcp 2.0.0, which removed
mcp.server.fastmcp. Filed separately as #34. It reproduces identically on untouched base; I did not
pin around it or skip it.

Environment

Debian 13 (x86_64), Python 3.13.14.

Follow-ups / Known Limitations

  • One residual conflict remains, outside every documented install flow: combining both
    requirements files and the editable .[dev] extra in one resolve still fails. Nothing in
    CONTRIBUTING or CI does that, so it is out of scope here — mentioning it so it is not a surprise if
    you ever add it.
  • A >= floor means a future major can break this again, with nothing to stop it. That exposure
    already exists through requirements.txt's identical floors and is not made worse here; dependabot
    is active on this file, which is the mechanism that manages it.
  • Not fixed, noticed while working: tests/test_basic.py:118 calls async K8sCollector.collect()
    without awaiting it and asserts on the coroutine, inside two bare except Exception: pass handlers
    at :120-122 and :123-125 — the test cannot fail. Also .github/workflows/ci.yml:5,7 trigger on
    a develop branch that does not exist.

Generated by Claude Opus 5 (1M context) (brief, implementation, review), Kimi K3 (verification)

@OkiriGabriel

Copy link
Copy Markdown
Collaborator

CI failure summary

CI is failing on Test Agent with Dummy Data (Python 3.10, 3.11, 3.12). All other checks pass.

Failing test: tests/test_mcp.py::test_register_agent_tools_registers_all_tools
Error: AttributeError: module 'devops_mcp' has no attribute 'registry'

Likely cause: Pre-existing failure on main, not introduced by the requirements-dev.txt changes in this PR. Same test fails on #35 and #37.

Suggested fix: Fix tests/test_mcp.py on main (ensure devops_mcp.registry is importable before patch), then rebase this branch.

This PR scope: Dev/test dependency pin work looks good — lint, security, integration, and collector/tool tests all pass.

Run: https://github.com/open-devops-agent/open-devops-agent/actions/runs/30650454855

@OkiriGabriel OkiriGabriel mentioned this pull request Aug 1, 2026
1 of 2 tasks
@OkiriGabriel

Copy link
Copy Markdown
Collaborator

CI fix merged to main in #38 (pinned MCP SDK to <2.0.0 and fixed tests/test_mcp.py). Please rebase onto latest main — your PR checks should go green now.

@OkiriGabriel

Copy link
Copy Markdown
Collaborator

Rebase needed — no code fixes required

The CI failure on this PR was caused by a pre-existing issue on main, not your changes. That is now fixed and merged (#38).

Your PR code looks good. To get CI green, update your branch with latest main:

git fetch origin
git checkout {"headRefName":"fix/29-align-dev-test-pins"}
git rebase origin/main
git push --force-with-lease

Or use the Update branch button on this PR if GitHub offers it.

After rebase, CI should pass and this will be ready to merge. Thanks for contributing!

pytest, pytest-asyncio and httpx were pinned in requirements-dev.txt to
versions below the floors requirements.txt already states, so
`pip install -r requirements.txt -r requirements-dev.txt` failed with
ResolutionImpossible. safety==2.3.5 additionally pins packaging<22.0
against black's packaging>=22.0, so requirements-dev.txt would not even
install on its own. Restate the four specifiers as the floors already
used by requirements.txt and pyproject.toml's dev extra.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Nitjsefnie
Nitjsefnie force-pushed the fix/29-align-dev-test-pins branch from 5885517 to a4792ee Compare August 2, 2026 08:42
@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Rebased onto main with #38 in — new head a4792ee, no conflicts (this branch only touches requirements-dev.txt, #38 only touched requirements.txt).

146 passed, 2 skipped locally on 3.12. Since this PR is itself about dev-requirements installability, I also re-checked both paths against the new pin: pip install --dry-run -r requirements-dev.txt and ... -r requirements.txt -r requirements-dev.txt both resolve clean, the combined install honouring #38's <2.0.0.

@OkiriGabriel
OkiriGabriel merged commit 5784468 into open-devops-agent:main Aug 2, 2026
10 checks passed
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.

requirements-dev.txt pins pytest==7.4.3, conflicting with requirements.txt pytest>=8.2.0

2 participants