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 StartedTo 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 ReleaseThis 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 TrunksNew 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 create
now has a-t
or--trunk
option for explicitly naming the trunk of an instance. For example, to create a new instance with a trunk calledmain
, you would use:platter postgres create
will also derive a reasonable default name for the new instance's trunk when--trunk
is omitted by using the following rules:- if the command is run from inside a
git
repository, theHEAD
branch of theorigin
remote will be used (if it exists) - if
origin/HEAD
does not exist, then theinit.defaultbranch
in the localgit
configuration will be used - if no
defaultbranch
is configured, and there is amaster
ormain
branch in the local repository, then that branch name will be used - if the command is not run from inside a
git
repository, thenmain
will be used
- if the command is run from inside a
#
Arbitrary BranchingCreate branches from any "parent" branch.
platter postgres branch create
now has a-p
or--parent
option for specifying an existing, active branch to copy when creating the new branch's database. For example, to create a new branch calledtesting
from a feature branch calleddevelopment
on an instance calledmy-instance
, you would use:When
--parent
is omitted, new branches will use their instance's trunk as their parent branch.platter watch
will also derive reasonable parent branches for new branches based on the current active branch of agit
repository using the following rules:watch
will not overwrite the parent branch of any existing branch- if
watch
is invoked on agit
branch 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
git
branch changes whilewatch
is running,watch
will create new Postgres branches using the previous branch as the parent of any new branches that need to be created.
list
Output Types#
New 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 |
#
DeprecationsWith this release, we are also officially deprecating platter
versions before 0.7.0
.
#
Support and FeedbackThanks 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.