Git Product home page Git Product logo

parity's Introduction

Parity

Reviewed by Hound

Shell commands for development, staging, and production parity for Heroku apps.

Install

gem install parity

Or bundle it in your project:

gem "parity"

Parity requires these command-line programs:

git
heroku
pg_restore

Usage

Backup a database:

production backup
staging backup

Restore a production or staging database backup into development:

development restore production
development restore staging

Or, if restore-from reads better to you, it's the same thing:

development restore-from production
development restore-from staging
  • Note that the restore command will use the most recent backup (from staging or production). You may first need to create a more recent backup before restoring, to prevent download of a very old backup.

Push your local development database backup up to staging:

staging restore development

Deploy main to production (note that prior versions of Parity would run database migrations, that's now better handled using Heroku release phase):

production deploy

Deploy the current branch to staging:

staging deploy

Note that deploys to non-production environments use git push --force.

Open a console:

production console
staging console
pr_app 1234 console

Migrate a database and restart the dynos:

production migrate
staging migrate
pr_app 1234 migrate

Tail a log:

production tail
staging tail
pr_app 1234 tail

The scripts also pass through, so you can do anything with them that you can do with heroku ______ --remote staging or heroku ______ --remote production:

watch production ps
staging open

You can optionally parallelize a DB restore by passing --parallelize as a flag to the development or production commands:

    development restore-from production --parallelize

Convention

Parity expects:

  • A staging remote pointing to the staging Heroku app.
  • A production remote pointing to the production Heroku app.
heroku git:remote -r staging -a your-staging-app
heroku git:remote -r production -a your-production-app
  • There is a config/database.yml file that can be parsed as YAML for ['development']['database'].

Pipelines

If you deploy review applications with Heroku pipelines, run commands against those applications with the pr_app command, followed by the PR number for your application:

pr_app 1234 console

This command assumes that your review applications have a name derived from the name of the application your staging Git remote points at.

Customization

If you have Heroku environments beyond staging and production (such as a feature environment for each developer), you can add a binstub to the bin folder of your application. Custom environments share behavior with staging: they can be backed up and can restore from production.

Using feature environments requires including Parity as a gem in your application's Gemfile.

gem "parity"

Here's an example binstub for a 'feature-geoff' environment, hosted at myapp-feature-geoff.herokuapp.com.

#!/usr/bin/env ruby

require "parity"

if ARGV.empty?
  puts Parity::Usage.new
else
  Parity::Environment.new("feature-geoff", ARGV).run
end

Issues

Please fill out our issues template if you are having problems.

Contributing

Please see CONTRIBUTING.md for details.

Version History

Please see the releases page for the version history, along with a description of the changes in each release.

Releasing

See guidelines in RELEASING.md for details

License

Parity is © 2013 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot

thoughtbot

This repo is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects. We are available for hire.

parity's People

Contributors

andrewhr avatar bernerdschaefer avatar carlosramireziii avatar clowder avatar croaky avatar danbee avatar fabn avatar gabebw avatar geoffharcourt avatar georgebrock avatar github-actions[bot] avatar jberlinsky avatar joelq avatar lachlanjc avatar matthewhatch avatar mjankowski avatar mrjonesbot avatar multiplegeorges avatar rikkipitt avatar salbertson avatar stefannibrasil avatar stratigos avatar tabfugnic avatar tdeo avatar tysongach avatar walreyes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parity's Issues

Conflict with Heroku Toolbelt?

I followed the installation instructions:

~ % brew tap thoughtbot/formulae
~ % brew install parity
==> Installing parity from thoughtbot/formulae
Error: You must `brew link heroku` before thoughtbot/formulae/parity can be installed

So I tried that:

~ % brew link heroku
Linking /usr/local/Cellar/heroku/3.43.7...
Error: Could not symlink bin/heroku
Target /usr/local/bin/heroku
is a symlink belonging to heroku-toolbelt. You can unlink it:
  brew unlink heroku-toolbelt

To force the link and overwrite all conflicting files:
  brew link --overwrite heroku

To list all files that would be deleted:
  brew link --overwrite --dry-run heroku

Any advice on what I should do here? I don't want to break my existing Heroku setup.

uninitialized constant Parity::Backup::ERB (NameError)

I attempted to install 0.9.3.beta from Homebrew (after seeing thoughtbot/homebrew-formulae@fcb0f7f). With a previously installed version of 0.9.2.1, I ran:

brew install --devel parity

Now the restore/restore-from commands result in an error.

Running development restore production or development restore-from production yields:

/Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/backup.rb:76:in `parsed_database_yml': uninitialized constant Parity::Backup::ERB (NameError)
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/backup.rb:68:in `development_db'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/backup.rb:42:in `drop_development_database'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/backup.rb:37:in `restore_to_development'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/backup.rb:15:in `restore'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/environment.rb:68:in `restore'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/environment.rb:23:in `run_command'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/lib/parity/environment.rb:12:in `run'
    from /Users/macklinu/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/parity-0.9.3.beta/bin/development:8:in `<top (required)>'
    from /Users/macklinu/.rbenv/versions/2.2.4/bin/development:23:in `load'
    from /Users/macklinu/.rbenv/versions/2.2.4/bin/development:23:in `<main>'

I can still run other parity commands, like staging tail successfully.

I'm not 100% sure about how to test a fix for this issue, but I believe it's due to this line in lib/parity/backup.rb, and adding require "erb" to lib/parity.rb might fix it. I'll open a PR for that change.

Update to use new Heroku PG syntax

Heroku resolved the issue with the PG backup URL not being passed along that triggered #23 (see comment). We can now go ahead and reapply #22 and take advantage of the new command form at some point before Heroku deprecates the old one.

Enable/disable maintenance on deploy?

I'm currently enabling maintenance mode before deploy and disabling it after it has succeed. So, if there's an error, I don't have users banging against a bad deploy.

Is there a reason not to use that heroku feature for production deploy?

Am I missing something?

Restore does not pull the latest backup

When I run development restore production we seem to be importing a backup that is several weeks old. I've confirmed the existence of and successfully imported more recent backups using the heroku commands directly.

Release v0.7.0

I'm concerned Heroku is going to start dropping support, so I want to get this out in the wild first.

@croaky, could you push to Rubygems?

I don't have access to the Homebrew formula, so if @croaky, @gabebw, or @JoelQ could update the Homebrew formula with the v0.7.0 release, I would very much appreciate it.

Match Travelling Ruby

In 95ac59c we updated to use Ruby 2.3.0. We probably need to downgrade this to 2.2.2 to match Travelling Ruby's latest version.

@JoelQ @tabfugnic @croaky thoughts? I'm open to other solutions if we don't think Traveling Ruby is the right solution, but thus far I think packaging the gem has been a big win.

Abandon Rubygems-installed executable?

I think our experiment to distribute Parity as packages rather than through Rubygems has been a success. While working across several Ruby versions with different clients and projects, I've found having Parity be independent of my current Ruby version to be useful. When I have the gem executables installed because I've been testing development versions, I find the existence of shims from Ruby versions I'm not using to be quite annoying.

I think Gary Berhnhardt is right that gems should be for installing dependencies, not for installing executables

I'm proposing that with Parity 0.10.0 or 1.0.0 that we distribute a gem with a post-install message advising users to install the executable as a package (built themselves or from apt/brew/etc), and no longer distribute Parity through Rubygems.

Replace `Parity.config` with `.parity.yml`?

With the change to a binary, configuring through Ruby no longer makes sense.

I'm thinking project-specific YAML files instead.

database: "config/database.yml"
production: "my-heroku-app-production"
staging: "my-heroku-app-staging"
extra_environments:
- "feature-geoff"
- "qa"
redis_env: "REDIS_URL"

Thoughts?

Allow restoring to production

I came across this error today

Parity does not support restoring backups into your production environment

While I understand the reasoning, it would be nice to have a way to override this if that's what I need to do. Maybe some type of y/n confirm to restore?

No implicit conversion of Fixnum into String

gems/parity-0.4.0/lib/parity/environment.rb:70:in system': no implicit conversion of Fixnum into String (TypeError)`

Kernel.system doesn't like nils or numbers, they have to be explicitly converted into strings.

Ensure we return exit status from Heroku when errors happen

I noticed while testing fb13da9 that when the production backup command failed that it did not halt execution of a statement like this:

production backup && development restore production

Given that the second event is dependent on the first, we probably should return the exit status of whatever Kernel.system executes if it indicates an unsuccessful execution.

A dependency is missing on new installation?

I recently uninstalled all gems in my system. After running gem install parity and trying to use it in projects where it was working before, I get:

% development restore production
/Users/tutec/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- git (LoadError)
        from /Users/tutec/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/tutec/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/parity-0.9.3/lib/parity.rb:7:in `<top (required)>'
        from /Users/tutec/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/tutec/.rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/tutec/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/parity-0.9.3/bin/development:3:in `<top (required)>'
        from /Users/tutec/.rbenv/versions/2.3.0/bin/development:22:in `load'
        from /Users/tutec/.rbenv/versions/2.3.0/bin/development:22:in `<main>'

Is there a missing dependency? Thank you!

Installing parity executables on Ubuntu

Huge fan of Parity on OSX, but I can't seem to get it to work on Ubuntu. After gem install I get the following message:

##################################################
#  NOTE FOR UPGRADING FROM 0.9.3 OR EARLIER      #
##################################################

As of version 1.0.0, Parity no longer distributes its executables via Rubygems.

If you use apt or Homebrew to install dependencies, you can install Parity
through those package managers to get the `development`, `staging`, and
`production` executables. Installing the executables via package manager makes
the programs available across Ruby versions.

Users without access to those package managers or who prefer to self-install can
find the executables at our Github repository:

https://github.com/thoughtbot/parity

But there doesn't appear to be any apt repo to speak of. apt-cache search parity turns up nothing. Anyone else succeed in getting the production, staging and development executables to work on Ubuntu?

Ubuntu 16.04
Ruby version 2.2.2
git version 2.7.4
pg_restore (PostgreSQL) 9.5.5
heroku-toolbelt/3.43.14 (x86_64-linux) ruby/2.2.2
heroku-cli/5.5.5-789c5b7 (linux-amd64) go1.7.4

`development restore-from production` command failed

Parity 0.9.3

$ development restore-from production
(erb):89:in `<main>': uninitialized constant Rails (NameError)
    from /usr/local/Cellar/parity/0.9.3/lib/ruby/lib/ruby/2.2.0/erb.rb:863:in `eval'
    from /usr/local/Cellar/parity/0.9.3/lib/ruby/lib/ruby/2.2.0/erb.rb:863:in `result'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/backup.rb:76:in `parsed_database_yml'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/backup.rb:68:in `development_db'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/backup.rb:42:in `drop_development_database'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/backup.rb:37:in `restore_to_development'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/backup.rb:15:in `restore'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/environment.rb:68:in `restore'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/environment.rb:23:in `run_command'
    from /usr/local/Cellar/parity/0.9.3/lib/app/lib/parity/environment.rb:12:in `run'
    from /usr/local/Cellar/parity/0.9.3/lib/app/bin/development:8:in `<main>'

Allow migrations to be skipped

Now that Heroku provides release phase and advice to use it to run database migrations it would be nice to have a way to skip migrations when using parity.

Release phase is better because new code will be deployed only when release command is executed successfully and since db migrations on postgres are transactional it is a better way to run them.

In this way you don't need to restart the app twice to be sure that code reads updated schema.

What do you think?

Allow for git push -f

Thanks for great and simple CLI tool!

One issue I ran into today was that I couldn't use parity to make a force deploy.

I tried production deploy -f and, after that failed (ignoring -f argument), I resorted to git push production master -f. It would be good if parity would be able to do this.

Viktor

Bypass confirmation for staging?

In #21 we added the ability to pass the --confirm appname-staging argument to staging restore so that users could bypass the confirmation, script the restore, etc. Is there a good reason not to always pass the confirm parameter to stating restore? I agree with the philosophy of not allowing Parity to overwrite production out of fear users might inadvertently blow away their production DB, but it seems that staging should never be in a state where you couldn't rebuild the state you're in or just replace it with whatever's in production.

This change is easy from a coding perspective, but I'm want to see if there's consensus around making this more streamlined.

Subcommands are ignored with v0.5.0

The /usr/local/bin/staging shell script looks like this:

#!/bin/bash

set -e

REALPATH=$(readlink $0 || $0)
RELATIVE_DIR=$(dirname $REALPATH)
SELF_DIR=$(cd $(dirname $0) && cd $RELATIVE_DIR && pwd)

exec "$SELF_DIR/../lib/ruby/bin/ruby" "$SELF_DIR/../lib/app/bin/staging"

Note that it's running staging, and not passing any arguments to it, so staging COMMAND is actually sent to the Ruby file as staging, with no subcommand. I fixed it by adding "$@" to the last line:

exec "$SELF_DIR/../lib/ruby/bin/ruby" "$SELF_DIR/../lib/app/bin/staging" "$@"

...but I don't know how to get Traveling Ruby to do that for us. @JoelQ?

restore and restore-from isn't working same as #72

This was posted in #72 but since it was closed, I thought I would open a new one just so it was seen.

I am still having this exact issue. When I run staging restore production, I get ! App not found. If I run staging restore-from production, I get

! restore-fromis not a heroku command. ! Seeheroku help` for a list of available commands.
I am the owner of the heroku apps in question they do not belong to an org. Here are my remotes:

production https://git.heroku.com/my-production-app.git (fetch)
production https://git.heroku.com/my-production-app.git (push)
staging https://git.heroku.com/my-staging-app.git (fetch)
staging https://git.heroku.com/my-staging-app.git (push)

`deploy` runs migrations if the deploy fails

I think this is largely harmless, but I tried to run staging deploy this morning when staging was running a feature branch that was out of sync with master. The deploy failed, but parity went ahead and tried to run migrations and restarted the dyno. I think we should check for the git command's exit status before we run the migration.

Reset development database on `development restore x`?

I've been having an issue recently where some primary keys and pre-existing data in development has caused conflicts when trying to restore a production/staging snapshot on development. I've fixed this by running rake db:reset before development restore production. I'm starting to think that always resetting (or even dropping and recreating) the development database might be good practice before bringing down data from Heroku.

The advantage of always doing this is that we'll be very sure there's no vestigial data/metadata left in the database, but the disadvantage is that if the backup is unavailable on Heroku for some reason, you lose your existing development database before we know there was a restore problem. I think this is a worthwhile tradeoff, but curious to see if other users have had a similar experience.

CURL Error with version 0.5.0

Error

When executing development restore production, I get an error with parity 0.5.0:

 !    Resource not found

curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
pg_restore: [archiver] input file is too short (read 0, expected 5)

Specs

Curl 7.37.1
Ruby 2.2.1p85

Parity 0.4 is working...

Slow backups from production

Working on a ~500MB database. It is slow to backup through development restore production.

This alternative may be faster:

curl -O tmp/latest.backup $(production pg:backups public-url -q)
pg_restore tmp/latest.backup

Not sure why yet.

Error: Multiple apps in git remotes

I have a production app (project-jedi) and a staging app (project-sith) hosted on Heroku.

I'm using parity v0.10.0

My relevant git remotes are defined as

> git remote -v

production  [email protected]:project-jedi.git (fetch)
production  [email protected]:project-jedi.git (push)
staging [email protected]:project-sith.git (fetch)
staging [email protected]:project-sith.git (push)

When trying to restore staging from production, I'm getting the below error.

I've successfully been using this restore command for several months and nothing has changed in terms of my setup as far as I know

> staging restore production
 ▸    Error: Multiple apps in git remotes
 ▸    Usage: heroku pg:backups:public-url --remote production
 ▸       or: heroku pg:backups:public-url --app project-jedi
 ▸
 ▸    Your local git repository has more than 1 app referenced in git remotes.
 ▸    Because of this, we can't determine which app you want to run this command against.
 ▸    Specify the app you want with --app or --remote.
 ▸
 ▸    Heroku remotes in repo:
 ▸    production                (project-jedi)
 ▸    staging                   (project-sith)
 ▸
 ▸    https://devcenter.heroku.com/articles/multiple-environments
 ▸    Error: Multiple apps in git remotes
 ▸    Usage: heroku pg:backups:restore DATABASE --confirm project-sith --remote production
 ▸       or: heroku pg:backups:restore DATABASE --confirm project-sith --app project-jedi
 ▸
 ▸    Your local git repository has more than 1 app referenced in git remotes.
 ▸    Because of this, we can't determine which app you want to run this command against.
 ▸    Specify the app you want with --app or --remote.
 ▸
 ▸    Heroku remotes in repo:
 ▸    production      (project-jedi)
 ▸    staging         (project-sith)
 ▸
 ▸    https://devcenter.heroku.com/articles/multiple-environments

Even trying with the --remote, --app, or --confirm prompts like it suggests doesn't work.

Thanks!

Update readme for restore commands

When trying to restore-from:

hub master % staging restore-from production
 !    `restore-from` is not a heroku command.
 !    See `heroku help` for a list of available commands.

and from the README:

Restore a production database backup into staging:

`staging restore-from production`

Should this be restore and not restore-from?

Don't run `migrate` when deploying non-Rails apps

Experimenting with a Python app we're using at @cortexintel and the Homebrew version of Parity has been useful. The deploy command runs fine, but gives us some errors about migrations.

Wondering if we should detect if it's a Rails app before we decide to run migrate.

error restoring production data to staging

I ran: staging restore production which blew up with a pretty non-descriptive error: Error: Server broke connection (RestClient::ServerBrokeConnection). The command it tried to run was: heroku pgbackups:restore DATABASE <s3 backup url> --remote staging

DATABASE isn't correct here. I had to update the command to use HEROKU_POSTGRES_CYAN instead.

I'll see if there's an easy way to get that value from the CLI, if not I guess we'll need a config option.

Automated task to update homebrew formula

I haven't figured out what the best way to do this is, but we should be updating the homebrew and APT formulae whenever we publish a new release.

The rake task already generates the packages, so we'd want to have a task at the least generate the SHA256 hashes and URLs to paste into the formula as the bare-bones version of this automation, ideally it would be idiot-proof and just update the formula, but that might involve traversing git repos across a development machine in an unsafe way.

Add `{staging,production} redis-cli` command

RedisToGo gives you a url in the form:

redis://redistogo:[email protected]:9402

We can get it from:

heroku config --remote ENVIRONMENT_NAME | grep REDISTOGO_URL

Break up the string, and run this command to open a CLI:

redis-cli -h catfish.redistogo.com -p 9402 -a d20739cffb0c0a6fff719acc2728c236

parity exits on ctrl-c during long-running tasks

For example:

$ staging pg:psql
---> Connecting to HEROKU_POSTGRESQL_BRONZE_URL (DATABASE_URL)
psql (9.4.4, server 9.3.9)
SSL connection (protocol: TLSv1.2, cipher: DHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

myapp-staging::BRONZE=> ^Clib/parity/environment.rb:30:in `system': Interrupt
        from lib/parity/environment.rb:30:in `run_via_cli'
        from lib/parity/environment.rb:17:in `run'
        from bin/staging:8:in `<main>'

If you run heroku pg:psql -a myapp-staging and hit ctrl-C it works as expected -- clearing any partial commands, but leaving the postgres CLI running.

Some ideas for addressing this:

  • parity captures and forwards received signals to the commands it runs
  • parity uses exec to run commands it passes through to heroku.

The second option is likely easier, and possibly more correct, assuming that we don't expect to do anything else after we run the command.

`push` aliases

Given that you can already migrate, restart, run log2viz, etc, I think it would make sense to be able to type staging push to push to the staging remote, etc.

If this kind of behavior would be broadly popular I'm happy to write a PR.

Parse ERB in `database.yml`

Rails allows a user to use ERB within a YAML file to set up dynamic values for keys. On apps that employ this approach, Parity will fail when attempting to parse config/database.yml.

Nothing seems to work. "fork: retry: no child processes"

After using the rubygems release for a while, I just installed this from the latest release linked on github

I tried both 1.0.0 and 0.10.0, both with the same result:

screenshot from 2016-10-18 12-57-06

screenshot from 2016-10-18 13-00-11

this crashes my system for a while (it seems no new processes can be spawn at this time. things like opening a chrome tab or trying to take a screenshot just hang). After a while, or if I pkill -f staging quickly enough, the system recovers.

`development backup`

It's relatively trivial to dump a local database (if you're familiar enough with pg_dump) but I think it might be cool to implement development backup as it was something I expected to exist when I tried it today.

Like I said - it's easy enough, but it takes a little time to look up, grok all the options, etc., if you are not familiar.

Thoughts, @croaky?

Allow `--confirm` command to be passed to `restore` subcommand

When I'm bringing data down from production to staging, I'll sometimes do this:

production backup && staging restore production

and then go and get a cup of tea while I wait for Heroku to do its thing. However, the staging command doesn't pass any arguments beyond the first to restore, so you can't tell it to confirm.

Integration test application

Our current system of stubbing out calls to Kernel.system is great for performance and isolation of the portions of Parity that we want to test, but I find myself testing certain non-passthrough commands like deploy and migrate on a dummy app I have on Heroku.

Here's what I do:

  1. roll back the database by one migration
  2. roll back the repository to a commit before the migration
  3. force-push the rolled-back repo to Heroku
  4. run production deploy
  5. revert production with Heroku CLI
  6. run production deploy again

I'm wondering if this should be part of Parity or our Homebrew testing so we can be very confident what we're pushing out will not have possibly undetected problems with deploys.

restore-from errors

I get a Heroku error when running restore-from.
OSX 10.11.3
Everything else seems to work as expected and I am not sure how to tell if this is a local issue.

development restore-from staging

 !    `restore-from` is not a heroku command.
 !    See `heroku help` for a list of available commands.

development restore staging:

pg_dump: reading schemas
pg_dump: reading user-defined tables
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.