Announcing platter v0.8.0
Alex Pearson
Platter CTOWe're proud to release v0.8.0 of the platter CLI, featuring improved watch performance, new list output types, trunk configuration for new instances, and arbitrary branching of Postgres data!
Getting Started#
To get started with Platter's branching Postgres databases for the first time, take a look at the Quick Start.
To install update to v0.8.0, follow the installation instructions.
About This Release#
This is a particularly exciting release for the Platter team, as we're now realizing one of the core ideas of branchstack: the ability to create branches from any branch, not just the default branch of an instance. Pre-0.8.0 behavior on platter postgres branch create or platter watch was to create branches from the default branch of the Postgres instance. With v0.8.0, new branches can be based on any other active branch, giving you the ability to build richer workflows using a single instance!
Along with this new superpower, we've focused on making the development experience with these new branches more fluid with our new streaming output types for list commands and clearer messages during watch cycles.
Features#
Configurable Instance Trunks#
New Postgres instances can now be created with a trunk branch of any name. Previous behavior was to create a trunk named master for every new instance. With v0.8.0 of the CLI, trunks can be specified explicitly during instance creation and will be inferred from the context of the working git repository when working with any of the Development Commands or create commands.
platter postgres createnow has a-tor--trunkoption for explicitly naming the trunk of an instance. For example, to create a new instance with a trunk calledmain, you would use:platter postgres createwill also derive a reasonable default name for the new instance's trunk when--trunkis omitted by using the following rules:- if the command is run from inside a
gitrepository, theHEADbranch of theoriginremote will be used (if it exists) - if
origin/HEADdoes not exist, then theinit.defaultbranchin the localgitconfiguration will be used - if no
defaultbranchis configured, and there is amasterormainbranch in the local repository, then that branch name will be used - if the command is not run from inside a
gitrepository, thenmainwill be used
- if the command is run from inside a
Arbitrary Branching#
Create branches from any "parent" branch.
platter postgres branch createnow has a-por--parentoption for specifying an existing, active branch to copy when creating the new branch's database. For example, to create a new branch calledtestingfrom a feature branch calleddevelopmenton an instance calledmy-instance, you would use:When
--parentis omitted, new branches will use their instance's trunk as their parent branch.platter watchwill also derive reasonable parent branches for new branches based on the current active branch of agitrepository using the following rules:watchwill not overwrite the parent branch of any existing branch- if
watchis invoked on agitbranch that does not have a matching Postgres branch, then a new Postgres branch will be created using the instance's trunk branch as the parent. - when the
gitbranch changes whilewatchis running,watchwill create new Postgres branches using the previous branch as the parent of any new branches that need to be created.
New list Output Types#
In addition to list's previous formatted-table output, list commands now have additional output types to make it easier to quickly get information about active Postgres instances and branches. platter postgres list and platter branch list will now use a -o or --output option to choose between table, text, json, and ndjson output types. For example, to get a stream of instance names with platter and jq, you would use:
table remains the default if --output is omitted.
For more information about each output type, see the table below:
| Type | Description | Streaming | Used with |
|---|---|---|---|
table | Formatted rows + columns | No | N/A |
json | Aggregated JSON Array | No | JSON file redirection |
text | TAB-delimited data streamed by line | Yes | awk, grep |
ndjson | Newline-delimited JSON Objects | Yes | jq |
Deprecations#
With this release, we are also officially deprecating platter versions before 0.7.0.
Support and Feedback#
Thanks for giving this release a try! If you have any questions or feedback about this release, please let us know by email at [email protected] or through the #kitchen Slack channel available for paid users of the shared database tier.