[FLINK-32215] Correct date format for startupPosition in documentation#329
Open
leijurv wants to merge 1 commit intoapache:masterfrom
Open
[FLINK-32215] Correct date format for startupPosition in documentation#329leijurv wants to merge 1 commit intoapache:masterfrom
leijurv wants to merge 1 commit intoapache:masterfrom
Conversation
Author
|
Appears to have been added here b3a9ea1#diff-b3a7e4348711a3ca53da07698cb05263b48fed4302002ff7913f9ba51bf6287aR201 |
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.
Reported on JIRA
The example string provided in the documentation does not actually parse. It causes an exception:
Unable to parse date string for startup position: 2020-02-01 04:15:00.00 Z; the date should conform to the pattern yyyy-MM-dd HH:mm:ss.SSS ZThe example string in the documentation should be changed from
2020-02-01 04:15:00.00 Zto2020-02-01 04:15:00.000 +0000I tested this in JShell first, based on the date format defined here.
Checking the date format in JShell
Then to verify I edited
statefun-flink/statefun-flink-io-bundle/src/test/resources/kafka-io-binders/routable-kafka-ingress-v1.yamlto have various values then ranmvn clean installwhile watching whetherRoutableKafkaIngressBinderV1Testpassed or failed.Setting `type` to `date` and `date` to `invaliddateformat` (test does not pass)
Setting `type` to `date` and `date` to the example date given in the documentation `2020-02-01 04:15:00.00 Z` (test does not pass)
Setting `type` to `date` and `date` to the corrected format `2020-02-01 04:15:00.000 -0000` (test passes)
Note that just adding an extra 0 is not sufficient, it causes
Unable to parse date string for startup position: 2020-02-01 04:15:00.000 Z; the date should conform to the pattern yyyy-MM-dd HH:mm:ss.SSS Z. Despite the date format ending inZ, the date must not end inZ, it must end with an actual time zone (such as+0000for UTC / Zulu time instead of theZshorthand).