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

Export history contained base64 encoded firstDecisionCompletedId #67

Open
vancexu opened this issue Nov 5, 2019 · 0 comments
Open

Export history contained base64 encoded firstDecisionCompletedId #67

vancexu opened this issue Nov 5, 2019 · 0 comments
Labels

Comments

@vancexu
Copy link
Contributor

vancexu commented Nov 5, 2019

History exported from UI has base64 encoded value for firstDecisionCompletedId
for example:

[ 
   { 
      "eventId":1,
      "timestamp":1572983709126469187,
      "eventType":"WorkflowExecutionStarted",
      "version":300,
      "taskId":446074314,
      "workflowExecutionStartedEventAttributes":{ 
         "workflowType":{ 
            "name":"PointTierAggregationWorkflow"
         },
         "taskList":{ 
            "name":"fx-worker-lunacore-0"
         },
         "input":"some dummy context g==",
         "executionStartToCloseTimeoutSeconds":864000,
         "taskStartToCloseTimeoutSeconds":10,
         "continuedExecutionRunId":"3f5a7b60-0e8d-4278-9d28-f5173b18f164",
         "originalExecutionRunId":"0de4c876-6592-4eba-b021-8dd3ec8854b3",
         "identity":"",
         "firstExecutionRunId":"bc0034d5-03c1-492e-b353-4a4a3cc4ae2c",
         "attempt":0,
         "prevAutoResetPoints":{ 
            "points":[ 
               { 
                  "binaryChecksum":"51c5b8b69ddba7aa6f967f6af63cbd6c",
                  "runId":"19343c17-a3c2-4cbe-8a15-5154c7cfe5ed",
                  "firstDecisionCompletedId":"AAAAAAAAAAQ=",
                  "createdTimeNano":1562702097534937255,
                  "expiringTimeNano":1564516497557519770,
                  "resettable":true
               },
               { 
                  "binaryChecksum":"277938d0d643a212cb7a152954abc8f3",
                  "runId":"19343c17-a3c2-4cbe-8a15-5154c7cfe5ed",
                  "firstDecisionCompletedId":"AAAAAAAAAAw=",
                  "createdTimeNano":1563306897557479300,
                  "expiringTimeNano":1564516497557519770,
                  "resettable":true
               },
               ......
            ]
         },
         "header":{ 
            "fields":{ 

            }
         }
      }
   },
   { 
      "eventId":2,
      "timestamp":1572983709126505634,
      "eventType":"DecisionTaskScheduled",
      "version":300,
      "taskId":446074315,
      "decisionTaskScheduledEventAttributes":{ 
         "taskList":{ 
            "name":"fx-worker-lunacore-0"
         },
         "startToCloseTimeoutSeconds":10,
         "attempt":0
      }
   },
   ...
]

Using such file directly in reply test will caused error:
cannot unmarshal string into Go struct field ResetPointInfo.firstDecisionCompletedId of type int64

UI exported history should be same as CLI output:
cadence --do domain wf show -w <wid> -r <rid> --output_filename history.json

@vancexu vancexu changed the title Export history is wrong Export history contained base64 encoded firstDecisionCompletedId Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants