Skip to content

ci: optimize quality checks and isolate dependency tests - #8535

Open
leandrodamascena wants to merge 3 commits into
developfrom
chore/ci-optimization-8534
Open

leandrodamascena wants to merge 3 commits into
developfrom
chore/ci-optimization-8534

Conversation

@leandrodamascena

@leandrodamascena leandrodamascena commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Issue number: closes #8534

Summary

Changes

Run formatting, linting, security and complexity checks once alongside the Python matrix. Configure Python before uv so runtime jobs use distinct dependency caches, cache mypy analysis, and cancel superseded PR runs.

Remove fastjsonschema from the shared Nox test dependencies. OpenAPI schema checks, Idempotency with Validation, and schema-validation middleware tests now run with their declared extras. Imports used by those tests are deferred until execution so they cannot contaminate collection in the minimal environments.

Recreate Nox environments between runs and fail the required-dependencies session if fastjsonschema leaks back in. Add make lint-check for checks without formatting, and keep Git hook installation in make dev.

User experience

Tests, dependency checks, type checking and coverage uploads remain on Python 3.10–3.14. Existing Lambda E2E coverage is preserved.

The required-dependencies, SDK and Parser sessions run without fastjsonschema. The 14 cases requiring additional Validation dependencies are retained in the appropriate sessions and in the full suite.

Validation

  • Full Python 3.10 suite: 3,531 passed, 4 skipped, plus all 10 performance tests.
  • All 15 Nox sessions passed on Python 3.10 and 3.14. Both executed the same 2,904 cases as the previous CI run, preserving the number of cases per test function.
  • Confirmed the installed dependencies in each minimal and combined environment. Deliberately adding fastjsonschema to a reused base environment failed the isolation check; recreating it removed the contamination and passed.
  • Ruff, applicable pre-commit hooks, and both type checkers passed.
  • Local mypy execution took 40.0 seconds with an empty cache and 0.34 seconds with a warm cache. These are local measurements, not GitHub Actions timings.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena
leandrodamascena requested a review from a team as a code owner October 6, 2026 05:38
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 6, 2026
@boring-cyborg boring-cyborg Bot added github-actions Pull requests that update Github_actions code internal Maintenance changes labels Oct 6, 2026
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.92%. Comparing base (17ace09) to head (0db206a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8535   +/-   ##
========================================
  Coverage    96.92%   96.92%           
========================================
  Files          317      317           
  Lines        15911    15911           
  Branches      1398     1398           
========================================
  Hits         15422    15422           
  Misses         353      353           
  Partials       136      136           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena leandrodamascena changed the title ci: reduce duplicated checks and cache type analysis ci: optimize quality checks and isolate dependency tests Oct 6, 2026
@boring-cyborg boring-cyborg Bot added dependencies Pull requests that update a dependency file tests labels Oct 6, 2026
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

dependencies Pull requests that update a dependency file github-actions Pull requests that update Github_actions code internal Maintenance changes size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: Optimize CI execution

1 participant