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
nit: fix autostart not working #2942
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a empty kind file which should be removed.
d42cf18
to
f24cd74
Compare
Something has been nagging me, but please let me know if I'm misunderstanding. My main concern: why is there anything in onMount() in the first place? If I have auto-start off, then shouldn't the provider only start based on a user action? (if the user action makes this page appear, also odd that onMount() would be used) It seems like the auto-start should be in a completely different place in either case (not tied to a particular UI page) and this onMount() doesn't exist. |
100% agree and it's odd that it is there in the first place.. @lstocchi and I are having this discussion now on slack |
So the TLDR on slack is that we require onMount() to exist in order to be able to initialize / interact with the user in terms of initializing each provider. For example, we have initialize and start for Podman / button interaction before we use startProvider(). Makes sense as future features we'd be able to ask the user / interact before actually launching. I've updated the PR to draft and I'll push some new code. |
Ready for review! "Run Podman" or "Run Provider" button's will appear when autostart is false and Podman Desktop appears for the first time. All it needed was an update to Ready for review @lstocchi |
I still face the same issue. If i click on the question is how it should work. Bc if the autostart flag has always priority then it works fine. |
I gave a quick look @lstocchi My question is that it looks like the Dashboard page initialize a map called providerInitContexts setting the mode to I'm wondering why we initialize data to like in Dashboard.svelte:
and ProviderInitUtils having
|
We have no way of knowing if it's been started for the first time, so I think we'd have to update the dashboard with a new value similar to Initialize and Start, what do you think? EDIT: I see @benoitf and I commented at the same time. I'll update this PR so that we add a new value of "DoNothing" and only apply Init / Init and start when the user actually clicks the value. |
Correct. At that time i initialize it to |
### What does this PR do? Fixes autostart not working correctly. This bug occurs during onMount when ProviderConfigured.svelte is loaded and does runProvider without checking the autostart configuration. Very small change / nit. ### Screenshot/screencast of this PR <!-- Please include a screenshot or a screencast explaining what is doing this PR --> ### What issues does this PR fix or reference? <!-- Please include any related issue from Podman Desktop repository (or from another issue tracker). --> Fixes containers#2781 ### How to test this PR? 1. Disable autostart 2. Stop podman machine 3. Exit PD 4. Start PD, it should still stay stopped. <!-- Please explain steps to reproduce --> Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Added DoNothing + changed the line to: Tests done:
|
Removed the lingering comment and have marked this as auto-merge |
* nit: fix autostart not working ### What does this PR do? Fixes autostart not working correctly. This bug occurs during onMount when ProviderConfigured.svelte is loaded and does runProvider without checking the autostart configuration. Very small change / nit. ### Screenshot/screencast of this PR <!-- Please include a screenshot or a screencast explaining what is doing this PR --> ### What issues does this PR fix or reference? <!-- Please include any related issue from Podman Desktop repository (or from another issue tracker). --> Fixes containers#2781 ### How to test this PR? 1. Disable autostart 2. Stop podman machine 3. Exit PD 4. Start PD, it should still stay stopped. <!-- Please explain steps to reproduce --> Signed-off-by: Charlie Drage <charlie@charliedrage.com> * add donothing Signed-off-by: Charlie Drage <charlie@charliedrage.com> * update Signed-off-by: Charlie Drage <charlie@charliedrage.com> --------- Signed-off-by: Charlie Drage <charlie@charliedrage.com>
nit: fix autostart not working
What does this PR do?
Fixes autostart not working correctly.
This bug occurs during onMount when ProviderConfigured.svelte is loaded
and does runProvider without checking the autostart configuration.
Very small change / nit.
Screenshot/screencast of this PR
Screen.Recording.2023-06-20.at.1.50.49.PM.mov
What issues does this PR fix or reference?
Fixes #2781
How to test this PR?
Signed-off-by: Charlie Drage charlie@charliedrage.com