Skip to content

[UBP] Show "running" for instances with no end time in the usage view #12575

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 1, 2022

Conversation

andrew-farries
Copy link
Contributor

Description

Using the current time as the end time for usage records without an end time (ie running instances) is problematic because it can cause the usage view to show an instance as having run for longer than it really did. This makes it looks like the credits calculation for the instance is incorrect.

For running usage records, simply return "running" rather than inventing a stopped time for them.

See also related discussion on Slack (internal).

Related Issue(s)

Part of #12064

How to test

  • Create a team with 'Gitpod' in the name in the preview env and enable usage based billing for the team
  • Start a workspace
  • Visit the usage view and see that the workspace is marked as 'running'.

image

  • Stop the workspace
  • Wait for usage reconciliation to run.
  • Visit the usage view and see that the workspace has a runtime duration.

image

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-payment

Using the current time as the end time for usage records without an end
time (ie running instances) is problematic because it can cause the
usage view to show an instance as having run for longer than it really
did. This makes it looks like the credits calculation for the instance
is incorrect.

For running usage records, simply return "running" rather than inventing a
stopped time for them.
@andrew-farries andrew-farries requested a review from a team September 1, 2022 07:26
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 1, 2022
@roboquat roboquat merged commit f67d8a6 into main Sep 1, 2022
@roboquat roboquat deleted the af/running-instances-in-usage-view branch September 1, 2022 08:39
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 1, 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/XS team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants