-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Multiple update clients #63
Conversation
Signed-off-by: Jordan Ruthe <jordan.ruthe@gmail.com>
Signed-off-by: Jordan Ruthe <jordan.ruthe@gmail.com>
Its pretty good. I think that it should be possible to add a "git" based client without adding the "repo_info" and "dist_info" sections, putting, putting everything necessary in the [update_manager_client] section. I just need to add some flexibility to how the configuration is parsed. Let me give it some thought on the best approach then we can move from there. |
What if we just got rid of the repo_info and dist_info sections all together? The supplemental configuration could be converted to update_manager_client and loaded as is. While it doesn't have a path or env path like I have documented, we can an if statement to fill in this information for moonraker/klipper. So it'd look something like...
Otherwise I can modify the update manager to have flexibility and pull from the update_manager_client section while leaving the other two sections |
… in one section Signed-off-by: Jordan Ruthe <jordan.ruthe@gmail.com>
Is there an option to perhaps leave existing configs in a working state? I know I have a lot of users that now rely on this update feature - and having it break for all of'em might be painful. What would happen in that scenario, would it update fine - then on restart, throw an incorrect configuration error? Or would it fail silently until the next update when things would not work? Maybe another option would be to have the update itself change the config - so it'd be transparent to users. |
I think that there are ways of doing this without breaking config and without changing the API too much. For example, we can keep What I'm thinking is that we can support something similar to Jordan's latest proposal, however we will keep the "first" client configured in the main [update_manager] section. Then we can transition away from it at a later date. I would also like to abstract a bunch of the options in the "git_repo" type away from the user, as they wouldn't be relevant for client repos. |
Signed-off-by: Jordan Ruthe <jordan.ruthe@gmail.com>
I put the client section back in. For the update_manager_client block, I'm not sure that I could do more abstraction. Here is a sample block I've tested, and I feel like everything is needed except possibly the venv_args.
|
Ok, I had some time to work on this. I took this pull request and made some changes to it:
As before, this will change the response to The branch is dev-update-manager-multiclient. @meteyou @cadriel When this is merged it will break update functionality in your clients, so I will hold off until you are ready. @jordanruthe I haven't tested this for a "git repo" client, but it should generally work the same as before. I'll try to install KlipperScreen on a test machine and make sure it behaves. |
Sounds good - I'll take a look some time this week time permitting. Cheers! |
Ok, I've taken a quick look. I have another branch ready to push as a patch for when this gets merged. Otherwise all good this side! |
Looks like it works properly for updating a git repo. However, the web api documentation needs to be updated in your branch, specifically: https://github.com/Arksine/moonraker/blob/dev-update-manager-multiclient/docs/web_api.md#update-client It's missing the reference to |
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Multi-client functionality has now been added |
Thanks! |
First attempt at allowing moonraker to have multiple client statements. Also enabling updates for git repositories (use case being KlipperScreen). Let me know any questions you may have.