deps-update

작성자: openshift

uv를 사용하여 Python 의존성을 최신 버전으로 업데이트하고, lock 파일과 requirements.txt를 재생성한 후, 린트와 테스트가 통과하는지 확인합니다. API 변경으로 인한 문제를 수정합니다…

npx skills add https://github.com/openshift/lightspeed-service --skill deps-update

deps-update

Step 1: Snapshot Current State

Before changing anything:

  1. Fetch upstream and check out a clean base:
    git fetch upstream
    git checkout upstream/main
    git checkout -b chore/deps-update
    
    If the working tree has uncommitted changes, stop and tell the user to commit or stash first. Dependency updates must land on a clean tree.
  2. Run uv lock --check to confirm the lock file is currently consistent
  3. Run uv run python --version to record the Python version

Step 2: Bump Dependencies

If a specific package was requested, bump only that package:

uv lock --upgrade-package {package}
uv sync --group dev --extra evaluation

Otherwise bump everything:

uv lock --upgrade
uv sync --group dev --extra evaluation

Capture the output of uv lock --upgrade — it lists all version changes and is needed for the commit message and report.

After running uv lock --upgrade, check the output for warnings. If a warning indicates a missing extra or incompatible constraint, investigate whether it affects this project. Note any benign warnings in the final report.

Then regenerate the pinned requirements file:

make requirements.txt

This runs uv export under the hood and produces a requirements.txt with hashes for production packages.

Step 3: Verify — Lint and Type Checks

Run the full verification suite:

make format
make verify

If verification passes cleanly, proceed to Step 4.

If verification fails:

  1. Read the error output carefully
  2. Identify which bumped package caused the breakage (often a renamed/removed API, changed type signatures, or new deprecation-as-error)
  3. Fix the calling code to match the new API — do not pin the package back to the old version unless the new version has a confirmed regression
  4. Re-run make format && make verify
  5. Repeat until clean

Step 4: Verify — Unit Tests

Run the unit test suite:

make test-unit

If tests pass, proceed to Step 5.

If tests fail:

  1. Distinguish between test breakage from API changes (assertions on old behavior, mocks of renamed methods) and genuine regressions (new bugs introduced by a library update)
  2. For API changes — update tests and source code to match the new API
  3. For genuine regressions — check the library's changelog and issue tracker. If confirmed upstream bug, pin that specific package to the last working version in pyproject.toml and re-run uv lock && uv sync
  4. Re-run make test-unit
  5. Repeat until clean

Step 5: Verify — Integration Tests

Run the integration test suite:

make test-integration

Same triage approach as Step 4 if failures occur.

Step 6: Report, Commit, and PR

Check which files changed beyond the dependency files:

git diff --name-only

Always present a summary to the user before committing:

  • Number of packages bumped, with notable version jumps (major versions, security-relevant packages)
  • Verification status (lint, unit tests, integration tests)
  • List of all changed files
  • Any warnings from Step 2 that were deemed benign
  • Any source/test files modified to fix API changes (with a brief explanation of each fix)

If only pyproject.toml, uv.lock, and requirements.txt changed — commit and raise a PR automatically without asking:

git add pyproject.toml uv.lock requirements.txt
git commit -m "chore: bump dependencies to latest"

Then follow the raise-pr skill to open the PR.

If source or test files were also modified (API change fixes from Steps 3–5) — wait for user acknowledgment before committing. Then commit all changes and follow the raise-pr skill.

Constraints

  • Clean tree required — do not start if there are uncommitted changes.
  • Fix forward, not back — prefer updating code to match new APIs over pinning old versions. Only pin back when there's a confirmed upstream regression.
  • Do not skip verification — all four gates (lint, types, unit tests, integration tests) must pass before committing.
  • Do not touch unrelated code — only modify files that break due to the dependency bump. No drive-by refactors.
  • Report honestly — if a test failure looks unrelated to the bump, say so. Let the user decide whether to investigate separately.
  • No manual requirements.txt edits — always regenerate via make requirements.txt, never hand-edit.

openshift의 다른 스킬

openshift-docs
openshift
OpenShift Container Platform 문서를 마크다운 형식으로 검색하고 읽습니다. 사용자가 OpenShift 기능, 구성, 설치 등에 대해 질문할 때 사용합니다.
triage-leaked-infra
openshift
AWS VPC 또는 HyperShift CI의 인프라 세트가 삭제해도 안전한지 평가합니다. 사용자가 cleanleaked 출력을 붙여넣고 '이거 삭제해도 되나요?', '이거...'라고 물을 때 사용합니다.
openshift-expert
openshift
OpenShift 플랫폼 및 Kubernetes 전문가로, 클러스터 아키텍처, 오퍼레이터, 네트워킹, 스토리지, 문제 해결 및 CI/CD 파이프라인에 대한 깊은 지식을 보유하고 있습니다. 사용…
Konflux Archived PipelineRuns
openshift
KubeArchive를 통해 보관된 Konflux PipelineRun, TaskRun 및 파드 로그에 접근합니다. Konflux PipelineRun 결과를 확인하거나 조사할 때 자동으로 적용됩니다.
backport
openshift
메인 브랜치에서 릴리스 브랜치로 커밋이나 PR을 백포트합니다. 사용자가 브랜치 간 변경 사항을 백포트, 체리픽, 포팅하거나 해결을 요청할 때 사용합니다.
rebase
openshift
현재 브랜치를 기본 브랜치 위로 리베이스하고, 모든 충돌을 해결한 뒤 린트, i18n, 빌드가 통과하는지 확인합니다. 사용자가 리베이스, 업데이트, 또는 동기화를 요청할 때 사용합니다…
Build CPO Image
openshift
컨트롤 플레인 오퍼레이터 컨테이너 이미지를 빌드하고 푸시합니다. 라이브 클러스터에 배포가 필요한 CPO 변경 사항을 테스트할 때 자동으로 적용됩니다.
find-complexity
openshift
순환 복잡도가 높거나, 길이가 지나치게 길거나, 매개변수가 너무 많은 함수와 메서드를 찾습니다. 사용자가 복잡한 코드나 복잡도를 찾아 달라고 요청할 때 사용하세요.