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

🎨 improvements: return user email in licensed items, error msg, expose pricing plans πŸ—ƒοΈ #7068

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented Jan 22, 2025

What do these changes do?

As required by @odeimaiz

  • 🎨 return user email on the licensed items checkouts and purchases πŸ—ƒοΈ
  • 🎨 improve error messages when project is in DEBT
  • 🎨 expose pricing plans API for users (for now it was available only for admins)
  • πŸ› update DEBT -> BILLED wallet transactions in special corner case when transaction finishes in "NOT_BILLED" status (which might cause the wallet coming back to positive credits)

Related issue/s

How to test

Dev-ops checklist

@matusdrobuliak66 matusdrobuliak66 changed the title WIP: minor improvements WIP: minor improvements πŸ—ƒοΈ Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 62.72727% with 41 lines in your changes missing coverage. Please review.

Project coverage is 63.06%. Comparing base (69cf7cb) to head (92ca3a0).
Report is 2 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (69cf7cb) and HEAD (92ca3a0). Click for more details.

HEAD has 28 uploads less than BASE
Flag BASE (69cf7cb) HEAD (92ca3a0)
unittests 30 2
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7068       +/-   ##
===========================================
- Coverage   87.26%   63.06%   -24.21%     
===========================================
  Files        1634      512     -1122     
  Lines       64264    23290    -40974     
  Branches     2051        0     -2051     
===========================================
- Hits        56082    14688    -41394     
- Misses       7845     8602      +757     
+ Partials      337        0      -337     
Flag Coverage Ξ” *Carryforward flag
integrationtests 57.94% <62.72%> (-6.85%) ⬇️ Carriedforward from 4a685d1
unittests 91.32% <ΓΈ> (+5.81%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Ξ”
api 76.84% <ΓΈ> (ΓΈ)
pkg_aws_library βˆ… <ΓΈ> (βˆ…)
pkg_dask_task_models_library βˆ… <ΓΈ> (βˆ…)
pkg_models_library βˆ… <ΓΈ> (βˆ…)
pkg_notifications_library βˆ… <ΓΈ> (βˆ…)
pkg_postgres_database βˆ… <ΓΈ> (βˆ…)
pkg_service_integration βˆ… <ΓΈ> (βˆ…)
pkg_service_library βˆ… <ΓΈ> (βˆ…)
pkg_settings_library βˆ… <ΓΈ> (βˆ…)
pkg_simcore_sdk βˆ… <ΓΈ> (βˆ…)
agent 96.45% <ΓΈ> (ΓΈ)
api_server βˆ… <ΓΈ> (βˆ…)
autoscaling βˆ… <ΓΈ> (βˆ…)
catalog βˆ… <ΓΈ> (βˆ…)
clusters_keeper βˆ… <ΓΈ> (βˆ…)
dask_sidecar βˆ… <ΓΈ> (βˆ…)
datcore_adapter βˆ… <ΓΈ> (βˆ…)
director βˆ… <ΓΈ> (βˆ…)
director_v2 βˆ… <ΓΈ> (βˆ…)
dynamic_scheduler βˆ… <ΓΈ> (βˆ…)
dynamic_sidecar 89.75% <ΓΈ> (ΓΈ)
efs_guardian βˆ… <ΓΈ> (βˆ…)
invitations βˆ… <ΓΈ> (βˆ…)
osparc_gateway_server βˆ… <ΓΈ> (βˆ…)
payments βˆ… <ΓΈ> (βˆ…)
resource_usage_tracker βˆ… <ΓΈ> (βˆ…)
storage βˆ… <ΓΈ> (βˆ…)
webclient βˆ… <ΓΈ> (βˆ…)
webserver 57.64% <62.72%> (-27.29%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 69cf7cb...92ca3a0. Read the comment docs.

@matusdrobuliak66 matusdrobuliak66 self-assigned this Jan 22, 2025
@matusdrobuliak66 matusdrobuliak66 added a:webserver issue related to the webserver service a:resource-usage-tracker resource usage tracker service labels Jan 22, 2025
@matusdrobuliak66 matusdrobuliak66 added this to the Singularity milestone Jan 22, 2025
@matusdrobuliak66 matusdrobuliak66 changed the title WIP: minor improvements πŸ—ƒοΈ 🎨 improvements: return user email in licensed items, error msg, expose pricing plans πŸ—ƒοΈ Jan 22, 2025
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks!

api/specs/web-server/_resource_usage.py Outdated Show resolved Hide resolved
api/specs/web-server/_resource_usage.py Outdated Show resolved Hide resolved
product_name=req_ctx.product_name,
)
webserver_pricing_unit_get = [
PricingPlanGet(
Copy link
Member

Choose a reason for hiding this comment

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

As agreed, please create the adapter as a static member PricingPlanGet.from_domain_model

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.6% Duplication on New Code (required ≀ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:resource-usage-tracker resource usage tracker service a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants