middleware
middleware copied to clipboard
NAS-128590 / 24.10 / Fix Range validator args
This commit fixes an issue where when we change max to max_ in middleware api for validators, this change was not addressed.
Jira URL: https://ixsystems.atlassian.net/browse/NAS-128590
@sonicaj why is this a draft?
@yocalebo that is the max/min
app devs specify in questions.yaml
- we internally changed our API to use max_
instead. So it seems very weird to use max_
in yaml file to outline maximum length, we internally changed it because it collided with python builtins. Also it would be very messy to have app devs switch to max_
if we wanted to (i don't think we should), as older apps which app devs have not updated will no longer work and would be a decent change depending on the size of catalog.
I think we should have tests in place to catch this sooner, i'll write some and push them if that sounds good ?
backport to 24.04.1 as well please
@yocalebo that is the
max/min
app devs specify inquestions.yaml
- we internally changed our API to usemax_
instead. So it seems very weird to usemax_
in yaml file to outline maximum length, we internally changed it because it collided with python builtins. Also it would be very messy to have app devs switch tomax_
if we wanted to (i don't think we should), as older apps which app devs have not updated will no longer work and would be a decent change depending on the size of catalog. I think we should have tests in place to catch this sooner, i'll write some and push them if that sounds good ?
Yep agree, tests would be a good start!
Are you sure this fixes all the failures? On lines 108, 109 I still see references to min
and max
Are you sure this fixes all the failures? On lines 108, 109 I still see references to
min
andmax
@yocalebo yes I am and i have added a unit test as well to outline that. Those min/max
references are to the values in questions.yaml
and not our schema so we are safe on that end
This PR has been merged and conversations have been locked. If you would like to discuss more about this issue please use our forums or raise a Jira ticket.