kubeflow / kubeflow/docs-agent

Bug: PR Safety workflow failing on main — ruff format check fails for tests/test_docs_pipeline.py

Open
#236 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
42
Forks
111
Avg merge
6d 23m
Merged PRs (30d)
2

Description

## Summary

The `PR Safety` workflow ("Lint and format" job) is **failing on `main`** because `tests/test_docs_pipeline.py` does not pass `ruff format --check`.

## Failure Details

- **Workflow:** `.github/workflows/tests.yml` → "PR Safety"
- **Job:** Lint and format
- **Step:** Check formatting
- **Failing run:** [PR Safety #49](https://github.com/kubeflow/docs-agent/actions/runs/15797791955/job/96852870728)
- **Command:** `ruff format --check docs-agent-mcp/mcp-server tests`

### Error output:
```
Would reformat: tests/test_docs_pipeline.py
1 file would be reformatted, 15 files already formatted
Error: Process completed with exit code 1.
```

## Impact

Every new PR against `main` inherits this formatting failure, which blocks contributors from getting clean CI results in the "Lint and format" job.

## Root Cause

`tests/test_docs_pipeline.py` has a trailing blank line at the end of the file that `ruff format` flags as a formatting violation.

## Fix

Running `ruff format tests/test_docs_pipeline.py` resolves the issue. PR: #235

Contributor guide

Open the contributing guide

Research direction

Start with tests/test_docs_pipeline.py and the PR Safety workflow in .github/workflows/tests.yml. Run ruff format --check docs-agent-mcp/mcp-server tests and confirm the workflow's Lint and format job passes without reporting that file.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, testing
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.