-
Notifications
You must be signed in to change notification settings - Fork 9
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: dev provisioner for postgres #2967
Conversation
resp, err := t.handler.Provision(ctx, connect.NewRequest(&provisioner.ProvisionRequest{ | ||
Module: t.module, | ||
// TODO: We need a proper cluster specific ID here | ||
FtlClusterId: "ftl", |
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.
This is available in the ProjectConfig as "Realm"
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.
👍 I might wire that in in a separate PR. That seems to be a bit of work to get in place properly.
done atomic.Bool | ||
} | ||
|
||
// Provisioner is a provisioner for running FTL locally |
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.
Glorious!
step := &step{resource: r.Resource} | ||
task.steps = append(task.steps, step) | ||
|
||
d.provisionPostgres(ctx, tr, req.Msg.Module, r.Resource.ResourceId, step) |
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.
Does this not return errors?
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.
No, it stores the result to step
which could include an error if the step failed.
Awesome, I'm really looking forward to this going in, it will make life so much nicer for users. |
540cd70
to
2c37798
Compare
0645135
to
842a530
Compare
c8ff500
to
35a524c
Compare
a4e37df
to
ebf83e9
Compare
This contains a bit of refactoring to remove unnecessary
Provisioner
interface, and use the plugin API directly for embedded provisioners.We also extract
SetupDB
fromftl serve
to start the docker image for postgres in thedev
provisioner if it is not running.Next, we should automatically inject the secrets to make the created DB actually usable.