Repository navigation
Description
Problem
Checked at devops-cli main 52126db.
- The collections row of
devops infra onboardreadscollections/requirements.ymlorcollections/requirements.yaml(_REQUIREMENTS_FILESinsrc/devops_cli/infra/repo_content.py:37). devops infra plananddevops infra applyinstall onlycollections/requirements.yml(REQUIREMENTS_FILE, used byinstall_collectionsinsrc/devops_cli/infra/plan.py). The roles row of onboard installs the same file.- A repo that holds only
collections/requirements.yamlgets apresentcollections row, but plan and apply then run with no pinned collection installed.
Proposed remedy
Use one rule for the file name in onboard, plan and apply: either install the file that read_collection_requirements finds, or make the collections row accept only collections/requirements.yml and name the file in its step.
Acceptance criteria
- A new test fails on main and passes on the branch: a repo with only
collections/requirements.yamlgets the same answer from the collections row and from the install of plan. -
uv run devops ci --check --only test,lint,typecheckpasses.
Person steps
None.
Dependencies
None.
Source
Source: #6678
Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches found only Ansible runtime images and docs, none of which discovers a repository's collection requirements file. The mismatch is between two functions of this CLI, so no external tool covers it.
Lacks:
- No discovery of collections/requirements.yml or .yaml
- No shared file-name rule between onboard and plan
- No parity test for a .yaml-only repository
Proposed design
Problem statement
The infra commands do not agree on the collection requirements file. devops infra onboard accepts collections/requirements.yml and collections/requirements.yaml, but devops infra plan, devops infra apply, and the onboard roles row install only collections/requirements.yml. A repository with only the .yaml file shows a present collections row and then runs with no pinned collection.
Acceptance criteria
Requirement: Collections row and install agree
The collections row and the install path SHALL name the same collection requirements file.
Scenario: YAML-only repository
- WHEN A test in
tests/commands/test_infra_onboard.pycreates a project with onlycollections/requirements.yaml, calls the collections-row reader, and calls the shared requirements-file helper. - THEN The collections row reports the file as present, and the helper returns
collections/requirements.yaml.
Requirement: Plan install uses the discovered file
The plan and apply install step MUST install the collection requirements file that the shared discovery rule returns.
Scenario: Plan on a YAML-only repository
- WHEN A test gives a project with only
collections/requirements.yamltoinstall_collectionsand replacesinstall_requirementswith a recorder. - THEN The recorder receives the path
collections/requirements.yaml.
Requirement: Onboard roles row uses the discovered file
The onboard roles row MUST install the collection requirements file that the shared discovery rule returns.
Scenario: Onboard on a YAML-only repository
- WHEN A test runs the onboard roles row for a project with only
collections/requirements.yaml. - THEN The install command names
collections/requirements.yaml.
Requirement: Scoped CI checks pass
The change MUST pass the repository checks for test, lint and typecheck.
Scenario: Scoped CI check
- WHEN A person runs
uv run devops ci --check --only test,lint,typecheck. - THEN The command exits 0 with every check passing.
Existing Tool Considered
No open, maintained tool covers this need. The alternatives check in the issue body records the verdict none and lists the lacks. The change adds one small shared helper and edits its call sites: about 2,000 tokens to build, 500 tokens to keep and fix, and less than one hour of elapsed time.
Key questions
- Which file-name rule should onboard, plan and apply use?: Use the existing
_REQUIREMENTS_FILESorder and one helper inrepo_content.py. The helper returns the first existing path. The collections row,install_collections, and the onboard roles row use that path. (best practice) [sources: src/devops_cli/infra/repo_content.py:37, src/devops_cli/infra/repo_content.py:197, src/devops_cli/infra/plan.py:466, src/devops_cli/infra/onboard.py]- Chosen: Reuse the existing two-name discovery in one helper. The collections row already accepts both names, and one helper removes the drift that caused the defect.
- Rejected: Accept only
collections/requirements.yml. This breaks repositories that already use the.yamlname and changes the current present result. - Rejected: Repeat the two-name check in each caller. The repeated checks can drift again, which is the cause of this defect.
- How should the install step receive the requirements path?: Pass the resolved path into
install_requirementsand the roles-row install. Do not keepREQUIREMENTS_FILEas the only source in these paths. (best practice) [sources: src/devops_cli/infra/plan.py:466, src/devops_cli/infra/ansible_facts.py:41, src/devops_cli/infra/onboard.py]- Chosen: Pass the resolved path as an argument. The caller and the installer then use the same file, and the helper stays the only name rule.
- Rejected: Keep the constant and add a second
.yamlbranch in each caller. The branches can disagree and restore the defect. - Rejected: Change
REQUIREMENTS_FILEto a list. A constant list still does not pass the selected file to the installer.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 21, 2026
Both work on devops infra onboard, but #5121 created the command and the candidate fixes a file-name inconsistency it introduced.devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 23, 2026
Released in v0.199.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.199.0
devops-cli-service commentedon Nov 23, 2026
Live since 2026-11-23 06:32 UTC