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

supported numerical comparison in constrains #4729 #4856

Closed
wants to merge 1 commit into from

Conversation

MrJacek
Copy link

@MrJacek MrJacek commented Nov 8, 2018

No description provided.

@dadgar
Copy link
Contributor

dadgar commented Nov 8, 2018

Hey great work! I will actually be closing this out because we have taken a slightly different route to solve this that will be coming in 0.9.0: https://github.com/hashicorp/nomad/blob/master/scheduler/feasible.go#L994
https://github.com/hashicorp/nomad/blob/master/plugins/shared/structs/attribute.go

This will be ported to all attributes (driver and node)

@dadgar dadgar closed this Nov 8, 2018
@MrJacek
Copy link
Author

MrJacek commented Nov 9, 2018

Sure. Pity that I didn’t saw this before start coding. This was my first PR in Nomad and I watch for some easy to understand. I try find something else, may by more complicated ;)

shoenig added a commit that referenced this pull request Sep 27, 2022
This PR changes constraint comparisons to be numeric rather than
lexical if both operands are integers or floats.

Inspiration #4856
Closes #4729
Closes #14719
shoenig added a commit that referenced this pull request Sep 27, 2022
* cleanup: fixup linter warnings in schedular/feasible.go

* core: numeric operands comparisons in constraints

This PR changes constraint comparisons to be numeric rather than
lexical if both operands are integers or floats.

Inspiration #4856
Closes #4729
Closes #14719

* fix: always parse as int64
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants