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

[AC-2554] Prevent calls to billing-status endpoint when feature flag is off #9032

Conversation

amorask-bitwarden
Copy link
Contributor

Type of change

- [x] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

As a relic of the Payment Method Warning Banners that are currently off behind a feature flag, there’s a timer in the web application that tries to make a request to the Billing Status endpoint in server and use the result to update the state. These timed calls should also be gated behind the same feature flag so we don’t clutter our network requests.

Code changes

  • apps/web/src/app/app.component.ts: Combine the emission of the timer with the emission of the feature flag and filter out emissions where the feature flag is off.

@amorask-bitwarden amorask-bitwarden marked this pull request as ready for review May 3, 2024 15:32
@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label May 3, 2024
@amorask-bitwarden amorask-bitwarden removed the needs-qa Marks a PR as requiring QA approval label May 3, 2024
Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 27.73%. Comparing base (37d4095) to head (bd3ee33).

❗ Current head bd3ee33 differs from pull request most recent head d70f69e. Consider uploading reports for the commit d70f69e to get more accurate results

Files Patch % Lines
apps/web/src/app/app.component.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9032      +/-   ##
==========================================
- Coverage   27.75%   27.73%   -0.03%     
==========================================
  Files        2420     2418       -2     
  Lines       70063    69952     -111     
  Branches    13047    12987      -60     
==========================================
- Hits        19444    19399      -45     
+ Misses      49106    49054      -52     
+ Partials     1513     1499      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented May 3, 2024

Logo
Checkmarx One – Scan Summary & Details9dff07ba-af03-4198-91b8-91aa10ed4d07

No New Or Fixed Issues Found

@MGibson1 MGibson1 changed the title [AC-2554] Prevent calls to billing-status endpoint when FF is off [AC-2554] Prevent calls to billing-status endpoint when feature flag is off May 6, 2024
MGibson1
MGibson1 previously approved these changes May 6, 2024
@amorask-bitwarden
Copy link
Contributor Author

Hey @MGibson1, apologies - had to resolve a merge conflict. Can I get another stamp here when possible?

@amorask-bitwarden amorask-bitwarden merged commit 59c9606 into main May 8, 2024
28 of 30 checks passed
@amorask-bitwarden amorask-bitwarden deleted the billing/AC-2554/prevent-unnecessary-billing-status-calls branch May 8, 2024 19:38
MGibson1 pushed a commit that referenced this pull request May 13, 2024
MGibson1 pushed a commit that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants