mattfaltyn commented on code in PR #5098:
URL: https://github.com/apache/polaris/pull/5098#discussion_r3612783908


##########
client/python/apache_polaris/cli/command/setup.py:
##########
@@ -1254,8 +1282,8 @@ def _create_policies_and_attachments(
             except NotFoundException:
                 policy_exists = False
             except Exception:
-                logger.warning(
-                    f"Could not verify existence of policy '{policy_name}', 
attempting creation."
+                self._record_failure(

Review Comment:
   Good catch. In ae652a897, a real apply now logs the lookup failure as a 
warning and lets the follow-up create determine the result. A successful create 
no longer increments the failure count, while dry-run still records the lookup 
failure because no create occurs. I also added a regression test for the 
recovered path.



##########
client/python/apache_polaris/cli/command/setup.py:
##########
@@ -524,6 +525,7 @@ def validate(self) -> None:
     def execute(self, api: PolarisDefaultApi) -> None:
         """Execute the setup command based on the subcommand (apply or 
export)."""
         if self.setup_subcommand == Subcommands.APPLY:
+            self._failure_count = 0

Review Comment:
   Good point. Each CLI and REPL invocation creates a new SetupCommand, so the 
field default is sufficient. Removed the redundant reset in ae652a897.



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