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

✨♻️ Generates invitations with product (⚠️ devops) #4995

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 7, 2023

What do these changes do?

Invitation service can generate invitations including a product.

  • services/invitations version: 1.1.0 → 1.1.1: openapi.json
  • ♻️ Upgrades CLI and unified command names as with other services e.g. echo-dotenv (see example below)
  • ♻️ Cleaned up code

In a separate PR, the webserver will limit the registration to the product included in these new invitation links. It will also be used to add an existing user to a new product

Related issue/s

How to test

$ simcore-service-invitations echo-dotenv > .env; set -o allexport; source .env; set +o allexport
$ simcore-service-invitations invite bar@email.com --issuer foo@email.com --trial-account-days=3 | xargs simcore-service-invitations extract
{
 "issuer": "[email protected]",
 "guest": "[email protected]",
 "trial_account_days": 3,
 "extra_credits_in_usd": null,
 "product": "s4llite",
 "created": "2023-11-07T20:55:07.451479+00:00"
}
  • Added parametrize fixture to create applications with no product (legacy), with default product and with a different product to default. These variants are used in many of the existing tests at
cd services/invitations
make install-dev
make test-dev-unit

DevOps ⚠️

  • NEW INVITATIONS_DEFAULT_PRODUCT=s4llite in aws production
  • NEW INVITATIONS_SWAGGER_API_DOC_ENABLED=0 disabled everywhere except master deploy

@YuryHrytsuk please check changes i did in https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/127

@pcrespov pcrespov self-assigned this Nov 7, 2023
@pcrespov pcrespov added the a:invitations invitations service label Nov 7, 2023
@pcrespov pcrespov added this to the 7peaks milestone Nov 7, 2023
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #4995 (c14042a) into master (b766776) will decrease coverage by 1.4%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4995     +/-   ##
========================================
- Coverage    87.2%   85.9%   -1.4%     
========================================
  Files        1244    1243      -1     
  Lines       51145   51141      -4     
  Branches     1081    1081             
========================================
- Hits        44633   43943    -690     
- Misses       6274    6970    +696     
+ Partials      238     228     -10     
Flag Coverage Δ
integrationtests 58.5% <ø> (-6.5%) ⬇️
unittests 85.0% <100.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...s/models-library/src/models_library/invitations.py 85.0% <100.0%> (+1.6%) ⬆️
...rc/simcore_service_invitations/api/_invitations.py 100.0% <ø> (ø)
...tions/src/simcore_service_invitations/api/_meta.py 100.0% <100.0%> (ø)
...invitations/src/simcore_service_invitations/cli.py 92.1% <100.0%> (-1.4%) ⬇️
...s/src/simcore_service_invitations/core/settings.py 97.2% <100.0%> (+0.2%) ⬆️
...ons/src/simcore_service_invitations/invitations.py 100.0% <100.0%> (ø)

... and 38 files with indirect coverage changes

@pcrespov pcrespov changed the title WIP: ✨♻️ Is4546/add product in invitations content (⚠️) ✨♻️ Generates invitations with product (⚠️) Nov 7, 2023
@pcrespov pcrespov marked this pull request as ready for review November 7, 2023 21:27
@pcrespov pcrespov changed the title ✨♻️ Generates invitations with product (⚠️) ✨♻️ Generates invitations with product (⚠️ devops) Nov 7, 2023
Copy link
Collaborator

@elisabettai elisabettai left a comment

Choose a reason for hiding this comment

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

Very nice, looking forward to trying it!

@pcrespov pcrespov force-pushed the is4546/add-product-in-invitations-content branch from 0d58e0a to d96e79d Compare November 8, 2023 08:30
@pcrespov pcrespov enabled auto-merge (squash) November 8, 2023 08:32
@pcrespov pcrespov force-pushed the is4546/add-product-in-invitations-content branch from d96e79d to a5bf45f Compare November 8, 2023 11:36
@pcrespov pcrespov requested a review from mrnicegyu11 as a code owner November 8, 2023 14:09
@pcrespov pcrespov force-pushed the is4546/add-product-in-invitations-content branch from 0f5496f to 08d54d1 Compare November 8, 2023 14:12
@pcrespov pcrespov force-pushed the is4546/add-product-in-invitations-content branch from 1bfa559 to 29a3581 Compare November 8, 2023 22:15
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.

Nice! Thanks

packages/models-library/src/models_library/invitations.py Outdated Show resolved Hide resolved
@pcrespov pcrespov force-pushed the is4546/add-product-in-invitations-content branch from 0d8b410 to c53b3f5 Compare November 9, 2023 12:03
@pcrespov pcrespov disabled auto-merge November 9, 2023 13:22
@pcrespov pcrespov enabled auto-merge (squash) November 9, 2023 13:22
Copy link

codeclimate bot commented Nov 9, 2023

Code Climate has analyzed commit c14042a and detected 0 issues on this pull request.

View more on Code Climate.

Copy link

sonarcloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@pcrespov pcrespov merged commit 9324be5 into ITISFoundation:master Nov 9, 2023
55 checks passed
@pcrespov pcrespov deleted the is4546/add-product-in-invitations-content branch November 9, 2023 14:10
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Nov 23, 2023
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:invitations invitations service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants