Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jan 3, 2025

What do these changes do?

ReDoc

image

  • ✨ api-web: implements sharing operations for tags
    • Follows same strategy used in other resources (e.g. projects, etc): uses tags/{tag_id}/groups subresource to share tag tag_id with a group group_id.
    • Policies to share tags (via web-api):
      • tag creator becomes owner (i.e. read-write-delete access)
      • sharing tags with everyone (group_id=1) cannot be done
      • sharing tags with all users in a product (group_id is associated to `product_name)) only allowed to TESTERS, POs and ADMIN users
  • ♻️ refactors tags domain as controller (_rest)-service (_service)-repository (will be moved from postgres-database library in subsequent PR)

Related issue/s

How to test

  • Driving tests
cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs/03/tags/test_tags.py
cd packages/postgres-database
make install-dev
pytest -vv tests/test_utils_tags.py

Dev-ops checklist

None

@codecov
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 86.36364% with 24 lines in your changes missing coverage. Please review.

Project coverage is 88.19%. Comparing base (9d5c8db) to head (63cc72a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6998      +/-   ##
==========================================
+ Coverage   85.52%   88.19%   +2.66%     
==========================================
  Files        1630     1429     -201     
  Lines       64379    56953    -7426     
  Branches     2035      945    -1090     
==========================================
- Hits        55063    50227    -4836     
+ Misses       8982     6557    -2425     
+ Partials      334      169     -165     
Flag Coverage Δ
integrationtests 64.46% <43.80%> (+0.96%) ⬆️
unittests 86.96% <86.36%> (+3.15%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.58% <ø> (ø)
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 88.27% <92.42%> (+0.04%) ⬆️
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.38% <ø> (ø)
agent 96.82% <ø> (ø)
api_server 90.13% <ø> (ø)
autoscaling 96.09% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 99.48% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.18% <ø> (ø)
director 76.40% <ø> (-0.09%) ⬇️
director_v2 91.37% <ø> (-0.05%) ⬇️
dynamic_scheduler 97.19% <ø> (ø)
dynamic_sidecar 89.75% <ø> (ø)
efs_guardian 90.12% <ø> (ø)
invitations 93.44% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.62% <ø> (+0.29%) ⬆️
storage 89.54% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 84.06% <86.66%> (+4.34%) ⬆️

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 9d5c8db...63cc72a. Read the comment docs.

@pcrespov pcrespov self-assigned this Jan 3, 2025
@pcrespov pcrespov added this to the Event Horizon milestone Jan 3, 2025
@pcrespov pcrespov added the a:webserver webserver's codebase. Assigning the area is particularly useful for bugs label Jan 3, 2025
@pcrespov pcrespov changed the title WIP: Is1771/share tags ✨: share tags Jan 6, 2025
@pcrespov pcrespov changed the title ✨: share tags ✨ web-api: share tags Jan 6, 2025
@pcrespov pcrespov marked this pull request as ready for review January 6, 2025 11:38
@pcrespov pcrespov requested a review from odeimaiz January 6, 2025 11:38
@pcrespov pcrespov marked this pull request as draft January 6, 2025 11:38
@pcrespov pcrespov changed the title ✨ web-api: share tags WIP: ✨ web-api: share tags Jan 6, 2025
@giancarloromeo
Copy link
Contributor

Still WIP: ? :)

@pcrespov
Copy link
Member Author

pcrespov commented Jan 6, 2025

Still WIP: ? :)

sorry. I forgot to include one more feature ... will reassign

@pcrespov pcrespov marked this pull request as ready for review January 6, 2025 13:31
@pcrespov pcrespov changed the title WIP: ✨ web-api: share tags ✨ web-api: share tags Jan 6, 2025
Copy link
Member

@odeimaiz odeimaiz 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
Collaborator

@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.

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

@pcrespov pcrespov enabled auto-merge (squash) January 6, 2025 21:46
@pcrespov pcrespov added the a:api framework api, data schemas, label Jan 6, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2025

@pcrespov
Copy link
Member Author

pcrespov commented Jan 7, 2025

We will follow up on some comments during the review in #7011

@pcrespov pcrespov merged commit c758028 into ITISFoundation:master Jan 7, 2025
89 of 93 checks passed
@pcrespov pcrespov deleted the is1771/share-tags branch January 7, 2025 12:29
@odeimaiz odeimaiz mentioned this pull request Jan 7, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:api framework api, data schemas, a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend: Share Tags

6 participants