Skip to content

resource-aggregate: add Delete call to eventstore#381

Merged
Danielius1922 merged 20 commits into
v2from
feature/delete-device
Aug 18, 2021
Merged

resource-aggregate: add Delete call to eventstore#381
Danielius1922 merged 20 commits into
v2from
feature/delete-device

Conversation

@Danielius1922
Copy link
Copy Markdown
Member

Add Delete call to eventstore which deletes all documents with given groupIds.

Comment thread resource-aggregate/cqrs/eventstore/mongodb/delete.go Outdated
@Danielius1922 Danielius1922 force-pushed the feature/delete-device branch from f63edac to afed5a1 Compare August 6, 2021 15:59
@Danielius1922 Danielius1922 requested a review from jkralik August 9, 2021 08:24
@Danielius1922 Danielius1922 force-pushed the feature/delete-device branch 2 times, most recently from 1837ed5 to 8d755b1 Compare August 10, 2021 11:54
Comment thread grpc-gateway/config.yaml Outdated
Comment thread authorization/service/deleteDevices.go Outdated
Comment thread resource-aggregate/service/deleteDevices.go
Copy link
Copy Markdown
Member

@jkralik jkralik left a comment

Choose a reason for hiding this comment

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

pls fix inconsistency of delete between RA and AUTH service for empty deviceIds.

@ondrejtomcik ondrejtomcik linked an issue Aug 10, 2021 that may be closed by this pull request
Comment thread grpc-gateway/service/deleteDevices.go Outdated
@Danielius1922 Danielius1922 force-pushed the feature/delete-device branch from 815bfbd to 23d5174 Compare August 12, 2021 09:20
Comment thread coap-gateway/service/signOff.go Outdated
@Danielius1922 Danielius1922 requested a review from jkralik August 13, 2021 09:03
Comment thread authorization/client/userDevices.go
@Danielius1922 Danielius1922 force-pushed the feature/delete-device branch from 1e2b86c to 0964760 Compare August 13, 2021 22:05
Comment thread authorization/client/userDevices.go
Comment thread authorization/service/addDevice.go
Comment thread authorization/service/deleteDevices.go
Comment thread authorization/service/deleteDevices.go
Comment thread authorization/service/deleteDevices.go Outdated
Comment thread http-gateway/swagger.yaml Outdated
Comment thread resource-aggregate/.plantuml Outdated
Comment thread resource-aggregate/.plantuml Outdated
Comment thread resource-aggregate/.plantuml Outdated
Comment thread resource-aggregate/.plantuml Outdated
Comment thread authorization/service/deleteDevices.go
Add Delete call to eventstore which deletes all documents
with given groupIds.
Rework Delete call to enable deletion of multiple deviceIds
at the same time.
Previously the implementation ran delete one-by-one
by deviceID and returned a list of device ids that had
at least one document deleted. However, this is not a
useful output because the caller cannot use it to determine
whether all documents with the deviceID were deleted,
or whether documents with given ID were not deleted because
no such documents existed before the call.
Instead of the output from the Delete command the db should
be queried again to get the current state.
Sending DeleteDevicesRequest with empty DeviceIds list
is interpreted as requesting to delete all owned devices
Delete all owned devices if empty deviceIdFilter is
used.
@Danielius1922 Danielius1922 force-pushed the feature/delete-device branch from 0964760 to 1721256 Compare August 17, 2021 23:57
@Danielius1922 Danielius1922 merged commit 1ce2fbf into v2 Aug 18, 2021
@Danielius1922 Danielius1922 deleted the feature/delete-device branch August 18, 2021 12:45
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.

Force device deletion directly from the plgd Cloud

3 participants