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

Auto-detect updated components list #63

Open
ArneBachmannDLR opened this issue May 31, 2024 · 9 comments
Open

Auto-detect updated components list #63

ArneBachmannDLR opened this issue May 31, 2024 · 9 comments

Comments

@ArneBachmannDLR
Copy link

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?

@ArneBachmannDLR ArneBachmannDLR changed the title Auto-detect updated componets list Auto-detect updated components list May 31, 2024
@janflink
Copy link
Member

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
Copy link

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
Copy link
Author

Wrong account :-p

@janflink
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

@janflink
Copy link
Member

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
Copy link
Author

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.

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

3 participants