fix(ci): unbreak lint/test by decoupling optional guardrails extra#279
Merged
Conversation
The Run Tests workflow was failing at install time on `guardrails-ai (0.8.2)` because the entire `guardrails-ai` project is quarantined on PyPI — `https://pypi.org/simple/guardrails-ai/` returns `pypi:project-status: quarantined` with zero file links, so neither the locked 0.8.2 nor any other version (0.8.0, 0.8.1, 0.10.x) can be resolved or downloaded. Workflow changes (hotfix scope only): - Lint job: drop `-E guardrails`. The job only runs `ruff format --check` and `ruff check`; ruff is a dev-group dependency and never needed the runtime extra. - Core test job: drop `-E guardrails` and run `pytest -m "not guardrails"` so upstream churn in the optional extra cannot red the blocking coverage gate. Install remains `--with dev -E api`. - New `test-guardrails` job: installs `--with dev -E api -E guardrails`, runs `pytest -m guardrails` with coverage, and is `continue-on-error: true`. Mirrors the existing job's Python 3.10 pin, Poetry install, caching, and env. While the upstream quarantine persists this job will be yellow but non-blocking. - Cache key prefix bumped from `poetry-${{ runner.os }}-` to `poetry-v2-${{ runner.os }}-` in all three jobs so the first post-fix run does not restore stale PyPI index metadata. Not changed: - pyproject.toml: the `guardrails-ai = "^0.8.0"` optional dep and `guardrails` extra remain (the source-level `import guardrails` is already wrapped in a try/except and degrades to NullGuardrailsAdapter when missing). - poetry.lock: `poetry lock --regenerate --no-cache` fails with "Because zyra depends on guardrails-ai (^0.8.0) which doesn't match any versions, version solving failed" — and the same with ^0.10.0 — because PyPI exposes zero candidates. The existing lock entry (0.8.2) is only consulted when the `guardrails` extra is enabled, which is now exclusively the non-blocking job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Eric Hackathorn <erichackathorn@gmail.com>
…error to step level `continue-on-error: true` at the JOB level prevents the failure from cascading to the workflow conclusion, but the job itself still shows as a red ❌ on the PR check list. Moving the flag onto the install and pytest steps makes failed steps render as yellow ⚠ warnings while the job's overall conclusion is success/green — accurate signal that the optional extra is upstream-broken without the visual noise of a red required-looking check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Eric Hackathorn <erichackathorn@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Hotfix to unbreak the Run Tests workflow that has been failing at install because the guardrails-ai package is currently quarantined on PyPI. The change decouples the optional guardrails extra from the blocking lint/test jobs and isolates it in a new non-blocking job, while bumping the Poetry cache key so stale PyPI index metadata is not restored.
Changes:
- Drop
-E guardrailsfrom the lint job and from the core test job (the latter also now runspytest -m "not guardrails"). - Add a new
test-guardrailsjob that installs-E api -E guardrails, runspytest -m guardrails, and uses step-levelcontinue-on-error: trueso upstream PyPI outages stay yellow. - Bump the Poetry cache key prefix from
poetry-topoetry-v2-across all three jobs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Run Tests workflow was failing at install time on
guardrails-ai (0.8.2)because the entireguardrails-aiproject is quarantined on PyPI —https://pypi.org/simple/guardrails-ai/returnspypi:project-status: quarantinedwith zero file links, so neither the locked 0.8.2 nor any other version (0.8.0, 0.8.1, 0.10.x) can be resolved or downloaded.Workflow changes (hotfix scope only):
-E guardrails. The job only runsruff format --checkandruff check; ruff is a dev-group dependency and never needed the runtime extra.-E guardrailsand runpytest -m "not guardrails"so upstream churn in the optional extra cannot red the blocking coverage gate. Install remains--with dev -E api.test-guardrailsjob: installs--with dev -E api -E guardrails, runspytest -m guardrailswith coverage, and iscontinue-on-error: true. Mirrors the existing job's Python 3.10 pin, Poetry install, caching, and env. While the upstream quarantine persists this job will be yellow but non-blocking.poetry-${{ runner.os }}-topoetry-v2-${{ runner.os }}-in all three jobs so the first post-fix run does not restore stale PyPI index metadata.Not changed:
guardrails-ai = "^0.8.0"optional dep andguardrailsextra remain (the source-levelimport guardrailsis already wrapped in a try/except and degrades to NullGuardrailsAdapter when missing).poetry lock --regenerate --no-cachefails with "Because zyra depends on guardrails-ai (^0.8.0) which doesn't match any versions, version solving failed" — and the same with ^0.10.0 — because PyPI exposes zero candidates. The existing lock entry (0.8.2) is only consulted when theguardrailsextra is enabled, which is now exclusively the non-blocking job.Pull Request Template
Summary
Provide a short summary of the changes in this PR.
Related Issue
Closes # (or Links to: #)
Issue Type
Changes
src/zyra/tests/Type of Change
Impact / Risk
Describe impact, blast radius, and any rollback considerations.
Validation Steps
List steps for reviewers to verify this change (commands, expected results).
Checklist