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

Unexpected behavior when deploying only the modified flows #197

Closed
xoancosmed opened this issue Aug 2, 2021 · 4 comments
Closed

Unexpected behavior when deploying only the modified flows #197

xoancosmed opened this issue Aug 2, 2021 · 4 comments

Comments

@xoancosmed
Copy link

I'm used to use the "Modified Flows" option when deploying my flows in Node-RED. However, if I do this after adding a new receiver (or command) node, this makes the older receiver (or command) nodes to stop working.

I don't think this is a critical issue, as to fix it is enough to stop using the "Modified Flows" option when deploying your flow changes, but I didn't see the issue mentioned anywhere in the documentation. Is this a known issue? Is expected to be fixed? If so, I think it should be added to the documentation (I can create a PR).

My apologies if this is not the right place to discuss this. And thank you very much for taking your time in reading this note.

How to reproduce

  1. Create a fresh Node-RED instance:

    docker run -it -p 1880:1880 --name mynodered nodered/node-red
    
  2. Install the node-red-contrib-telegrambot palette:

    "dependencies": {
        "node-red-contrib-telegrambot": "~10.0.4"
    }
    
  3. Create a testing bot using @BotFather:

    /newbot
    (Send a name for the bot)
    (Send the alias of the bot)
    (Copy the bot token)
    
  4. In the Node-RED flow, add a command node, doble clic on it and add the bot settings:

Captura de pantalla 2021-08-02 a las 20 19 56

  1. Save the changes and write the command that node will handle:

Captura de pantalla 2021-08-02 a las 20 20 31

  1. Add a debug node to the first output of the command node:

Captura de pantalla 2021-08-02 a las 20 26 28

  1. Make the first deploy:

Captura de pantalla 2021-08-02 a las 20 26 48

  1. Add a second command node with a different command:

Captura de pantalla 2021-08-02 a las 20 21 46

  1. Add debug nodes to the first output of the new command node:

Captura de pantalla 2021-08-02 a las 20 28 53

  1. Deploy using the "Modified Flows" option:

Captura de pantalla 2021-08-02 a las 20 29 01

  1. Test sending messages to the bot:

    A) If you send /world, the last command we deployed, you'll see the messaged printed in the debug window.
    B) If you send /hello, the first command we deployed, you won't see anything in Node-RED's debug window.

My testing setup

I tested it in both a Respberry Pi 4 (Node-RED comes pre-installed; using the latest Node stable version) and using the official Docker image. Using node-red-contrib-telegrambot version 10.0.4 in both scenarios.

In case it depends, my web browser is Firefox 89.0.2 (in macOS and Manjaro).

@windkh
Copy link
Owner

windkh commented Aug 2, 2021

Yes that is a known issue for ages. However I can not really tell you why it occurs. Maybe I should just try to debug that once again…. in the meantime extending the readme with a hint would be a useful alternative

windkh added a commit that referenced this issue Aug 2, 2021
@windkh
Copy link
Owner

windkh commented Aug 2, 2021

I improved some register/unregister-event things inside the command nodes.
In addition to that I tried to reproduce your scenario. At least on my machine it sseems to work.
@xoancosmed can you test that for me on your machine?

Should work in 10.0.5 (hopefully :) )

@xoancosmed
Copy link
Author

Good afternoon. Sorry for the delay. I've being testing it several time and now seems to work perfectly for me using the partial deploy. Thank very much your help and time.

@windkh
Copy link
Owner

windkh commented Aug 3, 2021

@xoancosmed ah cool!

@windkh windkh closed this as completed Aug 3, 2021
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

No branches or pull requests

2 participants