Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: Add script to check third party package version #20662

Merged
merged 1 commit into from
May 27, 2024

Conversation

namberino
Copy link
Contributor

Contribution description

This provides a script that will read the Makefile of third party packages in the pkg/ directory and compare the PKG_VERSION hash with the latest upstream release hash or commit hash and check if the package is outdated or not.

The script requires a GitHub API token to run.

Testing procedure

Running the script and inputing a GitHub API token should print out a list of outdated packages.

Issues/PRs references

Fixes #13911

@github-actions github-actions bot added the Area: pkg Area: External package ports label May 10, 2024
@benpicco benpicco requested review from chrysn and miri64 May 13, 2024 09:27
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks, that seems to be a nice addition!

From a very quick glance at the changes, already some comments:

  • could you adapt the script to follow our python coding convention? In particular, provide and use a main function (also move initialization code there), add a copyright notice and shorten lines longer than 120 chars.
  • could you move the script under dist/tools/pkg_version_check (or similar) and provide a (short) README explaining its function?

pkg/version_check.py Outdated Show resolved Hide resolved
@mguetschow
Copy link
Contributor

Tried it locally, the python file is missing the executable rights (chmod u+x version_check.py).

Total number of outdated packages: 74

👀

I think it would be nice to provide more concise output, only listing failures and outdated packages.

@namberino namberino requested a review from jia200x as a code owner May 18, 2024 12:41
@github-actions github-actions bot added Area: doc Area: Documentation Area: tools Area: Supplementary tools and removed Area: pkg Area: External package ports labels May 18, 2024
@namberino namberino requested a review from mguetschow May 18, 2024 12:42
@namberino
Copy link
Contributor Author

I've moved the script to dist/tools and reformatted the output so that it will only print out the outdated and failed packages. I've also added a README for this script and rewrote the script to follow RIOT's coding convention

Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks, looks mostly good to me. Below just some suggestions and minor nits.

dist/tools/pkg_version_check/README.md Outdated Show resolved Hide resolved
dist/tools/pkg_version_check/README.md Outdated Show resolved Hide resolved
dist/tools/pkg_version_check/README.md Outdated Show resolved Hide resolved
dist/tools/pkg_version_check/version_check.py Outdated Show resolved Hide resolved
dist/tools/pkg_version_check/version_check.py Outdated Show resolved Hide resolved
dist/tools/pkg_version_check/version_check.py Show resolved Hide resolved
dist/tools/pkg_version_check/version_check.py Outdated Show resolved Hide resolved
@namberino
Copy link
Contributor Author

namberino commented May 24, 2024

Thanks for the suggestions, I've updated the script and the README

@namberino namberino requested a review from mguetschow May 24, 2024 15:14
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 24, 2024
@riot-ci
Copy link

riot-ci commented May 24, 2024

Murdock results

✔️ PASSED

0c49709 dist/tools: Add pkg version check script

Success Failures Total Runtime
1 0 1 01m:12s

Artifacts

@namberino namberino requested a review from mguetschow May 24, 2024 15:39
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

LGTM then! Please squash your commits together into a single one.

@namberino namberino closed this May 24, 2024
@namberino namberino reopened this May 24, 2024
@github-actions github-actions bot added the Area: examples Area: Example Applications label May 24, 2024
@namberino
Copy link
Contributor Author

Sorry for closing the request, I accidentally rebased.

@namberino
Copy link
Contributor Author

Should be good now.

dist/tools/bmp/bmp.py Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the Area: examples Area: Example Applications label May 25, 2024
@maribu maribu enabled auto-merge May 25, 2024 07:01
@maribu maribu added this pull request to the merge queue May 27, 2024
Merged via the queue into RIOT-OS:master with commit bf3392b May 27, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script to check if packages are up to date
4 participants