Repository navigation
Conversation
Signed-off-by: Jeff Spahr <spahrj@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor Report for @jeffspahr
|
There was a problem hiding this comment.
🟡 Changes recommended
Go HTTP task requests serialize unset history, breaking compatibility with servers that do not recognize the new field.
1 open issue
5 files not reviewed
backend/api/v2/go_client/run.pb.go: Generated filebackend/api/v2/go_http_client/run_model/pipeline_task_log_history.go: Generated filebackend/api/v2/go_http_client/run_model/v2_pipeline_task.go: Generated filebackend/api/v2beta1/go_client/aliases.go: Generated filebackend/api/v2beta1/go_http_client/run_model/aliases.go: Generated file
What changed in this PR
Preserves troubleshooting logs across manual run retries for #14981, without treating historical artifacts as current outputs or changing UI behavior.
Changes:
- Adds transactional history snapshots, generation-fenced resets, and bounded table creation.
- Exposes output-only history through task APIs and regenerated clients.
- Gives executor logs pod-specific paths and adds lifecycle, authorization, migration, and retention guidance.
| File | Description |
|---|---|
| sdk/python/kfp/server_api/models/v2_pipeline_task.py | Adds task history property. |
| sdk/python/kfp/server_api/models/pipeline_task_log_history.py | Adds Python history model. |
| sdk/python/kfp/server_api/models/__init__.py | Exports history model. |
| sdk/python/kfp/server_api/__init__.py | Exposes history model publicly. |
| frontend/src/apisv2/run/models/V2PipelineTask.ts | Deserializes read-only history. |
| frontend/src/apisv2/run/models/PipelineTaskLogHistory.ts | Adds TypeScript history model. |
| frontend/src/apisv2/run/models/index.ts | Exports history types. |
| frontend/src/apisv2/run/apis/RunServiceApi.ts | Excludes history from request types. |
| docs/operator-guides/retry-log-history.md | Documents rollout and retention limits. |
| docs/_static/kfp_api_single_file.swagger.json | Publishes updated API schema. |
| backend/src/v2/component/launcher_v2.go | Uses pod-specific log paths. |
| backend/src/v2/component/launcher_v2_test.go | Tests immutable log paths. |
| backend/src/apiserver/storage/task_store.go | Snapshots, hydrates, and deletes history. |
| backend/src/apiserver/storage/task_store_test.go | Tests history lifecycle and atomicity. |
| backend/src/apiserver/storage/native_postgres_integration_test.go | Adapts PostgreSQL retry coverage. |
| backend/src/apiserver/server/run_server_retry_history_test.go | Tests history authorization. |
| backend/src/apiserver/server/api_converter.go | Exposes persisted history. |
| backend/src/apiserver/server/api_converter_test.go | Tests output-only conversion. |
| backend/src/apiserver/resource/resource_manager.go | Delegates atomic retry reset. |
| backend/src/apiserver/model/task.go | Adds transient history field. |
| backend/src/apiserver/model/task_log_history.go | Defines standalone history table. |
| backend/src/apiserver/model/common.go | Registers history model. |
| backend/src/apiserver/client_manager/task_log_history_migration.go | Adds bounded create-only migration. |
| backend/src/apiserver/client_manager/task_log_history_migration_test.go | Tests migration contention and recovery. |
| backend/src/apiserver/client_manager/client_manager.go | Integrates dedicated history migration. |
| backend/api/v2beta1/go_http_client/run_model/aliases.go | Adds HTTP compatibility alias. |
| backend/api/v2beta1/go_client/aliases.go | Adds protobuf compatibility alias. |
| backend/api/v2/swagger/run.swagger.json | Defines history API schema. |
| backend/api/v2/swagger/kfp_api_single_file.swagger.json | Updates combined API schema. |
| backend/api/v2/run.proto | Defines output-only task history. |
| backend/api/v2/python_http_client/README.md | Lists history model documentation. |
| backend/api/v2/python_http_client/docs/V2PipelineTask.md | Documents task history property. |
| backend/api/v2/python_http_client/docs/PipelineTaskLogHistory.md | Documents snapshot fields. |
| backend/api/v2/go_http_client/run_model/v2_pipeline_task.go | Adds Go HTTP history field. |
| backend/api/v2/go_http_client/run_model/pipeline_task_log_history.go | Adds Go HTTP history model. |
| backend/api/v2/go_client/run.pb.go | Regenerates protobuf history bindings. |
Review effort: Balanced
| // Output only. Prior executions archived by manual retries, oldest first. | ||
| // History begins when preservation is enabled; older retries are not backfilled. | ||
| // Read Only: true | ||
| LogHistory []*PipelineTaskLogHistory `json:"log_history"` |

Description of your changes:
Manual Retry run clears task pods, status metadata, and artifact links. That prevents stale outputs from becoming current results, but also loses the references needed to find earlier logs. Reusing an executor output prefix can additionally overwrite the old log object.
This change preserves prior log references before resetting the task and gives executor log objects an invocation-specific path. It is independent of UI modernization #14584 and closes #14981.
task_log_historytable. Snapshot, artifact unlinking, and reset commit atomically under the run's retry-generation fence. Duplicate delivery preserves the original snapshot; successful siblings retain their current results.PipelineTask.log_historythrough existing authorized task/run reads. Historical data never becomes current model/dataset output. Regenerate the API clients; no UI behavior changes.attempts/<pod UID>/executor-logs-N, keeping automatic-attempt naming while preventing manual retries from overwriting earlier objects.Migration and rollout: A create-only, standalone table with no foreign keys or backfill. The new-table operation uses same-connection advisory ownership, a one-second metadata-lock limit, and a ten-second deadline. Failed ownership/DDL aborts startup and is safe to retry. Existing history tables are excluded from broad reconciliation. Roll out the API server and launcher together: older launchers can still overwrite reused log paths. Rollback leaves the additive table intact but stops recording; the operator guide covers orphan metadata cleanup after old-server deletions. Previously deleted/overwritten logs cannot be reconstructed. Namespace export/import does not yet transfer this separate history table. See retry log history guidance.
Validation:
Checklist: