Skip to content

chore(ci): make Flake8 critical-error check blocking - #86

Merged
OkiriGabriel merged 1 commit into
open-devops-agent:mainfrom
OpeyemiAdeniji:ci/make-flake8-blocking
Oct 19, 2026
Merged

OkiriGabriel merged 1 commit into
open-devops-agent:mainfrom
OpeyemiAdeniji:ci/make-flake8-blocking

Conversation

@OpeyemiAdeniji

Copy link
Copy Markdown
Contributor

Description

Removes continue-on-error: true from the "Run Flake8" step in .github/workflows/ci.yml, so that step now fails the lint job when it finds problems.

The step only selects E9,F63,F7,F82 (syntax errors, invalid comparisons/asserts, misplaced control flow and undefined names). The codebase is clean for exactly these checks, so this makes the gate real without requiring any source changes. The Black step is intentionally left non-blocking: it currently reports 81 files that would be reformatted, which needs a decision from the maintainers first (asked on #18).

Part of #18 (first of several small PRs; this does not close it)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • New platform/collector support

CI configuration change (none of the listed types fit).

Platform/Component

  • Core Agent
  • Kubernetes
  • CI/CD (specify: GitHub Actions workflow, lint job)
  • Cloud Provider
  • ArgoCD
  • Docker
  • API Server
  • Tools/Executor
  • Documentation
  • Tests

Testing

  • Unit tests added/updated

  • Integration tests pass

  • Manual testing performed

  • Tested with dummy data

  • Tested in production-like environment

  • Ran the exact CI command from the repo root, flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics: count 0. Also 0 when run only on the 103 git-tracked .py files.

  • Parsed the workflow with yaml.safe_load: valid.

  • The diff is a single removed line.

  • This PR's own CI run also exercises the now-blocking step.

  • Full test suite locally: 296 passed, 2 skipped (the existing warnings are pre-existing and unrelated; this PR only changes a workflow file).

Test Configuration

OS: Windows (Git Bash)
Python Version: 3.12.10 (CI lint job uses 3.10)
Kubernetes Version: N/A
Cloud Provider: N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (N/A: one-line CI change)
  • I have made corresponding changes to the documentation (N/A)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (N/A: this PR's own CI run exercises the step)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Breaking Changes

None. From now on, a PR that introduces a syntax error or an undefined name will fail the Lint job instead of passing with a hidden failure.

Additional Notes

  • Next in Make CI lint and security scans fail the build #18, in separate PRs: replace the || echo "Expected to fail gracefully" webhook steps with real assertions. Black and Safety are waiting on the maintainer's answers in the issue thread.
  • If a stricter or looser gate is preferred, this is a one-line revert.

Reviewer Checklist

  • Code quality is acceptable
  • Tests are comprehensive
  • Documentation is updated
  • No security concerns
  • Performance impact is acceptable

The Flake8 step only selects E9, F63, F7 and F82 (syntax errors,
invalid comparisons and asserts, misplaced control flow and undefined
names), but continue-on-error: true meant a failure never failed the
lint job.

The codebase is clean for exactly these checks (0 findings on all
tracked .py files), so removing continue-on-error turns the step into
a real gate without any source changes. The Black step is left
non-blocking on purpose: it currently reports 81 files that would be
reformatted.

Part of open-devops-agent#18

@OkiriGabriel OkiriGabriel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this looks good. The Flake8 step only selects E9,F63,F7,F82, main is clean for those, and this PR's own Lint job passed with the step now blocking. Approving.

I'll answer the Black and Safety questions on #18.

@OkiriGabriel
OkiriGabriel merged commit e3071b4 into open-devops-agent:main Oct 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants