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

Add JobType in CLI #158

Merged
merged 1 commit into from
May 14, 2019
Merged

Add JobType in CLI #158

merged 1 commit into from
May 14, 2019

Conversation

thandayuthapani
Copy link
Contributor

Display Job Type in job list in CLI command. Label to be added in JobSpec should be of Format

metadata:
  name: test-job
  labels:
    volcano.sh/job-type: Tensorflow

And CLI command output is
Screenshot from 2019-05-13 18-08-16

Fixes #142

@@ -45,6 +45,8 @@ const (
Succeeded string = "Succeeded"
Failed string = "Failed"
RetryCount string = "RetryCount"
JobType string = "JobType"
JobTypeKey string = "volcano.sh/job-type"
Copy link
Member

Choose a reason for hiding this comment

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

move this to api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved

_, err = fmt.Fprintf(writer, fmt.Sprintf("%%-%ds%%-25s%%-12s%%-12d%%-6d%%-10d%%-10d%%-12d%%-10d%%-12d\n", maxNameLen),
job.Name, job.CreationTimestamp.Format("2006-01-02 15:04:05"), job.Status.State.Phase, replicas,
_, err = fmt.Fprintf(writer, fmt.Sprintf("%%-%ds%%-25s%%-12s%%-12s%%-12d%%-6d%%-10d%%-10d%%-12d%%-10d%%-12d\n", maxNameLen),
job.Name, job.CreationTimestamp.Format("2006-01-02 15:04:05"), job.Status.State.Phase, job.ObjectMeta.Labels[JobTypeKey], replicas,
Copy link
Member

@k82cn k82cn May 14, 2019

Choose a reason for hiding this comment

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

if no such label, use Batch or -

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to Batch

@k82cn k82cn merged commit f92becb into volcano-sh:master May 14, 2019
kevin-wangzefeng pushed a commit to kevin-wangzefeng/volcano that referenced this pull request Jun 28, 2019
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.

Added job description/source field
2 participants