Skip to content

[Feat] [history server] Support endpoint /v0/tasks/summarize with lineage #4469

Draft
win5923 wants to merge 3 commits intoray-project:masterfrom
win5923:historyserver-summarize-lineage
Draft

[Feat] [history server] Support endpoint /v0/tasks/summarize with lineage #4469
win5923 wants to merge 3 commits intoray-project:masterfrom
win5923:historyserver-summarize-lineage

Conversation

@win5923
Copy link
Member

@win5923 win5923 commented Jan 31, 2026

Why are these changes needed?

Need to wait until ACTOR_TASK_DEFINITION_EVENT is implemented to do actor group.

Live:

{
	"result": true,
	"msg": "",
	"data": {
		"result": {
			"total": 4,
			"num_after_truncation": 4,
			"num_filtered": 4,
			"result": {
				"node_id_to_summary": {
					"cluster": {
						"summary": [
							{
								"name": "my_task",
								"key": "67a2e8cfa5a06db3ffffffffffffffffffffffff02000000",
								"type": "NORMAL_TASK",
								"timestamp": 1769794112970,
								"state_counts": {
									"FINISHED": 1
								},
								"children": [],
								"link": {
									"type": "task",
									"id": "67a2e8cfa5a06db3ffffffffffffffffffffffff02000000"
								}
							},
							{
								"name": "Counter",
								"key": "actor:1cf7519bef02176d24ef2f9d02000000",
								"type": "ACTOR",
								"timestamp": 1769794113532,
								"state_counts": {
									"FINISHED": 3
								},
								"children": [
									{
										"name": "Counter.__init__",
										"key": "ffffffffffffffff1cf7519bef02176d24ef2f9d02000000",
										"type": "ACTOR_CREATION_TASK",
										"timestamp": 1769794113532,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "ffffffffffffffff1cf7519bef02176d24ef2f9d02000000"
										}
									},
									{
										"name": "Counter.increment",
										"key": "e5cbd90b7f1fb7761cf7519bef02176d24ef2f9d02000000",
										"type": "ACTOR_TASK",
										"timestamp": 1769794113533,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "e5cbd90b7f1fb7761cf7519bef02176d24ef2f9d02000000"
										}
									},
									{
										"name": "Counter.get_count",
										"key": "39088be3736e590a1cf7519bef02176d24ef2f9d02000000",
										"type": "ACTOR_TASK",
										"timestamp": 1769794113699,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "39088be3736e590a1cf7519bef02176d24ef2f9d02000000"
										}
									}
								],
								"link": {
									"type": "actor",
									"id": "1cf7519bef02176d24ef2f9d02000000"
								}
							}
						],
						"total_tasks": 1,
						"total_actor_tasks": 2,
						"total_actor_scheduled": 1,
						"summary_by": "lineage"
					}
				}
			},
			"partial_failure_warning": "",
			"warnings": null
		}
	}
}

Dead:

{
	"result": true,
	"msg": "Tasks summarized.",
	"data": {
		"result": {
			"total": 6,
			"num_after_truncation": 6,
			"num_filtered": 6,
			"result": {
				"node_id_to_summary": {
					"cluster": {
						"summary": [
							{
								"name": "my_task",
								"key": "Z6Loz6WgbbP///////////////8CAAAA",
								"type": "NORMAL_TASK",
								"timestamp": 1769848381065,
								"state_counts": {
									"FINISHED": 1
								},
								"children": [],
								"link": {
									"type": "task",
									"id": "Z6Loz6WgbbP///////////////8CAAAA"
								}
							},
							{
								"name": "UnknownActor",
								"key": "actor:",
								"type": "ACTOR",
								"timestamp": 1769848381253,
								"state_counts": {
									"FINISHED": 1
								},
								"children": [
									{
										"name": "Counter.__init__",
										"key": "///////////q3WgGTHOUvSQHsFcCAAAA",
										"type": "ACTOR_CREATION_TASK",
										"timestamp": 1769848381253,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "///////////q3WgGTHOUvSQHsFcCAAAA"
										}
									}
								],
								"link": {
									"type": "actor",
									"id": ""
								}
							},
							{
								"name": "",
								"key": "",
								"type": "GROUP",
								"timestamp": 1769848381264,
								"state_counts": {
									"FINISHED": 2
								},
								"children": [
									{
										"name": "",
										"key": "5cvZC38ft3bq3WgGTHOUvSQHsFcCAAAA",
										"type": "",
										"timestamp": 1769848381264,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "5cvZC38ft3bq3WgGTHOUvSQHsFcCAAAA"
										}
									},
									{
										"name": "",
										"key": "OQiL43NuWQrq3WgGTHOUvSQHsFcCAAAA",
										"type": "",
										"timestamp": 1769848381428,
										"state_counts": {
											"FINISHED": 1
										},
										"children": [],
										"link": {
											"type": "task",
											"id": "OQiL43NuWQrq3WgGTHOUvSQHsFcCAAAA"
										}
									}
								]
							}
						],
						"total_tasks": 1,
						"total_actor_tasks": 0,
						"total_actor_scheduled": 1,
						"summary_by": "lineage"
					}
				}
			},
			"partial_failure_warning": "",
			"warnings": null
		}
	}
}

Related issue number

Closes #4389

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@win5923 win5923 changed the title Historyserver summarize lineage [Feat] [history server] Support endpoint /v0/tasks/summarize with lineage Jan 31, 2026
Copilot AI mentioned this pull request Feb 5, 2026
4 tasks
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.

[Feature][history server] support endpoint /v0/tasks/summarize with lineage

2 participants