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

🎨🐛 web-api: projects search can query filters and fixes on projects repo #7004

Merged
merged 8 commits into from
Jan 7, 2025

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jan 6, 2025

What do these changes do?

ReDoc

The web API exposes two collections that can be nested: projects and folders. Listing items from these collections can be performed in two ways:

  1. Standard List Operation:
    Example: GET /projects
    This operation retrieves items one level under a parent location, which is specified via query parameters. By default:

    • For projects, the parent is identified by folder_id == None (defaulting to the root folder).
    • For folders, the parent is identified by workspace_id (defaulting to None, i.e., MyWorkspace).
  2. Custom Search Operation:
    Example: GET /projects:search
    This operation retrieves items recursively (full-depth) from the root.

To list items in the trash bin, we must use the "custom search operation" for both projects and folders with the query filter {"trashed": true}. For example:

  • GET /projects:search?filters={"trashed": true}
  • GET /folders:search?filters={"trashed": true}

In detail

  • 🎨 Adds missing filters query in /projects:search
  • Extend testing of trashing and listing nested items
  • 🐛 Adds fix by @matusdrobuliak66 on project's repo.

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests/unit/**/test_*trash*.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Jan 6, 2025
@pcrespov pcrespov added this to the Event Horizon milestone Jan 6, 2025
@pcrespov pcrespov added a:webserver issue related to the webserver service a:api framework api, data schemas, labels Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.99%. Comparing base (e8046a8) to head (91e0ed2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7004      +/-   ##
==========================================
+ Coverage   86.80%   87.99%   +1.18%     
==========================================
  Files        1638     1326     -312     
  Lines       64617    55583    -9034     
  Branches     2041      900    -1141     
==========================================
- Hits        56094    48910    -7184     
+ Misses       8183     6536    -1647     
+ Partials      340      137     -203     
Flag Coverage Δ
integrationtests 67.40% <57.14%> (+3.36%) ⬆️
unittests 86.85% <100.00%> (+1.19%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.58% <ø> (ø)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.02% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.38% <ø> (ø)
agent 96.82% <ø> (+11.77%) ⬆️
api_server 90.13% <ø> (ø)
autoscaling 96.09% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 99.48% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.18% <ø> (ø)
director 76.49% <ø> (ø)
director_v2 91.41% <ø> (ø)
dynamic_scheduler 97.19% <ø> (ø)
dynamic_sidecar 89.77% <ø> (ø)
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% <100.00%> (+<0.01%) ⬆️

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 e8046a8...91e0ed2. Read the comment docs.

@pcrespov pcrespov force-pushed the is468/extend-filters branch from 3b2db9d to f5c523a Compare January 7, 2025 12:38
@pcrespov pcrespov changed the title WIP: 🎨 Is468/extend filters 🎨🐛 web-api: projects search can query filters and fixes on projects repo Jan 7, 2025
@pcrespov pcrespov marked this pull request as ready for review January 7, 2025 12:53
@pcrespov pcrespov requested a review from odeimaiz January 7, 2025 12:53
@pcrespov pcrespov enabled auto-merge (squash) January 7, 2025 12:54
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.

Thanks! 🥇

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

sonarqubecloud bot commented Jan 7, 2025

@pcrespov pcrespov merged commit 5405b46 into ITISFoundation:master Jan 7, 2025
101 of 103 checks passed
@pcrespov pcrespov deleted the is468/extend-filters branch January 7, 2025 16:33
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 issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants