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

Feature/distributed create entity #1321

Merged
merged 33 commits into from
Feb 7, 2025

Conversation

thomasBousselin
Copy link
Contributor

@thomasBousselin thomasBousselin commented Jan 20, 2025

Still missing :

  • test for EntityHandler create
  • test for DistributedEntityProvisionService

@github-actions github-actions bot added the feature New feature or request label Jan 20, 2025
Copy link
Contributor

github-actions bot commented Jan 20, 2025

Test Results

   71 files  + 1     71 suites  +1   1m 30s ⏱️ -1s
1 160 tests +12  1 160 ✅ +12  0 💤 ±0  0 ❌ ±0 
1 199 runs  +12  1 199 ✅ +12  0 💤 ±0  0 ❌ ±0 

Results for commit ee26f8d. ± Comparison against base commit aaf79ce.

This pull request removes 187 and adds 45 tests. Note that renamed tests count towards both.
                           …, temporalRepresentation=TEMPORAL_VALUES, 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.csr.model.ContextSourceRegistrationTests ‑ getAssociatedAttributes should check properties and relationship separately()
com.egm.stellio.search.csr.model.ContextSourceRegistrationTests ‑ getAssociatedAttributes should not get Attributes for non matching registrationInfo()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ distributeCreateEntityForContextSources  should return the remainingEntity()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ distributeCreateEntityForContextSources should remove the attrs even when the csr is in error()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ distributeCreateEntityForContextSources should return null if whole entity has been processed()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ distributeCreateEntityForContextSources should return only non processed attributes()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ distributeCreateEntityForContextSources should update the result()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ postDistributedInformation should process badly formed errors()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ postDistributedInformation should return a GatewayTimeout error if it receives no answer()
com.egm.stellio.search.csr.service.DistributedEntityProvisionServiceTests ‑ postDistributedInformation should return the received error()
…

♻️ This comment has been updated with latest results.

@thomasBousselin thomasBousselin force-pushed the refactor/filter-attributes-signature branch 2 times, most recently from dc83f2a to 0942d7c Compare January 20, 2025 14:45
Base automatically changed from refactor/filter-attributes-signature to develop January 20, 2025 14:56
@thomasBousselin thomasBousselin force-pushed the feature/distributed-create-entity branch from 9dd9607 to 487d0a9 Compare January 20, 2025 14:57
@thomasBousselin thomasBousselin linked an issue Jan 21, 2025 that may be closed by this pull request
@thomasBousselin thomasBousselin self-assigned this Jan 21, 2025
@thomasBousselin thomasBousselin force-pushed the feature/distributed-create-entity branch from c785fa5 to a7699c4 Compare January 22, 2025 09:22
@thomasBousselin thomasBousselin marked this pull request as ready for review January 24, 2025 09:53
@thomasBousselin thomasBousselin added the csr Relates to context sources (registrations) API label Jan 24, 2025
@thomasBousselin thomasBousselin force-pushed the feature/distributed-create-entity branch from 4ecbc64 to 5be9d25 Compare February 5, 2025 16:00
@Test
fun `postDistributedInformation should process badly formed errors`() = runTest {
val csr = gimmeRawCSR()
val path = "/ngsi-ld/v1/entities"
Copy link
Member

Choose a reason for hiding this comment

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

in a future PR, we should extract these paths into constants, I see them popping a lot recently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, i kind of start doing it for the delete entity.

Comment on lines +265 to +267
assertEquals(response.leftOrNull()?.type, ErrorType.BAD_GATEWAY.type)
assertEquals(response.leftOrNull()?.status, HttpStatus.BAD_GATEWAY)
assertEquals(response.leftOrNull()?.detail, invalidErrorResponse)
Copy link
Member

Choose a reason for hiding this comment

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

the asserts are not in the correct order (it is always (expected, actual))

Copy link
Member

@bobeal bobeal left a comment

Choose a reason for hiding this comment

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

OK once the last suggestions have been handled

thomasBousselin and others added 4 commits February 7, 2025 17:17
…ice/DistributedEntityProvisionServiceTests.kt

Co-authored-by: Benoit Orihuela <[email protected]>
* feat:support for local parameter

* feat:support for local parameter

* fix: apply local on true

* fix: apply local on true

* fix: apply local on true

* fix: apply local on true

* fix: issue with rebase

* fix: detekt after suggestion
Copy link

sonarqubecloud bot commented Feb 7, 2025

@thomasBousselin thomasBousselin merged commit 65b2b21 into develop Feb 7, 2025
11 checks passed
@thomasBousselin thomasBousselin deleted the feature/distributed-create-entity branch February 7, 2025 17:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
csr Relates to context sources (registrations) API feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement csr for createEntity endpoint
3 participants