Skip to content

Conversation

@nakabonne
Copy link
Member

What this PR does / why we need it:
Depending on the value, the type of value can be a variety of one.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@nghialv
Copy link
Member

nghialv commented Jan 22, 2021

/lgtm

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.33%. This pull request decreases coverage by -0.26%.

File Function Base Head Diff
pkg/app/piped/eventwatcher/eventwatcher.go NewWatcher -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.Run -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.run -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.updateValues -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.modifyFiles -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go convertStr -- 100.00% +100.00%

@pipecd-bot pipecd-bot removed the lgtm label Jan 22, 2021
@nakabonne
Copy link
Member Author

Sorry, just replaced NOTE with TODO.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.33%. This pull request decreases coverage by -0.26%.

File Function Base Head Diff
pkg/app/piped/eventwatcher/eventwatcher.go NewWatcher -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.Run -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.run -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.updateValues -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go watcher.modifyFiles -- 0.00% +0.00%
pkg/app/piped/eventwatcher/eventwatcher.go convertStr -- 100.00% +100.00%

case bool:
out = strconv.FormatBool(v)
default:
return "", fmt.Errorf("%T", v)
Copy link
Member

@khanhtc1202 khanhtc1202 Jan 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits

- return "", fmt.Errorf("%T", v)
+ err = fmt.Errorf("unable to convert: %T", v)

Comment on lines 48 to 59
{
name: "uint64",
value: uint64(1),
want: "1",
wantErr: false,
},
{
name: "uint64",
value: uint64(1),
want: "1",
wantErr: false,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated 🤔

@pipecd-bot
Copy link
Collaborator

TODO

The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use /todo skip command.

Details

1. Validate value in YAML before actual reading

https://github.com/pipe-cd/pipe/blob/2863def509b732fdef81ea5228a88189fb322621/pkg/yamlprocessor/yamlprocessor.go#L52-L55

This was created by todo plugin since "TODO:" was found in 2863def when #1467 was merged. cc: @nakabonne.

@nakabonne
Copy link
Member Author

@khanhtc1202 Thank you! PTAL again!

@khanhtc1202
Copy link
Member

thank you 😊
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by khanhtc1202.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit 06cd2a5 into master Jan 22, 2021
@pipecd-bot pipecd-bot deleted the eventwatcher-types branch January 22, 2021 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants