jbonofre commented on code in PR #5098:
URL: https://github.com/apache/polaris/pull/5098#discussion_r3612224688
##########
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:
I think we could have a false failure when a policy existence check fails
but creation then succeeds.
The generic exception branch of the `load_policy` check now calls
`_record_failure()` while still setting `policy_exits = false` and proceeding
to create the policy. If that `load_policy` error was transient and the
subsequent `create_policy` succeeds, the resource was provisioned correctly yet
the whole command still exits non-zero. Every other `_record_failure()` marks
an operation that actually failed, but this one marks the operation that may
well have succeeded.
I suggest to consider only recording the failure if the follow-up create
also fails (or back to a warning).
--
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]