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

Bugs in Ferryman transformations #1361

Closed
weberjm opened this issue Nov 25, 2021 · 0 comments · Fixed by #1362
Closed

Bugs in Ferryman transformations #1361

weberjm opened this issue Nov 25, 2021 · 0 comments · Fixed by #1362
Assignees
Labels
bug Something isn't working Cloud Ecosystem Core Member ferryman

Comments

@weberjm
Copy link
Member

weberjm commented Nov 25, 2021

Bug 1.

Currently, in ferryman, when a message is received on the queue, the content buffer is decrypted and then passed to the callback function:

async processMessageAndMaybeShutdownCallback(payload, message) {
try {
return await this.processMessage(payload, message);

In this scenario, the "message" variable is the entire queue message, and the "payload" variable is the decrypted content, which matches the declared message format {"attachments":{...},"data":{...},"metadata":{...}}. However, when checking whether to call the transform() function on the message, if it is a "before" transform, then the "message" object is passed, instead of the "payload" object. This causes the message to be unreadable when it reaches the actual action function.

Bug 2.

When inside of a transform, and the user wants to save the pre-transformed data to the raw-data-storage, the emitter currently sends:

this.emit('raw-record', {
rawRecordId,
payload: object.body
});

As written above, the body key does not exist on the message object. This function needs to then be changed to send object.data instead of object.body in the payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cloud Ecosystem Core Member ferryman
Development

Successfully merging a pull request may close this issue.

2 participants