Skip to content

UNOMI-875: REST delete routes, IT closure, and Postman docs (PR9)#819

Open
sergehuber wants to merge 4 commits into
masterfrom
UNOMI-875-pr9-3dev-closure
Open

UNOMI-875: REST delete routes, IT closure, and Postman docs (PR9)#819
sergehuber wants to merge 4 commits into
masterfrom
UNOMI-875-pr9-3dev-closure

Conversation

@sergehuber

Copy link
Copy Markdown
Contributor

Plain-language summary

Some delete operations for events and sessions were only available through the admin shell, not through the REST API. Operators and integrators could not remove those items over HTTP even though the server already supported it internally.

This PR adds those REST delete routes, adds integration tests for event-collector explain mode and the list-invalid-objects shell command, and updates the Postman collection so the new routes are documented.

What changed

  • Add DELETE /cxs/events/{id} on the events REST endpoint.
  • Add DELETE /cxs/profiles/sessions/{sessionId} on the profiles REST endpoint.
  • Add EventsCollectorIT tests for explain mode with private key (200 + tracing) and public key (403).
  • Add OtherCommandsIT.testListInvalidObjects for unomi:list-invalid-objects.
  • Document delete event and delete session in Postman collection and readme.

Test plan

  • mvn -pl rest test-compile -DskipTests
  • mvn -pl itests test-compile -DskipTests -Pintegration-tests
  • CI integration tests (EventsCollectorIT, OtherCommandsIT)

References

UNOMI-875

Expose DELETE routes for events and sessions that shell CRUD already used,
port event-collector explain and list-invalid-objects integration tests,
and document the new REST operations in Postman.
Add unomi-tracing-api to itests test classpath so EventCollectorResponse
getRequestTracing() resolves TraceNode at test-compile time.
…rden invalid-objects test

Adds ITs exercising DELETE /cxs/events/{id} and DELETE /cxs/profiles/sessions/{sessionId}
end-to-end, seeds a real invalid rule in testListInvalidObjects so its assertions aren't
tautological, and adds the missing eventId Postman collection variable.
… round-trip

- ElasticSearchPersistenceServiceImpl.remove() targeted the wildcard search
  pattern instead of the write alias for rollover types, so ES silently failed
  to delete events/sessions while still reporting 204 (found via the new
  delete-endpoint ITs, OpenSearch was unaffected).
- OpenSearch ISM policy now includes an ism_template so indices created by
  ISM's own rollover action get managed too, not just the first index Unomi
  creates directly.
- TraceNode's computed duration getter broke JSON round-tripping; add
  jackson-annotations to tracing-api and @JsonIgnoreProperties(ignoreUnknown)
  to tolerate it.
- Fix testListInvalidObjects to seed state via TypeResolutionService directly
  instead of rulesService.setRule(), which throws for a never-before-seen
  invalid rule instead of marking it invalid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant