GoogleCloudPlatform / node-red-contrib-google-cloud

Node-RED nodes for Google Cloud Platform
Apache License 2.0
90 stars 57 forks source link

Request: Have gcs-write node notify when it's done writing. #49

Closed jonathanleistikobcx closed 4 years ago

jonathanleistikobcx commented 4 years ago

Howdy,

Thanks for creating a great node toolset. One of my teammates is using the gcs-write node. He asserts that the node does not tell us when it's done writing.

Can you alter the node so it notifies us when it's done writing?

I'm happy to answer any questions you may have.

Thank you,

Jonathan L.

kolban-google commented 4 years ago

Howdy Jonathan. I had to refresh myself on what exactly the logic did. I re-read the docs here and the source code. Exactly as you say, the node simply "terminates" a flow and has no output. Looking at this I think I agree fully that we can do better.

Let me suggest the following as an alteration:

  1. We change the node so that it has a wired output terminal.
  2. The wired output terminal is triggered only when the internal GCS write of the object has completed

This should not negatively effect existing users as there can't be flows that exist today that are expecting alternate output from the node as it produces none today.

If you could review this (or pass it by your teammate) and give it the nod or clarify further what you'd like, I'll turn around the code change super quick.

Neil

jonathanleistikobcx commented 4 years ago

Hi Neil,

Thanks for taking the time to review the code and reply. What you suggest makes perfect sense to me. I'll run it past my teammate (I expect they'll be 100% on-board with your recommendations) and post here when I have more information.

Thanks again,

Jonathan

jonathanleistikobcx commented 4 years ago

Hello Neil,

To quote my teammate: "Sounds perfect and a wonderful outcome!"

So yes -- Please and thank you. :)

Jonathan L.

kolban-google commented 4 years ago

Howdy Jonathan, The code changes have been made and I performed local test and all appears well (fingers crossed). We have now pushed version 0.0.12 which now provides a GCS Write node that has an output terminal that is triggered ONLY when the data has been fully written (synched/flushed) to GCS. Please give it a spin and post back when ready. I'll leave the issue fully open until I positively hear back that all is well. If there is ANYTHING at all that doesn't feel right or can be improved in the solution, let us know and we'll do what ever is necessary to delight you.

Neil

jonathanleistikobcx commented 4 years ago

Hi Neil,

Stellar! Thank you very much. I'll let my teammate know, they'll test it out, and I'll loop back to let you know what transpires.

If I meet you at an Austin-area gathering/meetup, I owe you a beer. :)

Jonathan L.

jonathanleistikobcx commented 4 years ago

Hello Neil,

Apologies for my delayed reply. On Friday the 20th, my engineering team reported that your changes are working swimmingly. They're very happy and appreciative of the work y'all did.

Thank you very much!

JAL

kolban-google commented 4 years ago

JAL, That's great news my friend. I'll go ahead and close out this ticket. If ANYTHING ever seems odd or something new comes along, raise a new one and we'll jump to it again. As for the beer ... I'm up in Fort Worth so that's where my meetups are. However, if our paths cross ... will definitely swap coffees :-)

Neil