Skip to content

Modify cron generator script for metal#80527

Open
sgoveas wants to merge 1 commit into
openshift:mainfrom
sgoveas:modify_cron_script
Open

Modify cron generator script for metal#80527
sgoveas wants to merge 1 commit into
openshift:mainfrom
sgoveas:modify_cron_script

Conversation

@sgoveas

@sgoveas sgoveas commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Crons were restricted to UTC 13 - 22. With this change the cron with be more spreadout reducing hitting resource limits

Summary by CodeRabbit

This pull request modifies the cron generator script used by the OpenShift CI infrastructure to adjust the scheduling window for metal environment tests.

What Changed

The script that generates periodic cron jobs for openshift-tests-private has been updated to handle test names starting with metal- differently:

Previous behavior (for baremetal- tests):

  • Restricted cron scheduling to a 9-hour UTC working hours window (13:00-22:00 UTC)
  • Any job scheduled outside this window would be remapped into it

New behavior (for metal- tests):

  • Expands the scheduling window to 15 hours: 15:00-23:00 UTC plus 00:00-06:00 UTC (overnight window)
  • Jobs scheduled during the daytime hours (07:00-14:00 UTC) are remapped to the overnight window
  • Tests are now identified by the ^metal- prefix (start with "metal-") rather than containing "baremetal-"

Impact

This change increases the time window for job scheduling from 9 hours to 15 hours, which spreads metal environment test jobs more evenly across the day. This helps reduce resource contention on the CI infrastructure by preventing job clustering during peak hours, addressing resource constraint issues previously encountered.

The modification affects CI job scheduling for the openshift-tests-private repository's metal environment tests on the release cluster.

Crons were restricted to UTC 13 - 22. With this change the cron with be
more spreadout reducing hitting resource limits
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a5b35622-d67a-4050-a04e-48e163a36b72

📥 Commits

Reviewing files that changed from the base of the PR and between b3e0d71 and fc0eafe.

📒 Files selected for processing (1)
  • ci-operator/config/openshift/openshift-tests-private/tools/generate-cron-entry.sh

Walkthrough

In generate-cron-entry.sh, the special-case test-name pattern for hour remapping changes from baremetal- to metal-. The remapping logic now enforces an overnight UTC window (15:00–06:00) by shifting disallowed daytime hours, replacing the previous fixed working-hours range used for baremetal-.

Changes

Cron Hour Remapping for metal- Tests

Layer / File(s) Summary
metal- hour remapping conditional
ci-operator/config/openshift/openshift-tests-private/tools/generate-cron-entry.sh
Replaces the baremetal- pattern and its daytime remap logic with a metal- prefix match that shifts computed hours into the overnight UTC window (15–23 or 0–6).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Weak-Crypto ❌ Error The modified file contains MD5 usage on line 42 for deterministic cron scheduling, flagged by the weak-crypto check per instructions to flag MD5 usage. The MD5 usage is pre-existing and used for non-security purposes (deterministic scheduling). Consider using SHA256 or removing if schedule randomization is unnecessary.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Modify cron generator script for metal' is partially related to the changeset. It correctly identifies that the script is being modified for 'metal' environments, but lacks specificity about the key change: expanding the cron scheduling time window to address resource constraints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR modifies a shell script that generates cron schedules for tests, not Ginkgo test files. The custom check for stable Ginkgo test names is not applicable to this PR since no Ginkgo tests are m...
Test Structure And Quality ✅ Passed This PR modifies a bash cron generator script, not Ginkgo test code. The custom check is designed to review Ginkgo test quality, which is not applicable here.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests added in this PR. The PR only modifies shell cron scheduling scripts, making the MicroShift compatibility check inapplicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies only a cron scheduling shell script (generate-cron-entry.sh), not any Ginkgo e2e test files. The SNO compatibility check only applies when new Go test functions are added.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies a CI utility script that generates cron schedules for test jobs. It is not a deployment manifest, operator code, or controller, so the topology-aware scheduling check does not apply.
Ote Binary Stdout Contract ✅ Passed The PR modifies a shell script utility (generate-cron-entry.sh) that generates cron entries, not an OTE binary. The OTE Binary Stdout Contract applies only to Go binaries that communicate with open...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR modifies a bash shell script (generate-cron-entry.sh) that generates cron scheduling entries for tests, not a Ginkgo e2e test file. No new Go tests (It(), Describe(), Context(), etc.) were a...
Container-Privileges ✅ Passed Pull request modifies a shell script (generate-cron-entry.sh) for cron scheduling logic, not container/K8s manifests. No privileged container configurations present.
No-Sensitive-Data-In-Logs ✅ Passed The script outputs only test configuration names, filenames, hashes, and numeric cron values. No passwords, tokens, API keys, PII, session IDs, internal hostnames, or customer data are logged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sgoveas
Once this PR has been reviewed and has the lgtm label, please assign tomasdavidorg for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 15, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@sgoveas: no rehearsable tests are affected by this change

Note: If this PR includes changes to step registry files (ci-operator/step-registry/) and you expected jobs to be found, try rebasing your PR onto the base branch. This helps pj-rehearse accurately detect changes when the base branch has moved forward.

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@sgoveas: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant