Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Detect and report unpushed Linux kernel tags in update_kernel_commits.py#5286

Merged
OhmSpectator merged 1 commit into
lf-edge:masterfrom
rucoder:rucoder/check-old-commit
Oct 6, 2025
Merged

Detect and report unpushed Linux kernel tags in update_kernel_commits.py#5286
OhmSpectator merged 1 commit into
lf-edge:masterfrom
rucoder:rucoder/check-old-commit

Conversation

@rucoder

@rucoder rucoder commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Description

Add validation to detect when referenced commits are not found in the
repository, with special handling for Linux kernel tags.

Changes:

  • Add LinuxKernelTagNotPushedError exception for distinguishable error handling
  • Check if old_commit exists in repository before fetching commit range
  • Detect Linux kernel tag format (vX.Y.Z) and provide helpful hint message
  • Continue processing all branches instead of stopping at first error
  • Collect all missing commit errors and report them together at the end
  • Format error output with prominent "ERROR:" prefix and branch name
  • Exit with error code 1 when any commits are not found

This prevents the script from proceeding with invalid data and ensures
all unpushed tags are reported in a single run, making it easier for
users to identify and fix all issues at once.

Example output:
ERROR: eve-kernel-amd64-v6.12.49-generic: commit 'v6.12.49' is not
found in the repository. This appears to be a Linux kernel tag
(vX.Y.Z format) that must be pushed to the repository first.

image

How to test and validate this PR

not easy, you need to have a newly pushed branch. @rene has one right now and can validate it

Changelog notes

None

PR Backports

Not requires because we do not introduce new kernels on old branches

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

@rucoder rucoder force-pushed the rucoder/check-old-commit branch from d5adebb to 8243f73 Compare October 6, 2025 17:07
@rucoder rucoder requested a review from rene October 6, 2025 17:08
@rucoder rucoder force-pushed the rucoder/check-old-commit branch 3 times, most recently from a36846e to 77c8fef Compare October 6, 2025 17:34
…commits.py

Add validation to detect when referenced commits are not found in the
repository, with special handling for Linux kernel tags.

Changes:
- Add LinuxKernelTagNotPushedError exception for distinguishable error handling
- Check if old_commit exists in repository before fetching commit range
- Detect Linux kernel tag format (vX.Y.Z) and provide helpful hint message
- Continue processing all branches instead of stopping at first error
- Collect all missing commit errors and report them together at the end
- Format error output with prominent "ERROR:" prefix and branch name
- Exit with error code 1 when any commits are not found

This prevents the script from proceeding with invalid data and ensures
all unpushed tags are reported in a single run, making it easier for
users to identify and fix all issues at once.

Example output:
  ERROR: eve-kernel-amd64-v6.12.49-generic: commit 'v6.12.49' is not
  found in the repository. This appears to be a Linux kernel tag
  (vX.Y.Z format) that must be pushed to the repository first.

Signed-off-by: Mikhail Malyshev <[email protected]>
@rucoder rucoder force-pushed the rucoder/check-old-commit branch from 77c8fef to b92b59d Compare October 6, 2025 17:37
@OhmSpectator OhmSpectator merged commit d85ee54 into lf-edge:master Oct 6, 2025
21 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