Skip to content

[usage] Deploy usage by default #14668

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
Nov 16, 2022
Merged

[usage] Deploy usage by default #14668

merged 1 commit into from
Nov 16, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Nov 14, 2022

Description

This PR will deploy the usage component by default in all installations.

It uses the following defaults:

  • Usage Ledger schedule - 15m

  • Reset Usage schedule - 15m

  • WorkspaceClass Credit cost - default: 0.1666666667

  • No Stripe API Key, No Stripe prices

    • This will effectively disable stripe integration, and the BillingService

Related Issue(s)

Related to #14129

How to test

Usage component is deployed in preview

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@easyCZ easyCZ force-pushed the mp/usage-deploy-default branch 3 times, most recently from fdeb2cb to 867f683 Compare November 14, 2022 21:28
@easyCZ easyCZ marked this pull request as ready for review November 14, 2022 21:30
@easyCZ easyCZ requested review from a team November 14, 2022 21:30
@github-actions github-actions bot added team: SID team: devx team: webapp Issue belongs to the WebApp team labels Nov 14, 2022
@easyCZ easyCZ force-pushed the mp/usage-deploy-default branch from 867f683 to ba59c1b Compare November 15, 2022 07:55
// This is the default configuration, used in self-hosted installs.
// For SaaS, we explicitly configure it based on workspace classes below.
CreditsPerMinuteByWorkspaceClass: map[string]float64{
"default": 0.1666666667,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the credits value significant? If not, adding a comment to that effect might be worthwhile.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is significant. At least the default class has to be defined. We could define it with a value of 0, but that risks actually making a mistake and not charging for instances at all in our SaaS..

@andrew-farries
Copy link
Contributor

There is also this comment in the linked issue which suggests we should also remove a UsageServiceMock.

@easyCZ
Copy link
Member Author

easyCZ commented Nov 16, 2022

There is also this comment in the linked issue which suggests we should also remove a UsageServiceMock.

Updated linked issues to say "relates to" rather than "fixes"

@roboquat roboquat merged commit 6c1994c into main Nov 16, 2022
@roboquat roboquat deleted the mp/usage-deploy-default branch November 16, 2022 12:04
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Nov 17, 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 release-note-none size/L team: devx team: SID team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants