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

Updating built-in projection $by_correlation_id corrupts it #243

Open
JBBianchi opened this issue Feb 25, 2023 · 1 comment
Open

Updating built-in projection $by_correlation_id corrupts it #243

JBBianchi opened this issue Feb 25, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request subsystem/projections

Comments

@JBBianchi
Copy link

When updating the built-in projection $by_correlation_id via the UI with the value:

{"correlationIdProperty":"subject"}

It works, and the logs show:

[    1,21,18:16:13.724,INF] Updating '"$by_correlation_id"' projection source to '"{\"correlationIdProperty\":\"subject\"}"' (Requested type is: 'null')

When using the GRPC method EventStoreProjectionManagementClient.UpdateAsync

await this.EventStoreProjectionManagementClient.UpdateAsync("$by_correlation_id", "{\"correlationIdProperty\":\"subject\"}", true, cancellationToken: cancellationToken);

the update is "successful" but it corrupts the projections (turns it into a "JS" projection):

[    1,20,18:22:36.724,INF] Updating '"$by_correlation_id"' projection source to '"{\"correlationIdProperty\":\"subject\"}"' (Requested type is: '"JS"')
[    1,20,18:22:36.773,ERR] The '"$by_correlation_id"' projection faulted due to '"Line 1: Unexpected token :"'

To Reproduce
Steps to reproduce the behavior:

  1. Update the projection $by_correlation_id via GRPC
await this.EventStoreProjectionManagementClient.UpdateAsync("$by_correlation_id", "{\"correlationIdProperty\":\"subject\"}", true, cancellationToken: cancellationToken);

Expected behavior
The projection not to get corrupted/turned into a JS projection or to have the opportunity to select the "requested type" via GRPC.

Actual behavior
The projection is turned to JS.

EventStore details

  • EventStore server version: 22.10.1.0

  • Operating system: Win 11 x64

  • EventStore client version (if applicable): EventStore.Client.ProjectionManagement, Version=22.0.0.0

@JBBianchi JBBianchi changed the title Corrupted built-in projection $by_correlation_id after update Updating built-in projection $by_correlation_id corrupts it Feb 25, 2023
@hayley-jean hayley-jean added bug Something isn't working subsystem/projections labels Feb 27, 2023
@hayley-jean
Copy link
Member

Thank you for reporting this @JBBianchi !

At the moment, the gRPC clients do not support updating system projections

That being said, the server should not have accepted the update to the system projection's handler type.
I've created an issue for that on the server here: EventStore/EventStore#3751

I'm going to leave this issue open until the functionality to update a system projection is available in the dotnet gRPC client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request subsystem/projections
Projects
None yet
Development

No branches or pull requests

2 participants