Skip to content

sast-shell-check: set ShellCheck jobs based on cgroup v2 CPU limits #2506

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

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

sfowl
Copy link
Contributor

@sfowl sfowl commented Jul 8, 2025

  • PSSECAUT-1196
  • set sast-shell-check default CPU limit to 8
  • set SC_JOBS equal to CPU limit (rounded up) based on cgroups v2 max
  • fix issue with IFS=, affecting word splitting (which impacted read -r quota period < /sys/fs/cgroup/cpu.max)

Marked as draft for now, as it requires an updated version of the quay.io/konflux-ci/konflux-test image with a new epel9 release of csmock-plugins-shellcheck-core with this change.

EDIT: konflux-test image has been updated, ready for merge

@sfowl sfowl requested a review from kdudka July 8, 2025 04:02
@sfowl sfowl force-pushed the shellcheck-jobs-limit branch from 78d9ab7 to 7cb96fc Compare July 8, 2025 04:16
kdudka
kdudka previously approved these changes Jul 8, 2025
Copy link
Contributor

@kdudka kdudka left a comment

Choose a reason for hiding this comment

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

Looks good. The updated csmock packages are now in epel9-testing: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-f4112db701

@sfowl
Copy link
Contributor Author

sfowl commented Jul 14, 2025

Waiting on update to konflux-test image:

konflux-ci/konflux-test#512

side note: it seems that in epel only the latest version of each package is kept, meaning older package versions are removed, which cause builds depending on older versions to fail (e.g. hermetic builds). Example:

https://github.com/konflux-ci/konflux-test/runs/45881914589

sfowl added 2 commits July 16, 2025 10:36
- PSSECAUT-1196
- set sast-shell-check default CPU limit to 8
- set SC_JOBS equal to CPU limit (rounded up) based on cgroups v2 max
- fix issue with IFS=, affecting word splitting (which impacted `read -r
  quota period < /sys/fs/cgroup/cpu.max`)
This version includes an update to csmock-shellcheck-plugin-core
that uses the existing value of SC_JOBS in run-shellcheck.sh
@sfowl sfowl force-pushed the shellcheck-jobs-limit branch from bb808a1 to fb9c928 Compare July 16, 2025 00:36
@sfowl
Copy link
Contributor Author

sfowl commented Jul 16, 2025

/retest

2 similar comments
@sfowl
Copy link
Contributor Author

sfowl commented Jul 16, 2025

/retest

@sfowl
Copy link
Contributor Author

sfowl commented Jul 16, 2025

/retest

@sfowl sfowl marked this pull request as ready for review July 16, 2025 04:31
@sfowl sfowl requested a review from a team as a code owner July 16, 2025 04:31
Copy link
Contributor

@dirgim dirgim left a comment

Choose a reason for hiding this comment

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

LGTM

@sfowl sfowl added this pull request to the merge queue Jul 16, 2025
Merged via the queue into main with commit fe451d5 Jul 16, 2025
18 of 19 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.

3 participants