-
Notifications
You must be signed in to change notification settings - Fork 845
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
feat: provider requirement handling #1300
Conversation
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
@Tpuljak please have a look, i have been able to implement them in the rpc, and client setups, but i havent yet implemeted it in the main cli yet, i was having come nil pointer error when i tried testing it out locally , so i think its best the setups get merged then i can perform the calls to the i have also pushed a pr in the docker provider this is what i am referring to in the server.go , i will add this to handle the requirement checks infoColor := color.New(color.FgHiBlue).SprintFunc()
warningColor := color.New(color.FgRed).SprintFunc()
p := RequirementProvider{}
requirements, err := p.Provider.CheckRequirements()
if err != nil {
return err
}
if requirements == nil {
}
for _, req := range *requirements {
if req.Met {
allRequirementsMet = true
fmt.Printf("%s[0000] Requirement met: %s\n", infoColor("INFO"), req.Reason)
} else {
allRequirementsMet = false
fmt.Printf("%s[0000] Requirement not met: %s\n", warningColor("WARNING"), req.Reason)
}
if !allRequirementsMet {
return fmt.Errorf(" Daytona server startup aborted, one or more requirement not met")
}
} |
Signed-off-by: Philip-21 <[email protected]>
@Philip-21 nice work. It seems to be going in the right direction.
This should also be added in this PR. We will release Daytona and the Providers on the same day so both should be in sync.
Also, instead of this, use P.S. You will need to raise a PR in all our available providers for this to go through. |
Thank you |
Alright, i will add for the other providers to, i have to just look into them and study their sdk abit, since these other providers are cloud based . |
Alright this is fine, |
so @Tpuljak it means we have to implement for all other providers, if not i can't perform the call to the |
Yes, you will have to implement the method in all other providers to satisfy the interface. |
They have all been implemented and referenced here |
Signed-off-by: Philip-21 <[email protected]>
So it should be performed in the |
Yes |
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
@Tpuljak I have made changes |
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
Signed-off-by: Philip-21 <[email protected]>
@Philip-21 code looks good. Nice work! Since this requires all our providers to be updated as well, we won't merge this today. Instead, we can approve and merge after our release on Tuesday and queue this for Friday's release. |
Alright thanks alot @Tpuljak for putting me through. |
No problem. Glad to see that! |
@Philip-21 can you please link all provider PRs in a single comment. Additionally, since we released the GCP and Hetzner providers in the meantime, they should also have a PR for this. |
Alright I am on it . I would implement the new providers and link everything here |
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.
Nice work! Apologies for the long wait for approval. We'll get this merged and released today. Thanks!
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.
@Philip-21 please address these 2 comments before we give final approval.
Signed-off-by: Philip-21 <[email protected]>
No problem, i have attended to the changes requested |
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.
Nice work!
Description
Requirement checks are added for providers before daytona starts, also a continuation of #1222
This PR addresses issue #673
Related Issue(s)
This PR addresses issue #673
BREAKING CHANGES
Before running the Server again, all providers will need to be removed by running the following command:
Linux:
Mac:
Windows (PowerShell):
Remove-Item -Recurse -Force "C:\Users\<USERNAME>\AppData\Roaming\daytona\providers\*-provider\*-provider.exe"
After updating and starting the server. You can reinstall your providers with
daytona provider install