github garden-io/garden 0.12.21

latest releases: 0.13.41, edge-bonsai, 0.13.40...
3 years ago

Garden 0.12.21 is out! 🎉

Along with a few bugfixes and minor improvements, this release includes a major new feature: Dev Mode.

See the changelog below for a full list of changes.

Finally, many thanks to @tvollstaedt and @matthew-muscat for their contributions to their release!

Dev Mode (experimental)

Dev mode works similarly to hot reloading, but is much faster and more reliable. In addition, it works a lot better on Windows than the old rsync-based hot reload implementation.

It also supports bidirectional syncing, which enables you to sync new/changed files from your containers to your local machine.

This new sync mode uses Mutagen under the hood. Garden automatically takes care of fetching Mutagen, so you don't need to install any dependencies yourself to make use of dev mode.

Dev mode sync is not affected by includes/excludes, which makes it more flexible than hot reloading. For example, you can use it to sync your build/dist directory into your container while running local, incremental builds (without having to remove those directories from your ignorefiles).

Eventually, the plan is to deprecate hot reloading in favor of dev mode. Dev mode is currently flagged as experimental, but is well-tested and already being used in the wild. Please let us know what you think, and report any bugs or suggestions that come up!

Dev mode is currently supported for container, kubernetes and helm modules.

To configure a service for dev mode, add devMode to your module/service configuration:

kind: Module
name: my-service
type: container
services:
  - name: my-service
    args: [npm, start]
    devMode:
      command: [npm, run, dev] # Overrides the container's default when the service is deployed in dev mode
      sync:
        # Source/target configuration for dev mode is the same as for hot reloading.
        - target: /app
          type: two-way # Here, files created/modified remotely will get synced back and vice-versa
        # You can use several sync specs for the same service.
        - source: /tmp/somedir
          target: /somedir
          type: one-way # Here, only files created/modified locally will be synced (to the remote target)
  ...

Dev mode opens up exciting, productive new ways to set up your inner dev loop with Garden. Happy hacking!

Features

  • dev mode with much better container syncing (9537765b)
  • commands: skip-dependants opt for test cmd (6a7d6c56)
  • enterprise: stream namespace events (f0431b5b)
  • workflows: only resolve config being run (3ad56c82)

Improvements

  • core: add runModule handler to exec module (48914c11)
  • core: increase liveness probes when in hot-reload mode (25eb6344)

Bug Fixes

  • cli: don't complain in port forward cleanup handler (af5bc97f)
  • core: include deps in test version (8e7ce4ca)
  • core: handle undefined stdout/stderr on exec module failures (b439c866)
  • enterprise: ensure exit code and --yes flag work (65303d41)

Don't miss a new garden release

NewReleases is sending notifications on new releases.