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

feat: ftl dev now using buildengine #1028

Merged
merged 1 commit into from
Mar 7, 2024
Merged

feat: ftl dev now using buildengine #1028

merged 1 commit into from
Mar 7, 2024

Conversation

wesbillman
Copy link
Collaborator

Still a bit more to do here + some testing, but wanted to push up progress.

ftl dev ../ftl-examples/online-boutique/backend/services examples/go --recreate

info: Starting FTL with 1 controller(s) and 0 runner(s)
info:controller0: Web console available at: http://localhost:8892
info:time: Building module
info:cart: Building module
info:ad: Building module
info:currency: Building module
info:time: Deploying module
info:ad: Deploying module
info:cart: Deploying module
info:currency: Deploying module
info:controller0: Deployed currency-f4a032646d
info:controller0: Deployed time-ca2556f75d
info:controller0: Deployed cart-c9a2f125f9
info:controller0: Deployed ad-54a5b61320
info:shipping: Building module
info:payment: Building module
info:echo: Building module
info:productcatalog: Building module
info:echo: Deploying module
info:shipping: Deploying module
info:payment: Deploying module
info:productcatalog: Deploying module
info:controller0: Deployed payment-1f2ad7da27
info:controller0: Deployed productcatalog-f281d20587
info:controller0: Deployed shipping-47764b1f31
info:controller0: Deployed echo-88d74d32f8
info:recommendation: Building module
info:checkout: Building module
info:recommendation: Deploying module
info:checkout: Deploying module
info:controller0: Deployed checkout-ed4e646ba2
info:controller0: Deployed recommendation-bc93fb4a09
info:time: Building module
info:time: Deploying module

@alecthomas alecthomas mentioned this pull request Mar 6, 2024
return e.buildWithCallback(ctx, func(ctx context.Context, module Module) error {
return Deploy(ctx, module, replicas, waitForDeployOnline, e.client)
}, modules...)
}

// Dev builds all specified modules and watches for changes in the engine.Dirs, redeploying as necessary.
func (e *Engine) Dev(ctx context.Context, period time.Duration, modules ...string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was a mistake having Add(), instead I think we should just pass the directories to watch, into the constructor. That will eliminate the need for Add() entirely, and the modules here, and simplify things quite a bit.

modules.RemoveModule(dir)
}
}
return nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much deleted code!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all that sweet sweet buildengine magic now :)

@wesbillman wesbillman force-pushed the ftl-dev-buildengine branch from 53b8bc6 to dd9fa51 Compare March 6, 2024 23:36
@wesbillman wesbillman marked this pull request as ready for review March 6, 2024 23:39
@wesbillman wesbillman force-pushed the ftl-dev-buildengine branch from dd9fa51 to c2ce044 Compare March 6, 2024 23:40
@wesbillman wesbillman merged commit db9acb4 into main Mar 7, 2024
11 checks passed
@wesbillman wesbillman deleted the ftl-dev-buildengine branch March 7, 2024 00:33
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

Successfully merging this pull request may close these issues.

2 participants