Skip to content

Refactor EntitlementService and extract License from Chargebee (2/3) #11889

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 2 commits into from
Aug 5, 2022

Conversation

geropl
Copy link
Member

@geropl geropl commented Aug 4, 2022

Description

This again is a refactor with the aim to have 0 behavior changes. It's best reviewed in Gitpod method by method of this change.

There are two changes in call hierarchy, which makes this PR a non 100% move op:

  • before:
    • caller -> UserService.getDefaultWorkspaceTimeout -> EntitlementService.getDefaultWorkspaceTimeout
    • caller -> UserService.userGetsMoreResources -> EntitlementService.userGetsMoreResources
  • after:
    • caller -> EntitlementService.*

The behavior of UserService.* has been folded into the new one be extracting that code into EntitlementServiceLicense. As those EntitlementService.* methods have only been called by UserService, it's guaranteed to not change behavior. 🧘

Related Issue(s)

Context: #11402

How to test

setup

License

Chargebee

Release Notes

NONE

Documentation

Werft options:

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

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-entitlement-svc-3.3 because the annotations in the pull request description changed
(with .werft/ from main)

@geropl geropl requested a review from AlexTugarev August 4, 2022 16:15
@geropl geropl mentioned this pull request Aug 5, 2022
2 tasks
@AlexTugarev AlexTugarev self-assigned this Aug 5, 2022
@geropl geropl force-pushed the gpl/entitlement-svc-3 branch from 5a7d837 to 320d3d0 Compare August 5, 2022 08:51
@AlexTugarev
Copy link
Member

AlexTugarev commented Aug 5, 2022

@geropl, I couldn't set workspace timeout after switching to a paid plan (PRO) on

https://alextugarev-bel-eka8ju26132.ws.gpl-entitl342918dfed.preview.gitpod-dev.com/

Error: Plan upgrade is required

Screen Shot 2022-08-05 at 11 49 56

@geropl
Copy link
Member Author

geropl commented Aug 5, 2022

@AlexTugarev let's meet, what branch is that? 🤔

@AlexTugarev
Copy link
Member

Thanks for clarifying. It's the Unleashed plan which is needed to enable the extended workspace timeout.

@geropl geropl marked this pull request as ready for review August 5, 2022 10:02
@geropl geropl requested a review from a team August 5, 2022 10:02
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Aug 5, 2022
@roboquat roboquat merged commit d9defb2 into main Aug 5, 2022
@roboquat roboquat deleted the gpl/entitlement-svc-3 branch August 5, 2022 10:03
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Aug 5, 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/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants