Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def should_update_trigger_configurations(self):
or self.get_argument_scale_rule_type() \
or self.get_argument_scale_rule_auth() \
or self.get_argument_polling_interval() \
or self.get_argument_min_executions() \
or self.get_argument_max_executions()
or self.get_argument_min_executions() is not None \
or self.get_argument_max_executions() is not None

def set_up_trigger_configurations(self):
Comment on lines +311 to 314
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix correctly addresses the boolean evaluation issue, but consider whether negative values should also be handled. If min_executions can only be non-negative, add validation to prevent invalid values.

Suggested change
or self.get_argument_min_executions() is not None \
or self.get_argument_max_executions() is not None
def set_up_trigger_configurations(self):
or (self.get_argument_min_executions() is not None and self.get_argument_min_executions() >= 0) \
or self.get_argument_max_executions() is not None
def set_up_trigger_configurations(self):
if self.get_argument_min_executions() is not None and self.get_argument_min_executions() < 0:
raise InvalidArgumentValueError("min_executions must be a non-negative integer.")

Copilot uses AI. Check for mistakes.
if self.should_update_trigger_configurations(): # pylint: disable=too-many-nested-blocks
Expand Down
Loading
Loading