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

Prefix job workloads with job- #591

Closed
wants to merge 1 commit into from

Conversation

mimowo
Copy link
Contributor

@mimowo mimowo commented Feb 21, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This is a preparatory task for #578. It is needed for avoiding workload name collisions created by different frameworks. The idea is that every framework will use a prefix for the workload name. The prefix for job will be "job-".

Which issue(s) this PR fixes:

Part of #65

Special notes for your reviewer:

The utility function is extracted to a separate package, which is not required for this task. However, it is used in the #578 PR to put it next to the analogous function for MPIJob. This way it is clear what is the list of prefixes in use.

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 21, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@netlify
Copy link

netlify bot commented Feb 21, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit d3fa5e3
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/63f4fa0ffa90cc00080fe3cf

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 21, 2023
@mimowo mimowo force-pushed the prefix-job-workload branch 2 times, most recently from ab179d5 to fdbbced Compare February 21, 2023 16:55
@mimowo
Copy link
Contributor Author

mimowo commented Feb 21, 2023

/assign @alculquicondor

package common

func GetNameForJob(jobName string) string {
return "job-" + jobName
Copy link
Contributor

Choose a reason for hiding this comment

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

This can produce a name that is too long to pass validation. And if we cut the last characters we could have collisions. I would suggest using generateName.

Copy link
Contributor Author

@mimowo mimowo Feb 21, 2023

Choose a reason for hiding this comment

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

I see, makes sense, then probably we can park it for now and only use generateName for other frameworks, at least for now. WDYT?
Meaning we stay with the current workload naming for batch.Job.

Copy link
Contributor

Choose a reason for hiding this comment

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

sg

@mimowo
Copy link
Contributor Author

mimowo commented Feb 21, 2023

/close
As discussed here: #591 (comment)

@k8s-ci-robot
Copy link
Contributor

@mimowo: Closed this PR.

In response to this:

/close
As discussed here: #591 (comment)

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/test-infra repository.

@mimowo mimowo deleted the prefix-job-workload branch March 18, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants