flyrain commented on code in PR #5098:
URL: https://github.com/apache/polaris/pull/5098#discussion_r3619814698
##########
client/python/apache_polaris/cli/command/setup.py:
##########
@@ -1254,9 +1281,15 @@ 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."
- )
+ if dry_run:
Review Comment:
Worth a one-line comment here on why a policy-lookup failure is counted only
in dry-run. In a real apply you skip the count because the create attempt below
will fail (or succeed) on its own and record its own result, but that reasoning
isn't obvious from the branch alone, and the asymmetry looks like an oversight
at first read. Can you add a short comment noting the create attempt covers the
non-dry-run case?
--
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]