Skip to content

chore: add checks for schema changes#1992

Merged
alanpeixinho merged 4 commits into
kernelci:mainfrom
profusion:georg/fix/schema-CI
Jul 23, 2026
Merged

chore: add checks for schema changes#1992
alanpeixinho merged 4 commits into
kernelci:mainfrom
profusion:georg/fix/schema-CI

Conversation

@mentonin

Copy link
Copy Markdown
Contributor

Summary

This PR adds a pre-commit hook to check that backend/schema.yml is up-to-date with python manage.py spectacular.

It also adds all pre-commit checks to the CI workflow, replacing duplicated linting/format specifications.

Related Issues

mentonin added 2 commits July 14, 2026 23:06
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
This removes code duplication and makes the CI checks
consistent with the development environment.

Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@alanpeixinho

Copy link
Copy Markdown
Contributor

@mentonin are we dropping the removal of the schema.yml from versioning?

@tales-aparecida

Copy link
Copy Markdown

how come the CI checks are empty?

Comment thread .github/workflows/ci.yaml Outdated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wont we need to setup node (and pnpm) to be able to run the frontend linters?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. Pre-commit is able to setup isolated environments, including for node, but we are not using that for the frontend checks

Comment thread .github/workflows/ci.yaml
path: ./dashboard/node_modules

- name: Install pnpm
uses: pnpm/action-setup@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might be needed on pre-commit run?

Comment thread .github/workflows/ci.yaml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we are using the old task name here

Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/ci.yaml Outdated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might be better to reuse setup-backend
uses: ./.github/actions/setup-backend

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't need poetry and dependencies, as pre-commit should use its own environment for running tests

Comment thread .github/workflows/ci.yaml Outdated
CI: true

jobs:
pre-commit-checks:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might be worth to include timeout just in case

@alanpeixinho

Copy link
Copy Markdown
Contributor

how come the CI checks are empty?

@mentonin we need to include

how come the CI checks are empty?

I believe the CI checks are tracking code changes only (backend or frontend). Is it correct @mentonin?

@alanpeixinho

Copy link
Copy Markdown
Contributor

how come the CI checks are empty?

@mentonin we need to include

how come the CI checks are empty?

I believe the CI checks are tracking code changes only (backend or frontend). Is it correct @mentonin?

My bad, the changes were for pre-commit only.

mentonin added 2 commits July 20, 2026 10:14
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@mentonin
mentonin force-pushed the georg/fix/schema-CI branch from 7ee4186 to edd0c86 Compare July 20, 2026 13:34

@alanpeixinho alanpeixinho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread .pre-commit-config.yaml

@tales-aparecida tales-aparecida 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.

we can improve it later if this new precommit hook is really slow

@alanpeixinho
alanpeixinho added this pull request to the merge queue Jul 23, 2026
Merged via the queue into kernelci:main with commit 9449f8c Jul 23, 2026
7 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.

Enforce OpenAPI schema updates in CI

3 participants