-
Notifications
You must be signed in to change notification settings - Fork 208
Introducing ReportStat service to pipedservice #2181
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
Conversation
pipecd-bot
left a comment
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.
|
Code coverage for golang is
|
pkg/app/api/grpcapi/piped_api.go
Outdated
|
|
||
| // Ping is periodically sent to report its realtime status/stats to control-plane. | ||
| // The received stats will be pushed to the metrics collector. | ||
| // Note: This service is deprecated, use ReportStat instead. |
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.
nit: "This rpc"
| // TODO: Add piped version as label. | ||
| prometheus.WrapRegistererWith( | ||
| prometheus.Labels{"piped": pipedID}, | ||
| r, |
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.
Nice. One thing we have to update is fixing cli to use this wrapped register instead of the default one.
https://github.com/pipe-cd/pipe/blob/master/pkg/cli/cmd.go#L121
But that can be done in another PR.
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.
Nice catch, lets me address another missing in this PR 🙏
ref: 0eb829f
|
Code coverage for golang is
|
| } | ||
|
|
||
| message ReportStatResponse { | ||
| int64 ping_interval = 1; |
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.
nit: report_interval
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.
addressed by 2bb3bcb 🙏
|
Nice. I have just left a nit. |
| } | ||
|
|
||
| message ReportStatRequest { | ||
| bytes piped_stats = 1 [(validate.rules).bytes.min_len = 1]; |
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.
Nice. For those who look at this first will be more likely to wonder why it's represented as a byte sequence. I feel like it should be commented like: "Metrics byte sequence in OpenMetrics format"
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.
👍 Lets me adopt your idea, thx 🙆♂️
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.
addressed by 2bb3bcb 🙏
|
The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use Details1. Add piped version as label.This was created by todo plugin since "TODO:" was found in 2bb3bcb when #2181 was merged. cc: @khanhtc1202. |
|
/approve |
|
Code coverage for golang is
|
**What this PR does / why we need it**: - address #2181 (comment) - fix #2182 - remove unnecessary validation in ReportStatRequest message. We should always allow the report stat to be push to the control-plane, the validation better is handled by control-plane. **Which issue(s) this PR fixes**: Fixes #2182 **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. --> ```release-note NONE ``` This PR was merged by Kapetanios.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: