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

feat: add support for deletedAt and NGSI-LD Null #1281

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

bobeal
Copy link
Member

@bobeal bobeal commented Dec 8, 2024

First iteration with support in core and temporal API

@github-actions github-actions bot added the feature New feature or request label Dec 8, 2024
Copy link
Contributor

github-actions bot commented Dec 8, 2024

Test Results

   70 files  + 1     70 suites  +1   1m 24s ⏱️ -1s
1 138 tests +27  1 138 ✅ +27  0 💤 ±0  0 ❌ ±0 
1 177 runs  +27  1 177 ✅ +27  0 💤 ±0  0 ❌ ±0 

Results for commit 7095c3b. ± Comparison against base commit 5a9b0ba.

This pull request removes 199 and adds 70 tests. Note that renamed tests count towards both.
                                    { "id":…, withTemporalValues=true, withAudit=false, expectation={
                      "@id": "https://uri…
                      "@type": "@json",
                      …
                    "@value": "/A/B"
                    "@value": "/C/D"
                    "@value": 20
                    "…
                    {
                  "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
…
com.egm.stellio.search.authorization.service.EntityAccessRightsServiceTests ‑ getSubjectAccessRights should include deleted entities if it is asked for()
com.egm.stellio.search.authorization.service.EntityAccessRightsServiceTests ‑ getSubjectAccessRights should not include deleted entities if it is not asked for()
com.egm.stellio.search.authorization.web.EntityAccessControlHandlerTests ‑ get authorized entities should ask for deleted entities if includeDeleted query param is true()
com.egm.stellio.search.authorization.web.EntityAccessControlHandlerTests ‑ get authorized entities should not ask for deleted entities if includeDeleted query param is not provided()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should delete an attribute in merge operation if its value is NGSI-LD null()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should delete an attribute in partial attribute update operation if its value is NGSI-LD null()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should delete an attribute in update operation if its value is NGSI-LD null()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should flag and audit a deleted attribute()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should flag and audit all deleted attributes of an entity()
com.egm.stellio.search.entity.service.EntityAttributeServiceTests ‑ it should flag and audit all instances of a deleted attribute()
…

♻️ This comment has been updated with latest results.

@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch 3 times, most recently from 00d12a8 to 807172e Compare December 14, 2024 16:11
@bobeal bobeal self-assigned this Dec 17, 2024
@bobeal bobeal added core Relates to core API temporal Relates to temporal API labels Dec 17, 2024
@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch from 44d85c2 to 34f39d7 Compare December 19, 2024 05:52
@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch 4 times, most recently from aa4e834 to d522201 Compare December 23, 2024 11:00
@bobeal bobeal marked this pull request as ready for review December 23, 2024 16:35
Comment on lines +8 to +10
@Testcontainers
@Suppress("UtilityClassWithPublicConstructor")
open class WithKafkaContainer {
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the issue?
Because in kotlin you can only inherit from one class at a time so this will limit what we can do with tests in the futur.

@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch from 8f70cea to 9fdb2cc Compare January 3, 2025 08:32
@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch from 5289ca9 to c7cf30c Compare January 6, 2025 14:59
bobeal added 2 commits January 6, 2025 17:23
- add support for deletedAt temporal property
- permanently delete attributes when deleted from temporal endpoint
- filter deleted attributes and entities in discovery endpoints
- excluded deleted attributes when building current state of an entity
- handle previous deleted attributes when creating a new one
- do not filter deleted attributes / entities in temporal queries
- add support for NGSI-LD Null in Merge Entity operation
- add support for NGSI-LD Null in Update Attributes operation
- add support for NGSI-LD Null in Partial Attribute Update operation
- add support for Deleted events in event service
- align scope history with new history management
- gdpr: permanently delete entities when cascading deletion of an user
- authz: add option to include deleted entities in get authorized entities endpoint
- add the deleted representation when deleting an entity
* handled in `entityDeleted` notification trigger
* handled in `attributeDeleted` notification trigger
@bobeal bobeal force-pushed the feature/919-add-support-for-ngsild-null branch from c7cf30c to 7095c3b Compare January 6, 2025 16:27
@bobeal bobeal merged commit b9bca70 into develop Jan 6, 2025
11 checks passed
@bobeal bobeal deleted the feature/919-add-support-for-ngsild-null branch January 6, 2025 16:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core Relates to core API feature New feature or request ngsild-1.6.1 temporal Relates to temporal API
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add support for the deletedAt temporal property Add support for NGSI-LD Null (4.5.0 / 5.4)
3 participants