Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
that-jill committed Dec 13, 2023
1 parent 9ef14bc commit dcb8f3b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions packages/data_taster/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🍭 Data Taster

Database exporting tool written specifically for nitro-web, soon to be extracted to power-tools.
Database exporting tool.

## Usage

Expand Down Expand Up @@ -73,19 +73,3 @@ This will select data from the source_client and insert it using the working_cli
#### Deprecating Tables

DataTaster queries directly on the source_client to retrieve the list of tables to work on, which can cause issues when tables are removed -- migrations that have run in one environment may not have yet run in another. In order to maintain smoother transitions, use the `deprecated_table` method found in the DataTaster#Flavors file to mark the table as one that should include neither the schema nor the data.

## Testing

If you are in nitro-web and are looking to test adding something to the db dumps, there are a variety of tools to help you do so:

* if you're adding a custom query, run `bin/rake dev:test_data_query` to ensure everything looks correct and it's not pulling too many rows
* you can also run `dev_rake_spec.rb` to ensure that the data taster custom files you modified properly lint
* before you test on CI, you can run a sample test locally through `bin/rake dev:dump_recent_db`. More details about this can be found in the database-standards documentation.
* Finally, when modifying what is included from the dump, be sure to run a test job through CI. Be aware that this takes up to two hours to complete and we only have one process, so if someone is already running it, triggering a new job will enqueue behind them. Here are the steps:
1. Push your code to github
1. Wait for the image to be built (via CI on your PR)
1. Go to [nitro-web aux jobs](https://ci.powerapp.cloud/job/nitro-web-aux-jobs/job/nitro-web-db-dump-testing/) -- click on the "testing" one. (Note: the local and demo dumps are the production versions and should definitely not be used for testing).
1. Click "Build With Parameters"
1. Ensure you've chosen the correct type -- local. The amount of data we include on demo is currently too much for our CI testing processes to sustain it.
1. give it the name of the branch on github that you're wanting to test from.
1. After it has completed, test it locally by running `NAME="testing_dev_backup" bin/rails dev:load_recent`

0 comments on commit dcb8f3b

Please sign in to comment.