Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds materialized views to the startup Uses the run.sh refactored form to add materialized views. These are dropped first, then created on every deploy. This is because we might choose to change the view between deploys. In that case, we should completely destroy it. The Django command fac materialized_views --refresh can be used to refresh the view(s) on any cycle desired. * Linting * Added unmanaged model for materialized view * Switched from using dissemination tables in search module to materialized view * An increment on the materialized view. * Adding *all* the columns. Because, if we're doing it, we should go all the way. * Code cleaning * Added passthrough to materialized view * Adding in the .profile change We dropped/added views in run.sh, but did not add it to .profile. Before deploying, this would be a good idea. * Incremental * Adds the workflow for materialized views Configures a matrix for the 3 core environments on a schedule, and allows us to run via workflow_dispatch for a single target environment * Add materialized view migration file. * Linting fixes. * Updated test cases to use Dissemination Combined view * Ensure search is run against dissemination combined * Updated test cases to use dissemination combined * Code improvement * Added testing environment to TestAdminAPI * Skipping TestAdminAPI for now * Disabling more test for now. Before going to prod, all these tests must pass * Remove skipped API tests * Add source for materialized view sh functions. * Remove materialized view commands from .profile. * Fixing names query The names query was potentially not right. It appears to now perform better (in terms of time to execute) as well as "do the right thing". * Adding in index creation. Timing data in summary reports. * Approximate 4x speedup in SF-SAC generation This walks the DisseminationCombined table *only once*, which reduces the number of times we traverse 4.4M rows. This currently has a weird alternation in the view, to test the two different exports. * Adding .profile I wonder if this actually is an issue? * Yep, it matters. This causes a timeout. has to run post-deploy. * Allows for alternation... In seconds 0-9 of a minute, we get the original report generator. 19-19, the new... 20-29 the old... This makes testing the two against each-other in preview possible. * Workflow changes for preview * For want of a 'd' * Updates tests to accommodate timing info * Removing "TESTING" We should be using a default dockerized set of values for the connection string. * Linting. * Revert workflow test changes * Set materizalized views creation post deployment * Updating tests * Troubleshooting commit. And some linting fixes. * Troubleshooting commit. * Troubleshooting commit. * Proof of concept * Switched Admin API Test to using django.db library * More tests * Still testing * ....more testing * bug fix * Trying another approach of creating test tables * Temporarily skipping for speed of troubleshooting * Undo some changes made for testing purpose * Commented out the new code in an attempt to isolate the issue * Commenting more code to isolate the issue * Looking for env variable values * Reverting back previous changes now that the issue is isolated * Typo * Fixed linting * Ensure summary report is using combined view * Re-structure script to ensure db tables are created before materialized views * Code cleaning + improvement * Reverting tests that were skipped for debugging purpose * Switched to concurrent refresh mode for materialized view * Fixing PK * Removing model fields to align with view * Removing ID * Possibly correct? * Hotswap the view. * Removing unique column * remove unused files and commands * clean up stray comments * lint * bring refresh back. it's used for a lot of tests. * restore MV shell * re-remove shell file, remove concurrently from MV refresh sql * build MV on start i guess * bring back passthrough * lint * no more shell script * Update backend/run.sh --------- Co-authored-by: Matt Jadud <[email protected]> Co-authored-by: Hassan D. M. Sambo <[email protected]> Co-authored-by: Alex Steel <[email protected]> Co-authored-by: Daniel Swick <[email protected]>
- Loading branch information