Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

units.parse_bytes does not support P, and E (and corresponding binary) suffixes #2911

Closed
tsandall opened this issue Nov 16, 2020 · 0 comments · Fixed by #3692
Closed

units.parse_bytes does not support P, and E (and corresponding binary) suffixes #2911

tsandall opened this issue Nov 16, 2020 · 0 comments · Fixed by #3692

Comments

@tsandall
Copy link
Member

The Kubernetes resource requirements can specify petabyte and exabyte (and similar binary) unit suffixes. Currently units.parse_bytes only goes up to T/Ti. We should extend units.parse_bytes to support larger units. The implementation should also be modified to avoid use of strconv.ParseInt which is limited to 64-bit integers. Use the big/int package instead.

srenatus added a commit to srenatus/opa that referenced this issue Jul 30, 2021
Previous changes to the built-in function to use big.Int et al. had
been made without knowledge of these missing units. So, here they are.

Fixes open-policy-agent#2911.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
srenatus added a commit that referenced this issue Jul 31, 2021
Previous changes to the built-in function to use big.Int et al. had
been made without knowledge of these missing units. So, here they are.

Fixes #2911.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dolevf pushed a commit to dolevf/opa that referenced this issue Nov 4, 2021
Previous changes to the built-in function to use big.Int et al. had
been made without knowledge of these missing units. So, here they are.

Fixes open-policy-agent#2911.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant