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

Introduce TeamSubscription.noMoreResources to be able to exclude TeamSubscriptions from bigger clusters #8608

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

geropl
Copy link
Member

@geropl geropl commented Mar 4, 2022

Description

This introduces a noMoreResources column on TeamSubscription that can be used to exclude it's members from receiving more-resources.

Related Issue(s)

Fixes #8472

How to test

  • note how the unit tests are green.

Release Notes

NONE

Documentation

@geropl geropl changed the title [server] Introduce TeamSubscription.noMoreResources Introduce TeamSubscription.noMoreResources to be able to exclude TeamSubscriptions from bigger clusters Mar 4, 2022
@geropl
Copy link
Member Author

geropl commented Mar 7, 2022

/werft run

👍 started the job as gitpod-build-gpl-8472-limit-res.2

Re-try certificate

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #8608 (1f5faf3) into main (f141323) will decrease coverage by 1.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8608      +/-   ##
==========================================
- Coverage   12.31%   11.17%   -1.14%     
==========================================
  Files          20       18       -2     
  Lines        1161      993     -168     
==========================================
- Hits          143      111      -32     
+ Misses       1014      880     -134     
+ Partials        4        2       -2     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f141323...1f5faf3. Read the comment docs.

@geropl geropl marked this pull request as ready for review March 7, 2022 07:55
@geropl geropl requested a review from a team March 7, 2022 07:55
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 7, 2022
@geropl geropl force-pushed the gpl/8472-limit-res branch from d390015 to 49e29ab Compare March 7, 2022 10:22
@geropl geropl force-pushed the gpl/8472-limit-res branch from 49e29ab to 1c3dd1a Compare March 7, 2022 10:49
jankeromnes
jankeromnes previously approved these changes Mar 7, 2022
Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks for the quick fix @geropl! 🚀

Code looks good to me, and the unit test adds a lot of confidence. Also, the migrated (empty) DB looks good. 👍

Still, I'd feel a bit safer testing this with an actual chargebee integration. Adding a hold in case you want to add an integration in this PR, but I'm also happy to fully test this on staging (i.e. please feel free to unhold 🚢).

/hold

@geropl
Copy link
Member Author

geropl commented Mar 7, 2022

/unhold

Still, I'd feel a bit safer testing this with an actual chargebee integration.

As this is only about how we interpret our own model I think it's fine, especially with the test.

@jankeromnes Need re-approval for the removed ?.

jankeromnes
jankeromnes previously approved these changes Mar 7, 2022
Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Thanks, re-approved! 🚀

@jankeromnes
Copy link
Contributor

jankeromnes commented Mar 7, 2022

Oh, oops -- Werft failed with:

src/chargebee/team-subscription-handler.ts(69,52): error TS2345: Argument of type '{ userId: string; paymentReference: string; planId: string; startDate: string; endDate: string | undefined; quantity: number; }' is not assignable to parameter of type 'Omit<TeamSubscription, "id">'.
  Property 'excludeFromMoreResources' is missing in type '{ userId: string; paymentReference: string; planId: string; startDate: string; endDate: string | undefined; quantity: number; }' but required in type 'Omit<TeamSubscription, "id">'.

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Still good to go! 🚀

@roboquat roboquat merged commit 740092e into main Mar 7, 2022
@roboquat roboquat deleted the gpl/8472-limit-res branch March 7, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit which users can receive has-more-resources permission
3 participants