Skip to content

Fix: Format tests/test_docs_pipeline.py to pass ruff checks - #235

Open
Fumer057 wants to merge 1 commit into
kubeflow:mainfrom
Fumer057:fix/format-test-file
Open

Fix: Format tests/test_docs_pipeline.py to pass ruff checks#235
Fumer057 wants to merge 1 commit into
kubeflow:mainfrom
Fumer057:fix/format-test-file

Conversation

@Fumer057

@Fumer057 Fumer057 commented Aug 23, 2026

Copy link
Copy Markdown

Problem

Fixes #236

The PR Safety workflow is failing on the "Check formatting" step because tests/test_docs_pipeline.py does not meet ruff's code formatting standards.

Failure Details

  • Workflow: .github/workflows/tests.yml - "PR Safety"
  • Job: Lint and format
  • Step: Check formatting
  • Failing run: PR Safety #49
  • Error: ruff format --check docs-agent-mcp/mcp-server tests found 1 file that would be reformatted
  • Failed File: tests/test_docs_pipeline.py

Root Cause

The test file has a trailing blank line at the end that doesn't comply with ruff's formatting standards. The workflow enforces code formatting to maintain consistency across the codebase.

Solution

Applied ruff format to tests/test_docs_pipeline.py to bring it into compliance with project formatting standards. This is the exact output of running ruff format — no other changes.

Contributing Guidelines Followed

  • ✅ Adheres to Kubeflow Contributor Guide
  • ✅ Follows project code style requirements (ruff formatting)
  • ✅ Maintains code consistency with existing codebase
  • ✅ Passes all workflow checks: lint, format, and pytest

Testing

All checks pass:

  • ruff check . (lint check)
  • ruff format --check docs-agent-mcp/mcp-server tests (formatting check)
  • pytest -v --tb=short (unit tests)

Type

  • Bug fix (formatting compliance)
  • Feature
  • Documentation

Signed-off-by: Fumer057 <fumer057@users.noreply.github.com>
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign chasecadet for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ArshVermaGit ArshVermaGit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only a formatting change (removing one blank line), but the PR does not show a meaningful code-level fix. I would not approve this PR as-is.

@google-oss-prow

Copy link
Copy Markdown

@ArshVermaGit: changing LGTM is restricted to collaborators

Details

In response to this:

This is only a formatting change (removing one blank line), but the PR does not show a meaningful code-level fix. I would not approve this PR as-is.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Fumer057

Copy link
Copy Markdown
Author

Hi @ArshVermaGit, thanks for the review!

I understand this looks minimal, but this single trailing-newline removal is the exact output of ruff format — it's the only change needed to fix the currently failing CI on main.

The PR Safety workflow (Job #49, "Lint and format" → "Check formatting") runs:

ruff format --check docs-agent-mcp/mcp-server tests

and fails with:

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

This means every new PR against main inherits this failure, blocking contributors from getting clean CI results. The fix is intentionally minimal — it applies only what ruff format requires, with no unrelated changes mixed in.

Happy to discuss further or make any additional changes if needed!

@jaiakash

jaiakash commented Aug 29, 2026

Copy link
Copy Markdown
Member

Hi @Fumer057 did you create tracking issue for this?
cc @SanthoshToorpu @kmr-rohit PTAL

@Fumer057

Copy link
Copy Markdown
Author

Hi @jaiakash, thanks for flagging! I've now created a tracking issue: #236

The issue documents the CI failure on main (the ruff format --check step in the PR Safety workflow), its impact on contributors, and links back to this PR as the fix.

@ArshVermaGit ArshVermaGit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This removes only the trailing blank line that ruff format --check flags, so the change is minimal and directly fixes the CI formatting failure. No further changes needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants