jerryshao commented on code in PR #7531:
URL: https://github.com/apache/gravitino/pull/7531#discussion_r2192049981


##########
api/src/main/java/org/apache/gravitino/policy/PolicyOperations.java:
##########
@@ -67,11 +69,18 @@ public interface PolicyOperations {
    * @param comment The comment of the policy.
    * @param enabled Whether the policy is enabled or not.
    * @param content The content of the policy.
+   * @param jobTemplatesToAssociate The list of job templates to associate 
with the policy, can be
+   *     empty or null if no job templates associated.
    * @return The created policy.
    * @throws PolicyAlreadyExistsException If the policy already exists.
    */
   Policy createPolicy(
-      String name, String type, String comment, boolean enabled, 
Policy.Content content)
+      String name,
+      String type,
+      String comment,
+      boolean enabled,
+      Policy.Content content,
+      List<JobTemplate> jobTemplatesToAssociate)

Review Comment:
   The question is that when creating the policy, if the job template doesn't 
exist,
   
   1. Shall we fail the policy creation, or can we still create a policy by 
filtering out an inexistent job template?
   2. If some job templates do exist, whereas others don't, when we create a 
policy, shall we filter out inexistent job templates and continue the logic, or 
we fail the creation?
   
   WDYT?
   
   My point is to make the policy creation success, like what we do for tag 
association.



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to