First draft to fix a bug when patching timeline events with extreme timestamp#1285
Open
First draft to fix a bug when patching timeline events with extreme timestamp#1285
Conversation
Contributor
longd3
commented
Oct 27, 2015
- @spencerv discovered https://trello.com/c/GWSHI0ZW/32-provide-better-error-message-to-explain-that-you-can-t-update-the-wake-event-to-before-you-went-to-sleep , cc @jimmymlu
- Bug Summary: In feedback feature, patching a timeline event with extreme timestamps (for example future ts) return bad timeline because of a failure to validate the patch request.
- There are 2 validation processes. A> Feedback validations (to check if the input time make senses and doesn't break events order) and B> Timeline validations (to verify if the patched timeline meet sanity requirements)
- This PR adds another validation to process B to enforce such that the patched timeline have total sleep duration GTE 120 minues (please advise if you think otherwise). But after discussing with @pims, we agree that more rigid checks need to be added to process A
- @benejoseph: would you mind look at process A and advise the least intrusive way to handle that.
Contributor
|
As discussed, this is only "fixing" by throwing an exception and not returning the timeline. |
This file contains hidden or 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
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.