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

Implement RFC 021 Projections api #241

Merged
merged 1 commit into from
Nov 17, 2021
Merged

Conversation

George-Payne
Copy link
Member

@George-Payne George-Payne commented Nov 9, 2021

This PR implements only the parts of RFC021 currently supported via GRPC.

  • Create:
    • Rename createContinuousProjection to createProjection
    • Remove createOneTimeProjection
    • Remove createTransientProjection
  • List:
    • Rename listContinuousProjection to listProjection
    • Remove listOneTimeProjection
    • Remove listTransientProjection
  • Details:
    • remove mode from ProjectionDetails
    • delete CONTINUOUS ONE_TIME & TRANSIENT constants
  • Update:
    • Rename trackEmittedStreams to emitEnabled (Was incorrectly named, trackEmittedStreams to be added in future version.)
  • Reset:
    • remove writeCheckpoint option (had no effect)
  • Disable:
    • In disableProjection remove writeCheckpoint option. (Always true)
    • Add abortProjection method. (writeCheckpoint always false)
  • Tests:
    • Update tests to match updated behaviour
    • Gate fuzzy disable test matching behind server version, for stricter tests on known good server implementations
  • Samples:
    • Update samples to match new API

RFC: https://github.com/EventStore/architecture-and-planning/blob/main/rfcs/021%20-%20gRPC%20Projections.md

@@ -8,10 +8,10 @@ import { debug, convertToCommandError } from "../utils";

export interface UpdateProjectionOptions extends BaseOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

COMMENT: To have RFC fully implemented, TrackEmittedStreams has to be added.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, this PR only covers the parts of the RFC currently supported by the server over GRPC (TrackEmittedStreams is missing in the protos). I should probably update the wording of the PR to mention that (the decision to "polyfill" the gaps was made after this PR).

@oskardudycz
Copy link
Contributor

Based on the updates in https://github.com/EventStore/architecture-and-planning/pull/46/files. Some implementation will need to be aligned, like adding missing methods: GetConfig, GetQuery, GetStatus, etc. Still, this can be handled in a separate PR.

I think that setting default values to Delete projection parameters to false could be included here (see: https://github.com/EventStore/architecture-and-planning/pull/46/files#diff-1af18be3bf99a6d073701661e1e26f3722ac2a936aa260544f5b4b2cbffbd923R43).

- Create:
	- Rename `createContinuousProjection` to `createProjection`
	- Remove `createOneTimeProjection`
	- Remove `createTransientProjection`
- List:
	- Rename `listContinuousProjection` to `listProjection`
	- Remove `listOneTimeProjection`
	- Remove `listTransientProjection`
- Details:
	- remove `mode` from `ProjectionDetails`
	- delete `CONTINUOUS` `ONE_TIME` & `TRANSIENT` constants
- Update:
	- Rename `trackEmittedStreams` to `emitEnabled` (Was incorrectly named, `trackEmittedStreams` to be added in future version.)
- Reset:
	- remove `writeCheckpoint` option (had no effect)
- Disable:
	- In `disableProjection` remove `writeCheckpoint` option. (Always true)
	- Add `abortProjection` method. (`writeCheckpoint` always false)
- Delete:
	- `deleteEmittedStreams` defaults to `false`
	- `deleteStateStream` defaults to `false`
	- `deleteCheckpointStream` defaults to `false`
- Tests:
	- Update tests to match updated behaviour
	- Gate fuzzy disable test matching behind server version, for stricter tests on known good server implementations
- Samples:
	- Update samples to match new API
@George-Payne
Copy link
Member Author

Adding missing methods: GetConfig, GetQuery, GetStatus, etc. Still, this can be handled in a separate PR.

I've updated the PR body to mention that this PR only covers the parts currently supported over GRPC.

I think that setting default values to Delete projection parameters to false could be included here

Good spot, updated.

@oskardudycz
Copy link
Contributor

oskardudycz commented Nov 17, 2021

@George-Payne, good to go from my end 👍 Some test for 21.10 is failing (I'm not sure if it's a flakey one).

@pvanbuijtene pvanbuijtene merged commit e075915 into master Nov 17, 2021
@pvanbuijtene pvanbuijtene deleted the RFC-021-projections branch November 17, 2021 12:44
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.

5 participants