Skip to content

Proposal: run lint, type checking and the test suite in CI #632

Description

@Aureliolo

Please confirm the following

  • I have checked the current issues for duplicates.
  • I understand that Ascender is open source software provided for free and that I might not receive a timely response.

Feature type

Enhancement to Existing Feature

Feature Summary

Add CI gates that would catch mechanically-detectable defects and enforce tests before merge: run the existing pytest suites, add a type checker over awx/, and broaden the flake8 rule selection.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

PR #630 shipped a type error: the code calls .replace on the list returned by traceback.format_exception. A type checker (mypy / pyright / ty) flags it directly; flake8 with the current rule selection does no type inference and does not. Separately, PRs #630 and #631 both add tests that today run nowhere, since CI executes no test suite.

Current results

CI runs no lint beyond a narrow flake8 selection, no type checker, and no tests. A type error like #630 merges unnoticed, and newly added tests do not guard against future regressions.

Sugested feature result

Incrementally, as separate reviewable PRs:

  1. Run the existing pytest suites in CI so tests like those in fix: prevent notification template render errors from crashing the error formatter #630 and fix: require superuser for the debug scheduler-trigger endpoints #631 guard against regressions. They pass locally in a few minutes.
  2. A type checker over awx/, starting advisory then tightening per-module, which would have caught fix: prevent notification template render errors from crashing the error formatter #630.
  3. Broaden the flake8 rule selection where it is low-noise.

Additional information

#631 is an authorization fix that automated tooling would not have caught; it is mentioned only because it also adds a test that needs CI to run. The concrete "would have been caught" case is #630 via type checking.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions