-
Notifications
You must be signed in to change notification settings - Fork 0
Add pg client to big-poppa #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It works:
|
@@ -12,7 +12,9 @@ dockerfile_enviroment: [ | |||
] | |||
|
|||
dockerfile_pre_install_commands: [ | |||
"echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc" | |||
"apt-get update", | |||
"apt-get install postgresql-client -y", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you only install a specific version instead of master all the time ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Updating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added and tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shall pass!
### What this PR does * Add `creator` field to organization * Populated `creator` field during org creation ### Dependencies - CodeNow/devops-scripts#551 ### Reviewers - [x] @anandkumarpatel - [x] @Nathan219 ### Deployment 1. Get all organizations with users ``` SELECT id,github_id,name,stripe_customer_id,trial_end,active_period_end FROM organizations LEFT JOIN organizations_users ON organizations.id = organizations_users.organization_id WHERE organizations_users.organization_id is NULL; ``` 2. Run the following query to delete all orgs with no users: ``` DELETE FROM organizations WHERE id IN ( SELECT id FROM organizations LEFT JOIN organizations_users ON organizations.id = organizations_users.organization_id WHERE organizations_users.organization_id is NULL ); ``` 3. Deploy new version of BP 4. Run the following query to use new user relationships: ``` big_poppa=# SELECT DISTINCT ON (organizations.id) organizations.id, name, creator, users.created_at big_poppa-# FROM organizations_users big_poppa-# LEFT JOIN organizations big_poppa-# ON organizations.id = organizations_users.organization_id big_poppa-# LEFT JOIN users big_poppa-# ON users.id = organizations.creator big_poppa-# ORDER BY organizations.id, users.created_at DESC; ``` ### Rollback steps 1. `ssh` into `app-services` 2. Start one of the BP containers with a different command (`sleep infinity`) 3. Run `npm run rollback` 4. Revert commit for BP 5. Re-deploy BP ### Tests - [x] Run migration in gamma - [x] Test route - [x] Create new org in gamma ### Commits * Add migration for creator field * Fix functional tests * Add creator property to big-poppa * Update migration. Add logs * Fix logger ref * Make column have no default and have it be NOT NULL * Add max number of retries * Fix JSdoc. Add retryDelay * Delete the delete workers * Fix stuff * Change name of table. Ignore db-backups
Reviewers
Tests
gamma
by @thejsjDeployment (post-merge)