Skip to content
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

Replicate foorm tables to Redshift #35374

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Conversation

bencodeorg
Copy link
Contributor

@bencodeorg bencodeorg commented Jun 17, 2020

Replicates foorm tables to Redshift. There might be foorm_ tables that don't contain PII, but following precedent with pd_ tables where we put everything in dashboard_production_pii schema. I think this is a good pattern so that everything in a given namespace appears in the same schema, instead of being split across the two (dashboard_production and dashboard_production_pii).

Testing story

So far, just checked whether this looks like it would appropriately update the cron-pii DMS task:

Benjamins-MacBook-Pro:code-dot-org benjaminbrooks$ RAILS_ENV=production bundle exec rake stack:data:validate
GetSecretValue: production/cdo/db_writer
Data layer including RedShift cluster configuration and synchronization with RDS instance.
Listing changes to existing stack `DATA-production`:
Modify DMSCronPii [AWS::DMS::ReplicationTask] Properties Replacement: Conditional (TableMappings)

Once approved, can run RAILS_ENV=production bundle exec rake stack:data:start to actually modify the CloudFormation template.

@bencodeorg bencodeorg requested review from sureshc and a team June 17, 2020 19:37
Copy link
Contributor

@sureshc sureshc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m still investigating the failures exporting to Redshift that occurred the last 2 days, so check with my before applying this stack update.

@bencodeorg
Copy link
Contributor Author

I'm ready to make it @sureshc, can you just comment here when it's ok to do so?

@sureshc
Copy link
Contributor

sureshc commented Jun 17, 2020

Will do

@sureshc
Copy link
Contributor

sureshc commented Jun 17, 2020

@bencodeorg Looks like this recent change to the size of the levels.properties column is causing the export to Resdhift to fail. Unlikely we’ll have a resolution today.

https://github.com/code-dot-org/code-dot-org/blob/staging/dashboard/db/migrate/20200609183124_change_level_properties_size.rb

@sureshc
Copy link
Contributor

sureshc commented Jun 18, 2020

@bencodeorg I’m still investigating the export error that occurred Mon & Tue. The Wednesday export mysteriously succeeded, so it’s fine for you to apply this change while I continue to investigate the issue with the levels table.

@bencodeorg bencodeorg merged commit d272c8b into staging Jun 18, 2020
@bencodeorg bencodeorg deleted the replicate-foorm-to-redshift branch June 18, 2020 17:33
@bencodeorg
Copy link
Contributor Author

Success -- checked in AWS web console that cron-pii task now includes foorm_ tables.

Benjamins-MacBook-Pro:code-dot-org benjaminbrooks$ RAILS_ENV=production bundle exec rake stack:data:start
GetSecretValue: production/cdo/db_writer
update stack: DATA-production...
Stack update requested, waiting for provisioning to complete...
2020-06-18 17:37:09 UTC- DATA-production [UPDATE_IN_PROGRESS]: User Initiated
..2020-06-18 17:37:23 UTC- DMSCronPii [UPDATE_IN_PROGRESS]
.......2020-06-18 17:38:12 UTC- DMSCronPii [UPDATE_COMPLETE]
2020-06-18 17:38:15 UTC- DATA-production [UPDATE_COMPLETE_CLEANUP_IN_PROGRESS]

Stack update complete.
Outputs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants