-
Notifications
You must be signed in to change notification settings - Fork 204
Implement live state reporter for Cloud Run #3284
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
|
The following files are not gofmt-ed. By commenting pkg/app/piped/livestatereporter/cloudrun/report.go--- pkg/app/piped/livestatereporter/cloudrun/report.go.orig
+++ pkg/app/piped/livestatereporter/cloudrun/report.go
@@ -19,12 +19,13 @@
"fmt"
"time"
+ "go.uber.org/zap"
+ "google.golang.org/grpc"
+
"github.com/pipe-cd/pipecd/pkg/app/piped/livestatestore/cloudrun"
"github.com/pipe-cd/pipecd/pkg/app/server/service/pipedservice"
"github.com/pipe-cd/pipecd/pkg/config"
"github.com/pipe-cd/pipecd/pkg/model"
- "go.uber.org/zap"
- "google.golang.org/grpc"
)
type applicationLister interface {
|
|
/golinter fmt |
75af0c5 to
c0446e1
Compare
|
Code coverage for golang is
|
|
Code coverage for golang is
|
|
hold this PR until v0.26.0 released |
|
/hold cancel |
|
|
||
| for { | ||
| select { | ||
| case <-snapshotTicker.C: |
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.
This means that the state will be updated every 10 minutes, right?
Do we have any way to make it refresh faster on UI?
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.
This means that the state will be updated every 10 minutes, right?
Exactly.
Do we have any way to make it refresh faster on UI?
Currently, No we don't. Since livestatestore fetch the live state at 15s intervals and driftdetection and livestatereporter refer to it. But as one idea, it may be better that adding forceRefresh flag into GetApplicationLiveStateRequest in order to get latest live state synchronously.
BTW, It might be a good idea to make this interval one minute like as driftdetection.
|
Code coverage for golang is
|
|
Nice. |
| Snapshot: snapshot, | ||
| } | ||
|
|
||
| if _, err := r.apiClient.ReportApplicationLiveState(ctx, req); err != nil { |
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: We may need a new RPC to send a bunch of applications.
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.
Yep, I think it's good to add new RPC to improve performance in the future.
|
Here you go 🙌 |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: