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 cf task <app> <id> command #3315

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Add cf task <app> <id> command #3315

merged 1 commit into from
Nov 26, 2024

Conversation

Samze
Copy link
Contributor

@Samze Samze commented Nov 22, 2024

Description of the Change

Fixes #3308

Once approved, I will backport to branches v7/v8.

See https://v3-apidocs.cloudfoundry.org/version/3.165.0/index.html#the-task-object for properties.

Help:

/out/cf task --help
NAME:
   task - Display a task of an app

USAGE:
   cf task APP_NAME TASK_ID

SEE ALSO:
   apps, logs, run-task, tasks, terminate-task

For a successful task:

./out/cf task static 1
Getting task 1 for app static in org org-1 / space space-1 as admin...

id:               1
name:             6b100232
state:            SUCCEEDED
start time:       2024-11-22T17:26:23Z
command:          ls
memory in mb:     256
disk in mb:       1024
log rate limit:   -1
failure reason:   

For a task with a failure:

./out/cf task static 4
Getting task 4 for app static in org org-1 / space space-1 as admin...

id:               4
name:             125c884d
state:            FAILED
start time:       2024-11-22T17:41:19Z
command:          foo
memory in mb:     256
disk in mb:       1024
log rate limit:   -1
failure reason:   APP/TASK/125c884d: Exited with status 127

When app does not exist:

./out/cf task staticx 100
App 'staticx' not found.
FAILED

When task does not exist for app:

./out/cf task static 100
Getting task 100 for app static in org org-1 / space space-1 as admin...

Task sequence ID 100 not found.
FAILED

@Samze Samze force-pushed the add_cf_task_command branch 5 times, most recently from d57b277 to 87db63e Compare November 22, 2024 21:10
Copy link
Member

@a-b a-b left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gururajsh gururajsh left a comment

Choose a reason for hiding this comment

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

LGTM

@Samze Samze merged commit 3d28b10 into main Nov 26, 2024
20 checks passed
@Samze Samze deleted the add_cf_task_command branch November 26, 2024 23:05
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.

Add cf task <app> <id> command
3 participants