-
Notifications
You must be signed in to change notification settings - Fork 137
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_475: Correct timestamps in get by Id commands for template and workflow #476
Conversation
Codecov Report
@@ Coverage Diff @@
## master #476 +/- ##
==========================================
+ Coverage 32.16% 32.70% +0.54%
==========================================
Files 44 44
Lines 3112 3137 +25
==========================================
+ Hits 1001 1026 +25
Misses 2019 2019
Partials 92 92
Continue to review full report at Codecov.
|
@@ -25,5 +26,5 @@ type DB struct { | |||
InsertIntoWorkflowEventTableFunc func(ctx context.Context, wfEvent *pb.WorkflowActionStatus, time time.Time) error | |||
// template | |||
TemplateDB map[string]interface{} | |||
GetTemplateFunc func(ctx context.Context, fields map[string]string, deleted bool) (string, string, string, error) | |||
GetTemplateFunc func(ctx context.Context, fields map[string]string, deleted bool) (*tb.WorkflowTemplate, error) |
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.
Replacing, set of strings with this struct tb.WorkflowTemplate
is really good.
grpc-server/template_test.go
Outdated
@@ -7,7 +7,7 @@ import ( | |||
|
|||
"github.com/stretchr/testify/assert" | |||
"github.com/tinkerbell/tink/db/mock" | |||
pb "github.com/tinkerbell/tink/protos/template" | |||
tb "github.com/tinkerbell/tink/protos/template" |
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.
If you don't rename the package referer, some changes in the file would go away.
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.
Yeah, I thought that earlier, but since we are using pb
as a package referrer for workflow
and tb
for package referrer for template
at many other places so if I use pb
for template
package referrer it can cause confusions around the code readers.
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.
I have replaced tb
with pb
since there was only template package in that file.
Signed-off-by: parauliya <aman@infracloud.io>
Signed-off-by: parauliya <aman@infracloud.io>
Signed-off-by: parauliya <aman@infracloud.io>
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.
LTGM
Signed-off-by: parauliya aman@infracloud.io
Description
After this change the value of
createdAt
andupdatedAt
will be correct in the output oftink template/workflow get <id>
command.Why is this needed
Fixes: #475
How Has This Been Tested?
This has been tested manually throgh vagrant setup.
How are existing users impacted? What migration steps/scripts do we need?
No Impact
Checklist:
I have: