jerryshao opened a new pull request, #12715: URL: https://github.com/apache/gravitino/pull/12715
### What changes were proposed in this pull request? When a job is run, the job template's placeholders are resolved and any referenced files are downloaded before submission to the job executor. This PR captures that *resolved* template (not just the original one) and persists it alongside the job entity as a new `runtimeJobTemplate` field, exposed end-to-end: - Storage: schema migration + `JobPO` column + MySQL/PostgreSQL/H2 mapper providers - Core: `JobManager` serializes the resolved template before submission (so a serialization failure never leaves an orphaned job running on the executor without a tracked entity) and `JobInfo` deserializes it for listener events - REST API: new `runtimeJobTemplate` field on the job response (`docs/open-api/jobs.yaml`) - Common: `JobDTO`/`DTOConverters` gain a shared `fromRuntimeJobTemplateJson` helper used by both core and server - Clients: `JobHandle.runtimeJobTemplate()` on Java and Python clients Also folds in an unrelated black-formatting fix for 3 Python files (`fileset_change.py`, `test_model_catalog.py`, `test_relational_catalog.py`) as a drive-by style fix. ### Why are the changes needed? Job templates can contain placeholders and template files that get resolved/downloaded at run time. Without this change, callers can only see the original template definition, not what was actually submitted for execution — making it hard to debug or audit a specific job run after the fact. Fix: #12676 ### Does this PR introduce _any_ user-facing change? Yes: - New `runtimeJobTemplate` field in the Job REST API response (nullable; omitted for jobs run before this field existed) - New `JobHandle.runtimeJobTemplate()` accessor on the Java and Python clients ### How was this patch tested? Added/updated unit tests across storage (PO/mapper/service), core (`JobManager`, `JobInfo`), common (`JobDTO`, `DTOConverters`), server (`JobOperations`), and both Java and Python clients, including full serialization round-trips. Also validated `docs/open-api/jobs.yaml` via `./gradlew :docs:build`. https://claude.ai/code/session_01NLuzEFs3CmzP5duYonCUue -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
