Releases: encoredev/encore
Import existing Kubernetes Clusters (GKE) and Webhooks Support
Encore now supports deploying to existing Kubernetes clusters on Google Cloud Platform. 🎉
This means, if you have a pre-existing Kubernetes cluster, it is now much easier to adopt Encore. You can simply deploy your Encore application to your pre-existing cluster alongside your other applications.
To import a cluster: Go to Create Environment in the Cloud Dashboard, select Kubernetes: Existing GKE Cluster as the compute platform, and finally specify your cluster's Project ID
, Region
, and Cluster Name
.
Webhooks Support
We've finally added support for receiving webhooks from the Encore Platform!
Admins can manage webhooks by going to: Settings > Integrations > Webhooks in the Cloud Dashboard.
The initial set of webhooks center around rollouts, providing notifications related to builds, infra provisioning, and deployments. Use cases for these events include:
- Setting up alerts for build/deploy failures
- Notifications for when a deploy is awaiting infrastructure approval
- Seeding Preview Environments with test data
To make it easier to consume webhooks, we've published a Go module (go.encore.dev/webhooks
) that provides type definitions and documentation of the various events. We'll keep this updated over time as we add support for additional webhook events. For security reasons, Encore provisions a dedicated secret key for every webhook and signs every webhook request with said key. The provided webhooks.ParseEvent
validates the webhook signature as part of its processing, ensuring the webhooks are coming from Encore and not elsewhere.
Thanks to all contributors!
We rely on the community to improve Encore, and we continue to be overwhelmed by your support and encouragement.
Thank you Juan Álvarez, Will Demaine, Jakob Nordfeldt, MaxD, and Jamie MacLeod for your ideas in the new #suggestions Slack channel! ✨
What’s next
Right now we're working on adding support for deploying to Kubernetes on AWS, gRPC, and much more. Remember to vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or just email us at [email protected].
We’re excited to hear your feedback! ❤️
Catch you in the cloud,
The Encore team
Full Changelog: v1.21.2...v1.22.0
Kubernetes Support on GCP, Improved Infrastructure Approval, Remote Device Login, and more
As with all things Kubernetes, this release took a lot of work!
Finally, we're happy to share that Encore now supports deploying to Kubernetes on GCP (AWS is coming soon).
Here's what you need to know:
- When you create a new GCP environment, you can now choose your desired compute platform: Cloud Run, GKE Autopilot, or GKE Standard.
- As you would expect, Encore provisions all the necessary infrastructure, IAM, and orchestrates deployments to Kubernetes.
- We'll soon add support for importing self-managed Kubernetes clusters, letting you deploy Encore applications to your existing Kubernetes clusters.
As always, remember to update your CLI: encore version update
– We're looking forward to hearing your feedback on Slack!
Improved Infrastructure Approval Flow
In case you didn't know, Encore lets you require admin approval for deploys that make changes to infrastructure.
We've just shipped some improvements to make this workflow better:
- The infrastructure provisioning UI now gives you more information about the infrastructure changes, including the specific properties being modified.
- If any changes will require downtime (like modifying certain properties on database clusters) there's a new dialog to avoid any nasty surprises.
Remote Device Login Support
The Encore CLI now supports logging in from a different device than where your browser is running, using encore auth login. (The new flow is powered by OAuth2's device authorization standard.) This adds better support for use cases like developing over SSH, and using WSL, GitHub Codespaces/Gitpod, etc.
Remember to update your CLI: encore version update
Improved Pub/Sub Concurrency
Encore now supports configurable Pub/Sub concurrency on a per-subscriber basis, using the MaxConcurrency
field in the pubsub.SubscriptionConfig
. The default value, if not set, is a reasonable default based on the cloud provider. See the package docs for more information.
Thanks to all contributors!
We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Thanks to Neal Lathia, Peter Stewart, Luka Giorgadze, Simon Vans-Colina, Phakorn Kiong, Hussein Badakhchani, Brent Dillingham, Jakob Nordfeldt, and Will Demaine for your ideas, bug reports, and feedback!
What’s next
Right now we're working on adding support for deploying to existing Kubernetes clusters, Kubernetes on AWS, gRPC, and much more. Remember to vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or just email us at [email protected].
We’re excited to hear your feedback! ❤️
Catch you in the cloud,
Marcus & the Encore team
Full Changelog: v1.21.0...v1.21.1
Introducing Infrastructure Configuration, Local Dev Dash Revamp, Enhanced Tracing & More!
It's been a long time coming, but it's finally here: Infrastructure configuration directly from the Encore Cloud Dashboard!
You can now easily configure your AWS and GCP environments' infrastructure settings, including: compute instances, database clusters, and Redis clusters. When you make changes Encore automatically validates the configuration according to each cloud provider's constraints and applies the configuration during the next deploy. This makes it much simpler to manage and track changes as your needs evolve.
infraedit.mp4
Local Development Dashboard Refresh
It's about time the local dev dash got some care and attention. We've made some major upgrades behind the scenes and it now shares most of its components with the Cloud Dashboard. This means it's now also got the latest and greatest functionality like the improved API Explorer and Service Catalog. It'll also make it faster to release further improvements, so expect more to come!
Tracing improvements
As part of our ongoing work to add support for gRPC (more on that soon!), we've taken the opportunity to make some quality-of-life improvements to tracing:
- Traces are now color-coded (e.g. Pub/Sub is always green, and database queries are always yellow)
- Traces with Pub/Sub publish events now link to the corresponding traces for the subscribers
newtracing.mp4
GraphQL Tutorial
We get many questions about using GraphQL in Encore applications. So we've recently published a tutorial on how to build a GraphQL API. We hope you enjoy trying it, and find it helpful when using GraphQL. There is also a GraphQL example app in the example apps repo.
Other improvements & bugfixes
This release brings several other significant improvements:
- Added support for customizing the
fetch
options in the generated TypeScript/JavaScript clients (#737). Thanks @PhakornKiong for the contribution! - Added support for defining Pub/Sub subscription handlers as methods (
pubsub.MethodHandler
) (#739) - Fixed emitting metrics from Pub/Sub subscription handlers (#738)
- Fixed handling of
encore:"optional"
in the generated clients (TypeScript, JavaScript, OpenAPI) (#726)
What’s next
Right now we're working on adding support for deploying to Kubernetes, gRPC, and much more.
Stay tuned and please vote on your favorite feature on the roadmap!
As always, if you have questions, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback! ❤️
Full Changelog: v1.19.0...v1.20.0
Pub/Sub message ordering
We're excited to announce Encore v1.19.0 which brings a highly requested feature: support for message ordering in Pub/Sub!
Ordered topics ensure messages are delivered to subscribers in the order they were delivered (for messages that share the same ordering key). This can make it easier to implement certain use cases where message ordering is important.
Message ordering is not a free lunch and reduces message delivery throughput. To maintain topic order, messages with the same ordering key aren't delivered until the earliest message is processed or dead-lettered, potentially causing delays due to head-of-line blocking. For more information see the docs.
To create an ordered topic, define a message attribute to be used as the ordering attribute. For example:
import "encore.dev/pubsub"
type CartEvent struct {
ShoppingCartID int `pubsub-attr:"cart_id"`
Event string
}
var CartEvents = pubsub.NewTopic[*CartEvent]("cart-events", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.AtLeastOnce,
OrderingAttribute: "cart_id",
})
Remember to first update to the latest version of Encore using encore version update
, and update your dependency on encore.dev
within your app so your IDE sees the new configuration option, using go get -u encore.dev@latest
.
What’s next
We're working on adding more flexibility in controlling underlying infra for individual services, deploying to Kubernetes, and much more. We're also working on bringing a bunch of improvements to the local development dashboard.
Stay tuned and please vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback, and happy Pub/Subbing! ❤️
Exactly-once support for Pub/Sub
We've been hard at work for a little bit on this one, and it's finally here!
Now when you create a Pub/Sub topic, you can specify an exactly-once delivery guarantee:
var Signups = pubsub.NewTopic[*SignupEvent]("signups", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.ExactlyOnce,
})
This provides a much stronger guarantee, backed by the cloud infrastructure used to run your app, that a message published will not be delivered multiple times to your application's subscriptions if processed without an error.
For more information checkout the docs.
Remember to first update to the latest version of Encore using encore version update
, and update your dependency on encore.dev
within your app so your IDE sees the new option using go get -u encore.dev@latest
.
What's next for Pub/Sub
We plan to add support for ordered topics in the coming releases, which will allow you to process events in the order they were published based on a grouping key (e.g. user ID or order ID).
Full Changelog: v1.17.0...v1.18.0
Outboxes, Dashboards & Databases
May is here and here in Sweden we survived the yearly ritual bonfire night unscathed. We're excited to announce Encore v1.17.0 which brings even more features! As always, update with encore version update
, or head over to the install docs to install Encore.
Transactional Outbox
One of the hardest parts of building an event-driven application is ensuring consistency between services. A common pattern is for each service to have its own database and use Pub/Sub to notify other systems of business events. Inevitably this leads to inconsistencies since the Pub/Sub publishing is not transactional with the database writes.
To better handle such use cases, Encore now provides a utility package for implementing the Transactional Outbox pattern. To use it make sure you're on Encore v1.17.0 (this release), then read up on the docs.
Code viewer 2.0
We've spruced up the code viewer over on the Cloud Dashboard. With this update, you now get cross-links to jump between code and the Service Catalog and Tracing. This makes it super quick to navigate between code and API Docs / Traces to see how everything connects. Check out the video below, or head over to the Uptime demo app to see it for yourself.
codeviewer.mp4
Improved database management
Encore now supports creating databases using the new sqldb.NewDatabase
, bringing the encore.dev/storage/sqldb
package in line with the other infrastructure resources. This approach to creating databases is more explicit and better allows for future extensibility than the previous behavior (which implicitly created a database based on the presence of a migrations
folder).
Test-only infrastructure
Encore now supports defining most infrastructure resources in _test.go
files, allowing tests to declare their own infrastructure resources. This allows library code that operates on infrastructure resources to be more easily tested (normal infrastructure resources can only be defined within Encore services). For an example of such a use case see the new transactional outbox tests.
On a related note, most encore db
commands now take an optional --test
flag to connect to test databases.
Client generation service filter
The encore gen client
command now supports filtering which services to be included in the output with the new --services
flag. Thanks @jdbann for the suggestion!
Thanks to all contributors!
We rely on the community to improve Encore, and we continue to be humbled by your incredible support and encouragement. We've had a huge influx of suggestions and feedback recently, so a huge thank you to everyone. In particular, thanks to John Bannister, Juha Ristolainen, Che Sampat, Vilhelm Melkstam, Steven Edwards, Rafal Glowka, George Arscott, and George Antoniadis!
What’s next
We're working on adding more flexibility in controlling underlying infra for individual services, deploying to Kubernetes, and much more. We're also working on bringing a bunch of improvements to the local development dashboard.
Stay tuned and please vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback! ❤️
Cookies, Pub/Sub, test execution speed, and more!
Spring is here and you know what that means! We're excited to announce a series of quality-of-life improvements to the Encore developer experience!
🍪 Cookie support
Cookies can now be used in auth handlers, offering an easy way to authenticate requests via cookies:
type MyAuthParams struct {
// SessionCookie is set to the value of the "session" cookie.
// If the cookie is not set it's nil.
SessionCookie string `cookie:"session"`
}
//encore:authhandler
func AuthHandler(ctx context.Context, p *MyAuthParams) (auth.UID, error) {
// ...
}
To set and read cookies in Encore APIs, use a raw endpoint.
Pub/Sub Topic references
Encore uses static analysis to determine which services are publishing messages to what topics. That information is used to provision infrastructure correctly, render architecture diagrams, and configure IAM permissions. This means that *pubsub.Topic
objects can't be passed around however you'd like, as it makes static analysis impossible in many cases.
To better support use cases like passing topics to library code or using them with dependency injection, Encore now supports the ability
to get a Topic Reference that can be passed around any way you want:
var Signups = pubsub.NewTopic[*SignupEvent]("signups", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.AtLeastOnce,
})
// Create a topic reference that can be passed around arbitrarily
ref := pubsub.TopicRef[pubsub.Publisher[*SignupEvent]](Signups)
For more information see the docs
Fallback routes
Encore now supports defining fallback routes. Fallback routes are similar to wildcard routes,
but they are only matched if no other route matches the request. The primary use case for
fallback routes is to simplify migrating existing backends over to Encore.
With fallback routes you can define a catch-all endpoint that forwards requests to your existing
HTTP router with Encore, and then gradually move over endpoints one by one while preserving
the behavior for the remaining routes. For example:
//encore:api public raw path=/!fallback
func FallbackRoute(w http.ResponseWriter, req *http.Request) {
// Forward the request to the existing router
existingRouter.ServeHTTP(w, req)
}
Test speed
As a side effect of how Encore generated code for running tests the Go compiler ended up needing
to re-link binaries for every package being tested. This caused slow compilation times and slow tests.
We've tweaked Encore's code generation to handle this better, resulting in as much as a 2-3x improvement in test execution speed in many cases!
Panic stack traces
When your API handler panics Encore now displays a much nicer stack trace compared to before, allowing you to more easily pinpoint the issue. This works both in local development (encore run
as well as the local trace viewer) as well as traces in cloud environments.
OpenAPI generator (experimental)
Encore now supports generating an OpenAPI specification for an API, using encore gen client --lang openapi <app-id>
. Let us know what you think about the output and if you'd like to see something improved!
Bugfixes & other improvements
sqldb.DriverConn
now offers a way to get the underlying*pgx.Conn
from a standard library*database/sql.Conn
.- The new Encore parser and runtime is now used everywhere and the old parser and runtime have been deleted, offering better performance and powering many of the features listed above
Thanks to all contributors!
We rely on the community to improve Encore, and we continue to be humbled by your incredible support and encouragement. A massive thank you to Brent Dillingham, Luka Giorgadze, Simon Vans-Colina, Otar Adamia, Phakorn Kiong, George Antoniadis, Jan Brucek, and more!
What’s next
We're working on adding more flexibility in controlling underlying infra for individual services, deploying to Kubernetes, and much more. We're also working on bringing a bunch of improvements to the local development dashboard.
Stay tuned and please vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback! ❤️
Introducing API Explorer 2.0
apiexplorer.mp4
We're excited to announce a significant upgrade to the API Explorer in the Encore Platform!
Thanks to your feedback, we've made these changes for a more seamless workflow:
- Fuzzy search endpoints with ⌘ + K - find what you need, fast!
- Enhanced sidebar navigation - get a better overview at a glance
- Upgraded endpoint testing - save authentication data with ease
- Handy cross-links - view pre-filtered traces & flow diagrams per service/endpoint
- UI facelift & bugfixes - enjoy a cleaner look and smoother experience
- Services & endpoints now get dedicated urls - preparing for future content
Here's some of what we're considering next — let us know if it sounds valuable (or not):
- Cross-linking to code for easy lookups
- A widget displaying the last few traces per endpoint
- Stats & metrics per service/endpoint
Bug-fixes and other improvements
- schemautil: fix infinite recursion in #659
- runtime: fix leveled logging for encore cloud in #660
- Increase test timeout for nightly test that runs multiple times in #661
- builderimpl: always use v2 in #662
- experiment: add beta-runtime experiment in #663
Thanks to all contributors!
We rely on the community to improve Encore, and we continue to be humbled by your incredible support and encouragement. A massive thank you to Patryk Siemiński, Paweł Słomka, Brent Dillingham, Emily Rymer, John Bannister, Mason Stewart, Simon Vans-Colina, Ohm Patel, Jakob Nordfeldt, and many more!
What’s next
We're very close to releasing Encore's V2 parser and major speed improvements to running tests.
We're also working on adding more flexibility in controlling underlying infra for individual services, deploying to Kubernetes, and much more. Stay tuned and please vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback! ❤️
Full Changelog: v1.14.5...v1.15.0
Introducing: Metrics
Having easy access to metrics is a critical part of application observability. Encore now automatically provides metrics for your application for everyday use cases such as Request rate, Memory usage, and Goroutines. These work in all environments and are accessible from the Encore Platform.
By default, Encore also exports metrics data to your cloud provider's built-in monitoring service, so you can easily use your preferred observability tools.
Encore also makes it simple to define custom metrics for your application, which automatically display in the built-in metrics dashboard. Learn more in the docs.
Grafana integration
Many teams already use observability tools like Grafana, so we've added an easy integration to help you get all your metrics in one place. (For fans of Datadog, an integration is coming very soon!)
Other improvements
There's a huge list of improvements since the last release announcement. Here are some highlights:
- Added support for CORS Expose-Headers
- Trace Logs now display as JSON
- Local Dev Dash alerts if the app is not running
- And many smaller improvements and bug-fixes
Full Changelog: v1.13.0...v1.14.4
Secrets 2.0
Introducing Secrets 2.0! 🎉
Encore has had built-in secrets management from day one, but it was quite limited: each secret value only applied to either {production}
environments or to {development,preview,local}
environments. This worked fine for basic use cases but was insufficient for many other use cases. For example, it's common to want a different secret value for local development specifically. In other use cases it was common to want to use the same secret value for all environments, which previously required setting the same value twice.
Today we're excited to announce a much more flexible secrets management experience that better addresses these use cases! Starting today, each secret value can be individually configured to apply to exactly the environment(s) you want.
For example:
# Set for local only
$ encore secret set --type local MySecret
# Set for all environments
$ encore secret set --type prod,dev,pr,local SomeOtherSecret
# Set for all preview environments and the environment named 'staging'
$ encore secret set --type pr --env staging SecretPassword
Read the docs for more information.
There's also a brand new secrets management UI on the Encore Platform:
Redacting sensitive data
Encore now supports redacting sensitive data from traces. Fields marked with the struct tag encore:"sensitive"
(in request/response structs) are automatically redacted. This works for both individual values as well as nested fields.
Note that inputs to auth handlers are automatically marked as sensitive and are always redacted.
Read the docs for more information.
Database driver
The encore.dev/storage/sqldb
package now supports accessing the underlying connection pool using sqldb.Driver
.
See the package documentation for more information.
Bugfixes and other improvements
- Improved API Explorer to use JSON fields instead of struct fields (#577)
- Fixed trace id lookups on the Encore Platform
Thanks to our contributors!
We rely on the community to improve Encore, and we're always amazed by your incredible support and encouragement. A massive thank you to Patryk Siemiński, Mason Stewart, Sami Moustachir, Alex Yakubenko, Sean Knowles, David Mytton, Prasanna Balaji, Gabriel Bellon, and others for your contributions and feedback!
What’s next
We're very close to releasing support for metrics! We're also working on Kubernetes support, using existing infrastructure, and more.
– Remember to vote on your favorite feature on the roadmap!
As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.
We’re excited to hear your feedback! ❤️
Full Changelog: v1.12.1...v1.13.0