Open
Conversation
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
popojk
commented
Apr 3, 2026
| } | ||
|
|
||
| var actions []*models.Action | ||
| result := query. | ||
| Order("id ASC"). | ||
| Order("created_at ASC"). |
Contributor
Author
There was a problem hiding this comment.
I change the default sorting field to created_at because trace action use the start time generated in sdk runtime as created_at time and stored in db, and this change makes sure that the ordering is correct.
popojk
commented
Apr 3, 2026
| if token != "" { | ||
| query = query.Where("id > ?", token) | ||
| if t, err := time.Parse(time.RFC3339Nano, token); err == nil { |
Contributor
Author
There was a problem hiding this comment.
Use created_at field to do pagination as it is the default sorting field
popojk
commented
Apr 3, 2026
| info := &workflow.RunInfo{ | ||
| InputsUri: req.GetInputUri(), | ||
| } | ||
|
|
||
| logger.Infof(ctx, "RecordAction: action=%s parent=%s taskId=%v taskSpec=%v", | ||
| actionID.GetName(), req.GetParent(), req.GetTask().GetId(), req.GetTask().GetSpec() != nil) | ||
|
|
||
| switch v := req.GetSpec().(type) { | ||
| case *workflow.RecordActionRequest_Task: |
Contributor
Author
There was a problem hiding this comment.
Refactor this piece of code to handle task action and trace action separately because the required field in db model is defferent
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
pingsutw
reviewed
Apr 3, 2026
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
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.
Tracking issue
n/a
Why are the changes needed?
Make trace action works
What changes were proposed in this pull request?
How was this patch tested?
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
main