Skip to content

[usage] Remove old controller & report generator #12688

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

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Sep 6, 2022

Description

These are no longer needed.

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@easyCZ easyCZ force-pushed the mp/usage-remove-old-controller branch from 6a93271 to 3bcf804 Compare September 8, 2022 07:32
@easyCZ easyCZ marked this pull request as ready for review September 8, 2022 07:36
@easyCZ easyCZ requested a review from a team September 8, 2022 07:36
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 8, 2022
ctx := context.Background()

now := time.Now().UTC()
hourAgo := now.Add(-1 * time.Hour)

reportUsageReconcileStarted()
Copy link
Member Author

Choose a reason for hiding this comment

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

Only change here is to re-use the metrics from the previous controller in the new one.

@@ -142,7 +135,7 @@ func FindRunningWorkspaceInstances(t *testing.T, conn *gorm.DB, workspaceID stri
}

func filterByWorkspaceId(all []db.WorkspaceInstanceForUsage, workspaceID string) []db.WorkspaceInstanceForUsage {
result := []db.WorkspaceInstanceForUsage{}
var result []db.WorkspaceInstanceForUsage
Copy link
Member Author

Choose a reason for hiding this comment

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

Drive-by for best-practice of slice instantiation

@roboquat roboquat merged commit e937ca7 into main Sep 8, 2022
@roboquat roboquat deleted the mp/usage-remove-old-controller branch September 8, 2022 07:56
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/XXL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants