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

[usage] Extend method call with order arg #11694

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

laushinka
Copy link
Contributor

@laushinka laushinka commented Jul 27, 2022

Description

Adds the ordering argument to listBilledUsage calls.
View implementation will be in a separate issue and PR.

Related Issue(s)

Fixes #11691

How to test

  1. Join team
  2. Go to /usage
  3. Check the network call - listBilledUsage should be called with the additional param '0'.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-laushinka-incorporate-reverse-sorting-11691.1 because the annotations in the pull request description changed
(with .werft/ from main)

@laushinka laushinka changed the title add ordering [usage] Exetend method call with order arg Jul 27, 2022
@laushinka laushinka force-pushed the laushinka/incorporate-reverse-sorting-11691 branch from b0d2929 to 6e6f103 Compare July 27, 2022 13:32
@laushinka laushinka changed the title [usage] Exetend method call with order arg [usage] Extend method call with order arg Jul 27, 2022
@laushinka laushinka force-pushed the laushinka/incorporate-reverse-sorting-11691 branch from 6e6f103 to b2e9b20 Compare July 27, 2022 13:42
@laushinka laushinka marked this pull request as ready for review July 27, 2022 13:54
@laushinka laushinka requested a review from a team July 27, 2022 13:54
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jul 27, 2022
Copy link
Contributor

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

Looks good, just wonder whether we can do better with the type for the new parameter.

components/dashboard/src/teams/TeamUsage.tsx Outdated Show resolved Hide resolved
components/gitpod-protocol/src/gitpod-service.ts Outdated Show resolved Hide resolved
@roboquat roboquat added size/M and removed size/S labels Jul 31, 2022
@laushinka laushinka force-pushed the laushinka/incorporate-reverse-sorting-11691 branch from e52e626 to 0493b81 Compare July 31, 2022 20:16
attributionId: string,
startedTimeOrder: SortOrder,
from?: number,
to?: number,
Copy link
Member

Choose a reason for hiding this comment

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

@laushinka, please introduce ListBilledUsageParams and wrap the args, for 2 reasons:

  1. it's likely this args list may be extended, right?
  2. optional args at the end are simply not working with jsonrpc, because behind the scene there will be another param added (I think it's a cancellation token) which leads to nasty bugs in JS evaluation.

Copy link
Contributor Author

@laushinka laushinka Aug 1, 2022

Choose a reason for hiding this comment

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

optional args at the end are simply not working with jsonrpc, because behind the scene there will be another param added (I think it's a cancellation token) which leads to nasty bugs in JS evaluation.

Done! Thanks for the tip.

@laushinka laushinka force-pushed the laushinka/incorporate-reverse-sorting-11691 branch from 0493b81 to 20324c1 Compare August 1, 2022 10:00
@laushinka laushinka force-pushed the laushinka/incorporate-reverse-sorting-11691 branch from 20324c1 to aeaa3ae Compare August 1, 2022 10:47
@roboquat roboquat merged commit 04f122c into main Aug 1, 2022
@roboquat roboquat deleted the laushinka/incorporate-reverse-sorting-11691 branch August 1, 2022 11:00
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Aug 2, 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/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate reverse-sorting arg from the API
4 participants