ravendb / ravendb-nodejs-client

RavenDB node.js client
MIT License
63 stars 32 forks source link

Fix payload mapping for mentorNode in ETL configuration #353

Closed nickchampion closed 1 year ago

nickchampion commented 1 year ago

I believe this mapping is wrong, the studio uses MentorNode not MentorName and when I create / update an ETL task via the node client the responsible node for the task is not set correctly.

Also not sure whether SubscriptionState should have a mentorNode instead of mentorName field, let me know and I can update the PR

src/Documents/Subscriptions/SubscriptionState.ts

export interface SubscriptionState {
    query: string;
    changeVectorForNextBatchStartingPoint: string;
    subscriptionId: number;
    subscriptionName: string;
    mentorName: string;
    nodeTag: string;
    lastBatchAckTime: string;
    lastClientConnectionTime: string;
    disabled: boolean;
}
ml054 commented 1 year ago

Hi @nickchampion

Thanks for catching this.

You are absolutely right, second place should be changed as well. It is c# version: https://github.com/ravendb/ravendb/blob/f5f77ef8c11b84a0d90de13b7c4edfcb600affd0/src/Raven.Client/Documents/Subscriptions/SubscriptionState.cs#L20

nickchampion commented 1 year ago

No problem @ml054 I've updated the PR with the change. Thanks

ml054 commented 1 year ago

Thanks Running tests and we are ready for merge.

ml054 commented 1 year ago

@nickchampion Merged. Thanks for your contribution.