laserninja commented on code in PR #13468:
URL: https://github.com/apache/gravitino/pull/13468#discussion_r4126557585


##########
core/src/main/java/org/apache/gravitino/job/JobManager.java:
##########
@@ -508,6 +501,10 @@ public JobEntity runJob(String metalake, String 
jobTemplateName, Map<String, Str
     // Check if the job template exists, will throw NoSuchJobTemplateException 
if it does not exist.
     JobTemplateEntity jobTemplateEntity = getJobTemplate(metalake, 
jobTemplateName);
 
+    // Reject a job with missing parameters before creating anything for it.
+    JobTemplateResolver jobTemplateResolver = new 
JobTemplateResolver(jobTemplateEntity);
+    jobTemplateResolver.checkJobConf(jobConf);

Review Comment:
   Could we also migrate `IcebergRemoveOrphanFilesJob` to the new defaults? It 
still uses v1 with bare placeholders for `older_than`, `location`, `dry_run`, 
and `spark_conf`.
   
   With only the required catalog/table settings, the resolver rejects this 
template and reports those four optional parameters as missing. The other five 
built-in templates pass.
   
   Please add empty defaults for `older_than`, `location`, and `spark_conf`, 
use `{{dry_run:-false}}`, and bump the version to v2. A test checking each 
built-in template with only its required parameters would catch this; the 
current validation test only checks placeholder syntax.



-- 
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]

Reply via email to