ioBroker.javascript icon indicating copy to clipboard operation
ioBroker.javascript copied to clipboard

Script mirroring does not work unless instance is numbered 0

Open agross opened this issue 4 years ago • 6 comments

Describe the bug
The adapter config has options to decide which instance number should do script mirroring. (Which, BTW seems kind of useless as every instance has its own configuration.)

Even if mirroring is enabled, the code to enable mirroring checks if it is instance 0. So despite instance 1 having mirroring enabled, the mirroring code itself would circumvent the user's setting.

Expected behavior

Every instance can mirror scripts, regardless of the instance number.

Versions:

  • Adapter version: 5.2.13

Additional context

https://github.com/ioBroker/ioBroker.javascript/blob/156e870b9e081bb6babcfa850775331cf7da5a84/lib/mirror.js#L16-L19

agross avatar Oct 10 '21 18:10 agross

It is basically not "useless" because the scripts are shared between all javascript instalces, hence exist globally.

Reason for this is that you could use multiple hosts and then mirror the scripts on that host.

But yes seems that something is weird with the setting and this code block

Apollon77 avatar Oct 11 '21 05:10 Apollon77

It is basically not "useless" because the scripts are shared between all javascript instalces, hence exist globally.

I apologize if I have come across as rude. This wasn't my intention.

With this setting in each instance, it should be possible for a user to configure settings that do not make sense:

  • For instance 1 a user may select instance 2 as the one doing the sync
  • For instance 2 a user may select instance 1 as the one doing the sync

Did I understand that correctly?

But yes seems that something is weird with the setting and this code block

Perhaps it is supposed to work as a sanity check for situations like the one outlined above ;-)

agross avatar Oct 11 '21 17:10 agross

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

stale[bot] avatar Apr 16 '22 04:04 stale[bot]

Unstale.

agross avatar Apr 16 '22 04:04 agross

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

stale[bot] avatar May 09 '23 02:05 stale[bot]

Unstale

agross avatar May 09 '23 09:05 agross