Skip to content

[fournos_launcher] sanitize the job name before submitting it#66

Merged
kpouget merged 1 commit into
openshift-psap:mainfrom
kpouget:fournos
May 18, 2026
Merged

[fournos_launcher] sanitize the job name before submitting it#66
kpouget merged 1 commit into
openshift-psap:mainfrom
kpouget:fournos

Conversation

@kpouget
Copy link
Copy Markdown
Contributor

@kpouget kpouget commented May 18, 2026

Summary by CodeRabbit

Bug Fixes

  • Fixed job name handling to ensure consistent Kubernetes resource compatibility across all job operations.

Improvements

  • User-provided job names are now validated with clear error messages suggesting compatible formats instead of being silently corrected.

Review Change Stack

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign albertoperdomo2 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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bf04d8db-6788-4b07-b84c-3994ac77a999

📥 Commits

Reviewing files that changed from the base of the PR and between f0b011e and 9ca2e68.

📒 Files selected for processing (2)
  • projects/fournos_launcher/orchestration/submit.py
  • projects/fournos_launcher/toolbox/submit_and_wait/main.py

📝 Walkthrough

Walkthrough

The PR improves Kubernetes name validation and sanitization across two modules. The orchestration layer now consistently sanitizes all computed job names (base parallel-job name, parallel job unique names, and single job names), while the CLI layer validates user-provided names upfront and suggests normalized alternatives when invalid.

Changes

Kubernetes name validation and sanitization

Layer / File(s) Summary
Orchestration job name sanitization
projects/fournos_launcher/orchestration/submit.py
Import sanitize_k8s_name and apply it to the base parallel-job name, each parallel job's unique name, and the single job's name to ensure all generated names are Kubernetes-compatible.
CLI job name validation
projects/fournos_launcher/toolbox/submit_and_wait/main.py
Import is_valid_k8s_name and update generate_job_name to validate user-provided names upfront; if invalid, compute and suggest the normalized version in a ValueError. Auto-generated names continue to be timestamped and sanitized.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Names must dance in K8s style,
Sanitized with careful guile,
User input now gets checked—
No bad names shall be wrecked! ✨

✨ 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.

@kpouget kpouget merged commit cf1db6a into openshift-psap:main May 18, 2026
4 of 5 checks passed
@kpouget kpouget deleted the fournos branch May 18, 2026 12:26
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.

1 participant