Skip to content
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

Refactor and redesign insight collector #1980

Merged
merged 1 commit into from May 20, 2021
Merged

Refactor and redesign insight collector #1980

merged 1 commit into from May 20, 2021

Conversation

nghialv
Copy link
Member

@nghialv nghialv commented May 20, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@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. Enable collecting insight by default once this feature reached Beta.

https://github.com/pipe-cd/pipe/blob/d6db24c0fd835f91b286ca3847158422dab16b29/pkg/config/control_plane.go#L41-L44

This was created by todo plugin since "TODO:" was found in d6db24c when #1980 was merged. cc: @nghialv.

Copy link
Collaborator

@pipecd-bot pipecd-bot left a comment

Choose a reason for hiding this comment

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

GO_LINTER

Some issues were detected while linting go source files in your changes.

pkg/app/ops/insightcollector/applications.go Show resolved Hide resolved
pkg/insight/applicationcount.go Show resolved Hide resolved
pkg/insight/applicationcount.go Show resolved Hide resolved
pkg/insight/applicationcount_test.go Show resolved Hide resolved
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.88%. This pull request decreases coverage by -0.62%.

File Function Base Head Diff
pkg/app/ops/insightcollector/applications.go Collector.collectApplicationCount -- 0.00% +0.00%
pkg/app/ops/insightcollector/applications.go Collector.updateApplicationCounts -- 0.00% +0.00%
pkg/app/ops/insightcollector/applications.go Collector.listApplications -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go NewCollector -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go Collector.Run -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go Collector.collectApplicationMetrics -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go Collector.collectDeploymentMetrics -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go Collector.processNewlyCreatedDeployments -- 0.00% +0.00%
pkg/app/ops/insightcollector/collector.go Collector.processNewlyCompletedDeployments -- 0.00% +0.00%
pkg/app/ops/insightcollector/deployments.go Collector.collectDeploymentChangeFailureRate -- 0.00% +0.00%
pkg/app/ops/insightcollector/deployments.go Collector.collectDevelopmentFrequency -- 0.00% +0.00%
pkg/app/ops/insightcollector/deployments.go Collector.findDeploymentsCreatedInRange -- 100.00% +100.00%
pkg/app/ops/insightcollector/deployments.go Collector.findDeploymentsCompletedInRange -- 100.00% +100.00%
pkg/app/ops/insightcollector/deployments.go Collector.updateApplicationChunks -- 0.00% +0.00%
pkg/insight/applicationcount.go MakeApplicationCounts -- 0.00% +0.00%
pkg/insight/insightstore/applicationcountstore.go store.LoadApplicationCounts -- 85.71% +85.71%
pkg/insight/insightstore/applicationcountstore.go store.PutApplicationCounts -- 0.00% +0.00%
pkg/app/ops/insightcollector/applications.go findOldestApplication 80.00% 0.00% -80.00%
pkg/config/control_plane.go ControlPlaneInsightCollector.UnmarshalJSON 100.00% 83.33% -16.67%
pkg/insight/applicationcount.go determineApplicationStatus 85.71% 0.00% -85.71%
pkg/insight/insightstore/applicationcountstore.go determineFilePath 75.00% 100.00% +25.00%
pkg/app/ops/insightcollector/applications.go InsightCollector.collectApplicationCount 0.00% -- +-0.00%
pkg/app/ops/insightcollector/applications.go InsightCollector.updateApplicationCount 100.00% -- -100.00%
pkg/app/ops/insightcollector/applications.go InsightCollector.getApplications 100.00% -- -100.00%
pkg/app/ops/insightcollector/collector.go NewInsightCollector 0.00% -- +-0.00%
pkg/app/ops/insightcollector/collector.go InsightCollector.setHandlers 0.00% -- +-0.00%
pkg/app/ops/insightcollector/collector.go InsightCollector.ProcessNewlyCreatedDeployments 0.00% -- +-0.00%
pkg/app/ops/insightcollector/collector.go InsightCollector.ProcessNewlyCompletedDeployments 0.00% -- +-0.00%
pkg/app/ops/insightcollector/collector.go InsightCollector.ProcessApplications 0.00% -- +-0.00%
pkg/app/ops/insightcollector/deployments.go InsightCollector.collectDeploymentChangeFailureRate 0.00% -- +-0.00%
pkg/app/ops/insightcollector/deployments.go InsightCollector.collectDevelopmentFrequency 0.00% -- +-0.00%
pkg/app/ops/insightcollector/deployments.go InsightCollector.findDeploymentsCreatedInRange 100.00% -- -100.00%
pkg/app/ops/insightcollector/deployments.go InsightCollector.findDeploymentsCompletedInRange 100.00% -- -100.00%
pkg/app/ops/insightcollector/deployments.go InsightCollector.updateApplicationChunks 0.00% -- +-0.00%
pkg/app/ops/insightcollector/metrics.go NewCollectorMetrics 100.00% -- -100.00%
pkg/app/ops/insightcollector/metrics.go CollectorMetrics.Enable 100.00% -- -100.00%
pkg/app/ops/insightcollector/metrics.go CollectorMetrics.IsEnabled 100.00% -- -100.00%
pkg/insight/applicationcount.go NewApplicationCount 100.00% -- -100.00%
pkg/insight/applicationcount.go ApplicationCount.MigrateApplicationCount 100.00% -- -100.00%
pkg/insight/applicationcount.go ApplicationCount.Find 100.00% -- -100.00%
pkg/insight/applicationcount.go ApplicationCount.UpdateCount 100.00% -- -100.00%
pkg/insight/insightstore/applicationcountstore.go store.LoadApplicationCount 87.50% -- -87.50%
pkg/insight/insightstore/applicationcountstore.go store.PutApplicationCount 0.00% -- +-0.00%

@nakabonne
Copy link
Member

you made it
/lgtm

break
}
maxCreatedAt = apps[len(apps)-1].CreatedAt
cursor = next
Copy link
Member

Choose a reason for hiding this comment

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

🆒 😂

@khanhtc1202
Copy link
Member


/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.

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.

None yet

4 participants