You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if priority <= 0:
raise TypeError(f"priority needs to be > 0, not {priority}")
and
if status.priority and status.priority > 100:
raise ValueError("Status priority cannot be > 100")
These are arbitrary constraints - nothing cares about the value, as long as they're valid floats or ints that can be sorted. Introduces confusion, and potential unexpected crashes:
Instantiating a Status with priority=200 will succeed, but adding to the pool later will raise an error
Instantiating 102+ statuses with auto priority will work, but then adding any new status to the pool will crash
Adding 102+ statuses with manual priorities within these bounds will succeed, but restoring from the charm storage will crash (see Save status priority to charm state #15 )
These may be unlikely, but not impossible.
Remove this validation.
The text was updated successfully, but these errors were encountered:
and
These are arbitrary constraints - nothing cares about the value, as long as they're valid floats or ints that can be sorted. Introduces confusion, and potential unexpected crashes:
These may be unlikely, but not impossible.
Remove this validation.
The text was updated successfully, but these errors were encountered: