-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix constraint violations display #1084
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 04:40 — with
GitHub Actions
Inactive
mattdailis
force-pushed
the
fix/constraints-violations-not-showing
branch
from
January 11, 2024 22:27
7681afe
to
bcd265f
Compare
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 22:27 — with
GitHub Actions
Inactive
mattdailis
force-pushed
the
fix/constraints-violations-not-showing
branch
from
January 11, 2024 22:47
bcd265f
to
dbc714c
Compare
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 22:47 — with
GitHub Actions
Inactive
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 23:12 — with
GitHub Actions
Inactive
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 23:16 — with
GitHub Actions
Inactive
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 23:17 — with
GitHub Actions
Inactive
mattdailis
temporarily deployed
to
test-workflow
January 11, 2024 23:30 — with
GitHub Actions
Inactive
duranb
approved these changes
Jan 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works great! thanks a bunch!
JosephVolosin
pushed a commit
that referenced
this pull request
Aug 20, 2024
* Remove needless mutation * Attempt to simplify constraints reactive variables * Use the word `violations` consistently * Be robust to nullish violations * Another nullish violations * Add | null * Propagate | null type
JosephVolosin
pushed a commit
that referenced
this pull request
Oct 21, 2024
* Remove needless mutation * Attempt to simplify constraints reactive variables * Use the word `violations` consistently * Be robust to nullish violations * Another nullish violations * Add | null * Propagate | null type
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug Description
growingDuration
to3d
and itsquantity
to1000
Recommended fix
A detailed reading of #1022 shows that some of the reactive variables related to constraints were rerouted, leading to some transformations to be left out of the pipeline. Concretely, the
$constraintResult
variable was previously responsible for translating constraint violations windows from "offset from plan start in microseconds" to "milliseconds since the unix epoch". After the above PR, this translation was no longer occurring, leading to downstream confusion.This PR removes the
$constraintResult
variable entirely, moving that transformation into the$constraintResponseMap
reactive variable. Any constraint code must be derived from$constraintResponseMap
, without reaching around it to use the un-processed constraintResponses. To this end, this PR renamesconstraintResponse
torawConstraintResponses
(pluralized to reflect plural usage elsewhere in the code), to hopefully make it harder to make that mistake.textForConstraintViolation
was using a brittle approach to try to find the constraint response corresponding to the given violation. This PR instead threads theconstraintName
through to the usage of this function, so that it can do its job without relying on global variables. This is why a number of uses ofConstraintResult
were updated toConstraintResultWithName
.Lastly, this PR changes the label in the constraints nav bar. According to the Constraints panel, a single constraint can contain many violations. The nav bar, however, only counts the number of constraints violated, and does not sum up the total number of violations. To this end, this PR rewords "Constraint violations: 5" to instead read "Constraints violated: 5"