-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(query): handle bad timezone correctly #8657
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
mangalaman93
requested review from
akon-dey,
skrdgraph,
darkn3rd,
meghalims,
matthewmcneely and
billprovince
as code owners
February 8, 2023 17:16
harshil-goel
previously approved these changes
Feb 8, 2023
mangalaman93
commented
Feb 8, 2023
mangalaman93
force-pushed
the
aman/go120
branch
2 times, most recently
from
February 8, 2023 21:27
ea01b22
to
3de9c6d
Compare
matthewmcneely
previously approved these changes
Feb 8, 2023
mangalaman93
force-pushed
the
aman/go120
branch
2 times, most recently
from
February 9, 2023 04:31
7e783c4
to
1a4ffe0
Compare
all-seeing-code
previously approved these changes
Feb 9, 2023
harshil-goel
previously approved these changes
Feb 9, 2023
In Go 1.20, time.MarshalJSON function checks for time zone strictly wrt RFC 3339 i.e. zone ∈ [0, 23]. In Dgraph, we have been simply following what time package has been doing and we need to handle the bad time zones gracefully now. The way we handle it is that, we do not allow ingesting bad time zones going forward. Such a mutation will return an error. On the other hand, if data is already ingested, we return the result as is and ensure that such a query does not fail.
mangalaman93
dismissed stale reviews from harshil-goel and all-seeing-code
via
February 9, 2023 14:03
6c5c295
mangalaman93
force-pushed
the
aman/go120
branch
from
February 9, 2023 14:03
1a4ffe0
to
6c5c295
Compare
all-seeing-code
approved these changes
Feb 9, 2023
harshil-goel
approved these changes
Feb 9, 2023
skrdgraph
approved these changes
Feb 9, 2023
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.
cc: @rarvikar
This looks okay.
The plan is as follows:
- merge this
- this PR will not break reads
- this PR will need a communication in the next release, indicating writes would error out
If customers need a fix for the write
, we will make a patch release (as this is an anti-pattern for go-standards).
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.
in Go 1.20, time.MarshalJSON function checks for time zone strictly wrt RFC 3339 i.e. zone ∈ [0, 23]. In Dgraph, we have been simply following what time package has been doing and we need to handle the bad time zones gracefully now.
The way we handle it is that, we do not allow ingesting bad time zones going forward. Such a mutation will return an error. On the other hand, if data is already ingested, we return the result as is and ensure that such a query does not fail.