-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 Fixes catalog giving access rights to everyone (group 1) to new services 🚨 #7992
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 catalog giving access rights to everyone (group 1) to new services 🚨 #7992
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7992 +/- ##
==========================================
+ Coverage 87.88% 87.91% +0.03%
==========================================
Files 1853 1846 -7
Lines 71478 71301 -177
Branches 1258 1258
==========================================
- Hits 62819 62686 -133
+ Misses 8295 8251 -44
Partials 364 364
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR restores correct default access rights by ensuring only services without build metadata or built before August 19, 2020 are assigned to the public group. It also enriches the get_service_extras client API and adds tests to cover both scenarios.
- Refactors
_is_old_serviceto first detect missing build details, then compare build dates against the cutoff. - Updates
get_service_extrasto includeservice_build_detailsonly when org labels are present. - Introduces fixtures and unit tests for both director client and utilities, covering services with and without org labels.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/simcore_service_catalog/service/access_rights.py | Rewritten _is_old_service logic and renamed cutoff var. |
| src/simcore_service_catalog/clients/director.py | Conditional inclusion of service_build_details in result. |
| tests/unit/test_utils_service_extras.py | Reformatted import for ServiceExtras. |
| tests/unit/test_clients_director.py | Added service_key_and_version fixture and new tests. |
| tests/unit/conftest.py | Expanded label fixture and added mock_service_extras. |
Comments suppressed due to low confidence (2)
services/catalog/src/simcore_service_catalog/service/access_rights.py:44
- [nitpick] This commented-out placeholder and the unused
client = get_director_client(app)line can be removed to declutter the function and improve readability.
#
services/catalog/src/simcore_service_catalog/clients/director.py:286
- [nitpick] Consider reintroducing a debug log statement here to record the exact build details being included, which can aid troubleshooting and understanding of the compiled result.
result.update({"service_build_details": service_build_details})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
Cool, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
|
Q: But the long term vision is that we are getting rid of group everyone from the DB, is that correct? |
|
@mergify queue |
🟠 Waiting for conditions to match
|
|
@mergify queue |
🟠 Waiting for conditions to match
|
@matusdrobuliak66 i am not sure about it. The everyone group has its use. What I need to make sure is to understand why the "old" services needed this group. I need to check with @sanderegg |
|
@mergify queue |
🟠 Waiting for conditions to match
|
59912b1 to
660e4c7
Compare
|



What do these changes do?
Fixes a bug where new services were incorrectly assigned to everyone (
group=1) by default, introduced in #7025.This PR restores the correct behavior:
group=1._OLD_SERVICES_CUTOFF_DATETIME(August 19, 2020).Additional test coverage is included to ensure correctness of the access-rights logic.
Follow up
Related issue/s
How to test
Manual exploratory testing 🚨
services_acces_rightsthat this service in this product does NOT has access rights to everyone 1Dev-ops
None