rcenvironment / rce

Distributed, workflow-driven integration environment
https://rcenvironment.de/
51 stars 16 forks source link

Auto-detect updated components list #63

Open ArneBachmannDLR opened 4 months ago

ArneBachmannDLR commented 4 months ago

I think this is a repost (from Mantis bug tracker times?), but I couldn't find a definite answer.

When updating components.json programmatically, RCE doesn't get notified (on Windows). Only a restart of the running instance will pick up newly published tools. I vaguely remember "this should work usually" with some caveats - can you give an assessment?

Is there an API (right now, not in future versions) to trigger the update and re-populatoin of the tool list?

janflink commented 3 months ago

Hi Arne, the components.json file is currently not intended to be changed programmatically from outside RCE. So RCE will not be notified of changes on any system. There is also currently no API to trigger a reload of this file.

The best way to publish components from e.g. external scripts, is to use the 'components set-auth' command via ssh.

I hope this covers your use case.

ArneBachmann commented 3 months ago

That's what I'm doing ... I create the new tool folder, update components.json and then publish into the auth groups via set-auth

ArneBachmannDLR commented 3 months ago

Wrong account :-p

janflink commented 3 months ago

What is the reason to update the components.json? This file currently only holds the publishing information that are handled by the set-auth command.

ArneBachmannDLR commented 3 months ago

That was they way I got it working before set-auth existed, I assume. Just needed a restart and it worked. The set-auth was only added to my scripts once I supported authorization groups other than public.

janflink commented 3 months ago

Okay, I see. It would also be a good choice to publish components to the public group via the set-auth command. Then, the components are instantly available in the RCE network, without the need of a restart.

ArneBachmannDLR commented 3 months ago

Well this is what I do and it doesn't work. The new tools are only visible after restart, hence this issue.

janflink commented 3 months ago

But in this issue you describe that you first change the components.json file programmatically and then use the set-auth command. Since modifying the file from outside is not intended, this can cause the problem.

ArneBachmannDLR commented 3 months ago

But I already use set-auth, which according to you would overwrite the components.json anyway? Writing over the configuration should therefore be a no-op. I can leave that out from now on, but there is something missing in your explanation.