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

Fix AccountStatementProvider #12431

Merged
merged 2 commits into from
Aug 29, 2022
Merged

Fix AccountStatementProvider #12431

merged 2 commits into from
Aug 29, 2022

Conversation

geropl
Copy link
Member

@geropl geropl commented Aug 26, 2022

Description

Fixes caching issue withing AccountStatementProvider. The reasons for this PR is a refactoring 2 weeks back which slightly broke the credit limit check; this PR is meant to bring it back.

Related Issue(s)

Fixes #

How to test

  • signup with user A
  • start a workspace
  • signup with user B
  • add negative credits to the accounting table for user A so user A should no longer be able to start workspaces
    • INSERT INTO d_b_account_entry SET uid = '<some-id>', userId = '<your-userId>', amount = -50, date = '2022-08-26T13:47:36.360Z', expiryDate ='2022-10-26T13:47:36.360Z', kind = 'credit';
      @AlexTugarev Already did this for your user
  • check that:
    • user A can indeed no longer start workspaces ✔️
    • user B still can ✔️

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-fix-accountstatement.1 because the annotations in the pull request description changed
(with .werft/ from main)

@geropl
Copy link
Member Author

geropl commented Aug 26, 2022

/werft run

👍 started the job as gitpod-build-gpl-fix-accountstatement.2
(with .werft/ from main)

@geropl geropl marked this pull request as ready for review August 26, 2022 14:02
@geropl geropl requested a review from a team August 26, 2022 14:02
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Aug 26, 2022
@geropl
Copy link
Member Author

geropl commented Aug 26, 2022

/hold Because of ongoing testing

@geropl geropl force-pushed the gpl/fix-accountstatement branch 3 times, most recently from 20106df to 2220e35 Compare August 26, 2022 16:14
@AlexTugarev
Copy link
Member

AlexTugarev commented Aug 29, 2022

/werft run

👍 started the job as gitpod-build-gpl-fix-accountstatement.6
(with .werft/ from main)

Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

Just verified, this really does fix the core issue with the check for credits 💯

@geropl geropl force-pushed the gpl/fix-accountstatement branch from 2220e35 to 901cbb0 Compare August 29, 2022 08:21
@geropl geropl force-pushed the gpl/fix-accountstatement branch from 901cbb0 to e0c24f1 Compare August 29, 2022 08:34
@geropl
Copy link
Member Author

geropl commented Aug 29, 2022

/unhold

@roboquat roboquat merged commit a2b7412 into main Aug 29, 2022
@roboquat roboquat deleted the gpl/fix-accountstatement branch August 29, 2022 09:00
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Aug 29, 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.

4 participants