Skip to content

Conversation

@roxanan1996
Copy link
Contributor

  1. Ruff formatting and proper dependencies management
  2. Add extra check in ciq-cherry-pick.py if commit has Fixes reference. It now checks that commit was cherry picked before.
    Some commits apply cleanly, and even pass testing even though they should not be cherry picked because the commit they try to fix is not there. Exemple:
58ac55466f2ef630d981eb8a0dcdea8d0f12e517 ("Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()")

in lts-8.6
3. Add automatic cherry pick for cve-bf

WIP because github action for checking the formatting will be added soon.

And extra testing for the other improvements.

Add support for linting tools and dependencies management.
The file needed are:

- pyproject.toml. This is used for managing dependencies and configuration
into a single file. At the moment, it is not written to be able to
install this project as a proper package, but it can be changed in the future.

- .pre-commit-config.yaml. This will run Ruff's linter and
formatter via pre-commit.
At the moment, all *py are excluded from pre-commit formatting.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
This was done automatically by ruff format. Default configuration is used.

Variable l was replaced by index due to #E741. It is not recommened
to use variables named 'I', 'O' or 'l' because they are hard to read.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
This was done automatically by ruff format. Default configuration is used.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
This was done automatically by ruff format. Default configuration is used.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@roxanan1996 roxanan1996 self-assigned this Nov 10, 2025
@roxanan1996 roxanan1996 marked this pull request as draft November 10, 2025 18:01
…are commited

If the commit that needs to be cherry picked has "Fixes:" references in the
commit body, there is now a check in pace that verify if those commits
are present in the current branch. At the moment, the scrips returns an
Exception because the developer must check why the commit has to be cherry
picked for a bug fix or cve fix if the actual commit that introduced
the bug/cve was not commited.

If the commit does not reference any Fixes:, an warning is shown to make
the developer aware that they have to double check if it makes sense to
cherry pick this commit. The script continues as this can be reviewed after.
This is common in the linux kernel community. Not all fixes have a Fixes:
reference.

Checking if a commit is part of the branch has now improved. It checks if
either the commit was backported by our team, or if the commit came from upstream.

Note: The implementation reuses some of the logic in the
check_kernel_commits.py. Those have been moved to ciq_helper.py. This commit
address the small refactor in check_kernel_commits.py as well.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@roxanan1996 roxanan1996 force-pushed the {rnicolescu}_formatting-and-some-fixes branch from 21d911b to 73a8124 Compare November 10, 2025 18:03
It now automatically cherry picks the Fixes: dependencies.

To accomodate this, CIQ_find_mainline_fixes was moved to ciq_helpers.
And an extra argument for upstream-ref was introduced, the default being
origin/kernel-mainline, as the dependencies are looked up there.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@roxanan1996 roxanan1996 force-pushed the {rnicolescu}_formatting-and-some-fixes branch from 73a8124 to b63941b Compare November 10, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants