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

🐛 Fixes invalid invitation link #7017

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jan 8, 2025

What do these changes do?

Isse ITISFoundation/osparc-issues#1792 is not caused by chinese characters but rather by an invalid invitation link (probably some characters missing after copy/paste?). This might be due to many reasons. Since we lack sufficient information in the logs to identify the root cause, we used this PR as an opportunity to enhance error handling and add more detailed logging to help diagnose the problem if it occurs again.

  • webserver/invitations domain
    • transform error handling context to decorator on client
    • rename module to follow CSR layers
  • invitations service:
    • ♻️ Adds error handling in invitations service
    • 🎨 better logging in case of invalid invitation link

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv --pdb --ff --setup-show tests/unit/**/test_*invitation*.py
cd services/invitations
make install-dev
make tests-dev-unit

Dev-ops

None

@pcrespov pcrespov self-assigned this Jan 8, 2025
@pcrespov pcrespov added a:webserver issue related to the webserver service a:invitations invitations service labels Jan 8, 2025
@pcrespov pcrespov force-pushed the is1792/fix-invitation-links branch from 501a0dc to 3cd1b6a Compare January 8, 2025 15:58
@pcrespov pcrespov changed the title Is1792/fix invitation links 🎨 Fixes invalid invitation link Jan 8, 2025
@pcrespov pcrespov changed the title 🎨 Fixes invalid invitation link 🐛 Fixes invalid invitation link Jan 8, 2025
@pcrespov pcrespov marked this pull request as ready for review January 8, 2025 15:58
@pcrespov pcrespov added this to the Event Horizon milestone Jan 8, 2025
Copy link

sonarqubecloud bot commented Jan 8, 2025

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Cool! 👍

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 85.55556% with 13 lines in your changes missing coverage. Please review.

Project coverage is 82.58%. Comparing base (2165fd4) to head (3ca73bf).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7017      +/-   ##
==========================================
- Coverage   86.90%   82.58%   -4.32%     
==========================================
  Files        1637      674     -963     
  Lines       64487    32497   -31990     
  Branches     2029      262    -1767     
==========================================
- Hits        56042    26838   -29204     
+ Misses       8109     5599    -2510     
+ Partials      336       60     -276     
Flag Coverage Δ
integrationtests 64.89% <43.07%> (-2.22%) ⬇️
unittests 85.06% <85.55%> (-0.24%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
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 77.37% <ø> (-8.02%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.80% <ø> (-12.62%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 89.74% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations 93.44% <92.00%> (-0.01%) ⬇️
osparc_gateway_server ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 83.04% <83.07%> (-1.05%) ⬇️

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 2165fd4...3ca73bf. Read the comment docs.

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!

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

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

👌

@pcrespov pcrespov merged commit f543f5a into ITISFoundation:master Jan 9, 2025
88 of 93 checks passed
@pcrespov pcrespov deleted the is1792/fix-invitation-links branch January 9, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:invitations invitations service a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invitation links/preregistration: deal with non-occidental characters
4 participants