Public Access
feat: add role defaults path to create_dependency_pr search
Add ansible/roles/sso_bridge/defaults/main.yml to the search paths so create_dependency_pr can find and bump sso_bridge_version. Implements: REQ-1, REQ-2 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
f62fe16c1b
commit
c8065ca82b
@@ -0,0 +1,24 @@
|
||||
# DEVX-157: Add role defaults path to create_dependency_pr search
|
||||
|
||||
## Problem
|
||||
`create_dependency_pr` only searches `pyproject.toml` and `ansible/group_vars/all/images.yml` for pinned versions. The sso-bridge role pins its version in `ansible/roles/sso_bridge/defaults/main.yml` via `sso_bridge_version: "0.1.0"`, which is not searched.
|
||||
|
||||
## Approach
|
||||
Add `ansible/roles/sso_bridge/defaults/main.yml` to the search paths.
|
||||
|
||||
REQ-1: Add ROLE_DEFAULTS_PATH constant pointing to ansible/roles/sso_bridge/defaults/main.yml
|
||||
REQ-2: Include ROLE_DEFAULTS_PATH in the search loop
|
||||
|
||||
## Test Plan
|
||||
- Verify existing tests pass
|
||||
- Verify find_pinned_version finds sso_bridge_version in the defaults file
|
||||
|
||||
## Deploy Plan
|
||||
- Merge to master, auto-release new devx version
|
||||
|
||||
## Rollback Plan
|
||||
- Revert the merge commit
|
||||
|
||||
## Acceptance Criteria
|
||||
- [x] REQ-1: ROLE_DEFAULTS_PATH constant added
|
||||
- [x] REQ-2: search loop includes ROLE_DEFAULTS_PATH
|
||||
@@ -38,6 +38,7 @@ load_dotenv()
|
||||
# Where infra pins dependency versions
|
||||
PYPROJECT_PATH = "pyproject.toml"
|
||||
IMAGES_YML_PATH = "ansible/group_vars/all/images.yml"
|
||||
ROLE_DEFAULTS_PATH = "ansible/roles/sso_bridge/defaults/main.yml"
|
||||
|
||||
|
||||
def find_pinned_version(package: str, file_path: str) -> str | None:
|
||||
@@ -130,7 +131,7 @@ def cli(
|
||||
# Find current pinned version
|
||||
old_version = None
|
||||
changed_file = None
|
||||
for f in [PYPROJECT_PATH, IMAGES_YML_PATH]:
|
||||
for f in [PYPROJECT_PATH, IMAGES_YML_PATH, ROLE_DEFAULTS_PATH]:
|
||||
old_version = find_pinned_version(package, f)
|
||||
if old_version:
|
||||
changed_file = f
|
||||
|
||||
Reference in New Issue
Block a user