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

After cancel / error in job: tasks still report status "waiting" #31

Open
hlubek opened this issue Oct 14, 2021 · 4 comments
Open

After cancel / error in job: tasks still report status "waiting" #31

hlubek opened this issue Oct 14, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@hlubek
Copy link
Member

hlubek commented Oct 14, 2021

No description provided.

@hlubek hlubek added the bug Something isn't working label Apr 7, 2022
@hlubek hlubek changed the title Bug: After cancel / error in job: tasks still report status "waiting" After cancel / error in job: tasks still report status "waiting" Apr 7, 2022
@Sebobo
Copy link
Member

Sebobo commented Dec 12, 2022

And if it was running, it is still marked as running and also canceled which just confused me a bit.

@hlubek
Copy link
Member Author

hlubek commented Dec 12, 2022

I can only reproduce that the job is shown with a green border in the Prunner UI. Where did you find running?

With the current main branch version I get the following response from the /jobs API.

  1. When canceling a running job:
{
	"0": {
		"id": "a642d9a7-78d6-4eac-a3b2-195d270aa2e6",
		"pipeline": "queue_it",
		"tasks": [
			{
				"name": "lint",
				"status": "canceled",
				"start": "2022-12-12T13:55:58Z",
				"end": null,
				"skipped": false,
				"exitCode": -1,
				"errored": false
			}
		],
		"completed": true,
		"canceled": true,
		"errored": false,
		"created": "2022-12-12T13:55:58Z",
		"start": "2022-12-12T13:55:58Z",
		"end": "2022-12-12T13:56:07Z",
		"user": ""
	}
}
  1. When a job fails due to an error:
{
	"0": {
		"id": "1b475a0a-6523-4566-9d64-ad4fff3fa8c4",
		"pipeline": "create_release",
		"tasks": [
			{
				"name": "do_something_long",
				"status": "canceled",
				"start": "2022-12-12T14:11:29Z",
				"end": null,
				"skipped": false,
				"exitCode": -1,
				"errored": false
			},
			{
				"name": "lint",
				"status": "done",
				"start": "2022-12-12T14:11:29Z",
				"end": "2022-12-12T14:11:30Z",
				"skipped": false,
				"exitCode": -1,
				"errored": false
			},
			{
				"name": "test",
				"status": "error",
				"start": "2022-12-12T14:11:29Z",
				"end": null,
				"skipped": false,
				"exitCode": 1,
				"errored": true,
				"error": "exit status 1"
			},
			{
				"name": "build",
				"dependsOn": [
					"lint",
					"test",
					"do_something_long"
				],
				"status": "waiting",
				"start": null,
				"end": null,
				"skipped": false,
				"exitCode": 0,
				"errored": false
			}
		],
		"completed": true,
		"canceled": false,
		"errored": true,
		"created": "2022-12-12T14:11:29Z",
		"start": "2022-12-12T14:11:29Z",
		"end": "2022-12-12T14:11:32Z",
		"lastError": "exit status 1",
		"user": ""
	}
}

Which all looks like expected.

@Sebobo
Copy link
Member

Sebobo commented Dec 13, 2022

Sorry for the confusion, I had mapped running to !completed for my use case. So having completed and canceled true at the same time is confusing for me. Same for errored and completed.
So completed just means the job is not doing anything anymore?

@hlubek
Copy link
Member Author

hlubek commented Dec 13, 2022

Yes ;) That is indeed confusing. But completed means that it was processed / is not pending - even though it might have had an error or it was canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants