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

DRAFT Read replication and moving the API to a second database #4427

Draft
wants to merge 96 commits into
base: main
Choose a base branch
from

Commits on Sep 27, 2024

  1. Updating with new layout

    jadudm committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    f1e4a70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40158bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    660b98e View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2024

  1. In-progress.

    jadudm committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    b2263e7 View commit details
    Browse the repository at this point in the history
  2. Updating ignores...

    jadudm committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    d54e8fa View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Runs a ffull sequence

    This runs a full install sequence. Ready for testing on preview.
    jadudm committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    7e54577 View commit details
    Browse the repository at this point in the history
  2. Cleaining up

    jadudm committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    6e4470e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    70e2a13 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Bringup for the Admin API

    Adds the access tables to its own startup. Admin API relies on it, or it
    won't start.
    jadudm committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    a31eea0 View commit details
    Browse the repository at this point in the history
  2. Cleanup, missed files.

    jadudm committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b3e8523 View commit details
    Browse the repository at this point in the history
  3. These are important...

    How did I miss those?
    jadudm committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    e4fa18f View commit details
    Browse the repository at this point in the history
  4. Adding GH action, script

    jadudm committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    de6c7ea View commit details
    Browse the repository at this point in the history
  5. Expand the admin API to increase visibility

    We should be able to inspect more tables, for debugging.
    jadudm committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    b30ba03 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Full-up, with performance testing

    This brings up the full API, and is ready for performance testing in
    `preview`.
    jadudm committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    1337097 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Updates for live test.

    jadudm committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    65f7365 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. Improving/simplifying

    It is cleaner than it was, and may make it easier to debug the `preview`
    deploy.
    jadudm committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    1be0b83 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Ready for testing in preview

    Adds grabbing sling into the mix
    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    a809bea View commit details
    Browse the repository at this point in the history
  2. Source the script...

    Testing again
    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    88bc8a5 View commit details
    Browse the repository at this point in the history
  3. Fix path to sling

    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0e4f240 View commit details
    Browse the repository at this point in the history
  4. Making the checks noisy.

    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    a94598c View commit details
    Browse the repository at this point in the history
  5. Noisyer.

    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    2006d8a View commit details
    Browse the repository at this point in the history
  6. Don't exit so quickly...

    jadudm committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b95cb61 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6f1d153 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Before further renaming.

    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    8c2a047 View commit details
    Browse the repository at this point in the history
  2. Simplified.

    Also, added partitions.
    
    Partitions are 3x faster for downloading all the data (by year), but 10x
    slower than batches (via EXPLAIN). In the real, it is 2x slower to
    download than batches, but 3x faster than a straight download.
    
    So. Probably worth it, if we can document that people downloading all
    the data should either 1) do so year-by-year, or 2) use batches.
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    e3cc950 View commit details
    Browse the repository at this point in the history
  3. Forgot to delete a bunch of things...

    And, redeploying...
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    eb12bad View commit details
    Browse the repository at this point in the history
  4. Set +/-e around check...

    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    d5d4915 View commit details
    Browse the repository at this point in the history
  5. Trying to get past error...

    Need to just return a non-zero exit code...
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    6b45c49 View commit details
    Browse the repository at this point in the history
  6. Fixing SQL checks

    Need to *always* succeed...
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    328e9b9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3539ffc View commit details
    Browse the repository at this point in the history
  8. Make the sources the same

    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    1093b0f View commit details
    Browse the repository at this point in the history
  9. Fix echo statements

    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    cd525cb View commit details
    Browse the repository at this point in the history
  10. Try set -e?

    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    cbadf2c View commit details
    Browse the repository at this point in the history
  11. What about set +e...

    We don't really want this, but will it allow functions to return
    non-zero?
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    2b33286 View commit details
    Browse the repository at this point in the history
  12. Working around bash...

    Setting a global function response variable...
    jadudm committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    cf6b5c9 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Incremental on removal of Tribal/admin API.

    This was work-in-flight. Instead of pushing further, I'm committing the in-between state. This moved some Admin API stuff around, which I'll remove in the next commit.
    
    The config change is for local dev only. We had a bucket called `gsa-fac-private-s3`, which was legacy naming that has been superceded in all other environments. The bucket is now called `fac-private-s3`, mirroring the production environments. This should not impact any operations except for local/Docker execution. (And, it should be transparent)
    
    The next commit should clean this up further.
    jadudm committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    a511d9c View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. Big update...

    Probably wanted more incremental commits.
    
    This shuffled the API around, and has a pytest for the API that can be
    run locally against the local stack or the remote/live environments.
    jadudm committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    a58ebb2 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into jadudm/api-perf

    Resolves the conflict(s). Things that Bobby and I both touched; nothing in the mainline app.
    jadudm committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    d1238ec View commit details
    Browse the repository at this point in the history
  3. Simulating pre-deploy backup

    Our local environment has to make sure that fac-snapshot-db looks
    "right" before we do anything. This means making sure we run cgov-util
    to do a snapshot before we do anything pre/post with SQL.
    jadudm committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    2ea604a View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. Fixes Minio, copies data

    This introduces a new copy of the data, so that the tables we back up to
    every night do not become an issue. (That is, we want the API bound to
    the copy, not to the copies that get dumped every night.)
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    8b5d43a View commit details
    Browse the repository at this point in the history
  2. Using a VCAP_SERVICES locally

    This lets the local config (at least for bash purposes) look almost
    exactly like the cloud.gov setup.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    1656bad View commit details
    Browse the repository at this point in the history
  3. Minor change, move to /tmp

    This keeps the container from dropping products like cgov-util into our
    local filesystem.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    6f5b205 View commit details
    Browse the repository at this point in the history
  4. Move curation tracking init

    This is now "just SQL," and does not need to be managed by the
    management command.
    
    It should run in the `pre` sequence. This way, the triggers are
    configured early in the process. We then run the `--disable` promptly
    afterwards.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    9ea4a29 View commit details
    Browse the repository at this point in the history
  5. Removing unnecessary CREATE SCHEMA

    These are redundant; they're issued earlier in the sequence.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    cb0fa77 View commit details
    Browse the repository at this point in the history
  6. Fixed my partial rename

    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    03a4e6d View commit details
    Browse the repository at this point in the history
  7. This points advanced search at pd.combined

    Correctly uses DB2 for advanced search.
    
    May want to implement it differently.
    
    Changes for this in one commit, to make finding it easy.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    1747897 View commit details
    Browse the repository at this point in the history
  8. Admin Panel and touch-ups

    Admin Panel
    - Introducing 2 new groups - `helpdesk` and `readonly`. These groups will be used with new permissions for performing Admin API operations directly through the UI instead.
    - Introducing 2 new tables, which were previously accessible through the Admin API. Helpdesk will have CRUD operations on these tables.
    
    StaffUser management
    - Introduced a `staffusers.json` file, which will now manage the permissions for the staff in respect to the Admin UI.
    - New mgmt command which is handled through `run.sh` to create the staff users according to the above JSON list.
    - Updated onboarding document to reflect a new user joining the Admin Panel.
    
    OTHER
    - linting.
    rnovak338 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    7315cf9 View commit details
    Browse the repository at this point in the history
  9. Remove Sling README

    rnovak338 committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    0ff0629 View commit details
    Browse the repository at this point in the history
  10. Moves general back into the public_100 tables.

    The move out was part of debugging, and unnecessary. This reduces the
    number of files, and keeps like-with-like.
    
    Permissions simplification/removal; picked up elsewhere/later in the
    sequence. (And, the alter on sequences may not have been necessary at
    all.)
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    551f85e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5f300a2 View commit details
    Browse the repository at this point in the history
  12. Simplified run.sh

    Removes an unnecessary step.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    affe2b7 View commit details
    Browse the repository at this point in the history
  13. Updated the sling script for bulk data

    This is a proof-of-concept included with the work. It's in the tree, and
    I've taken it out of active use/an active part of startup.
    
    However, we might consider working it into the nightly, to start testing
    it.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    3aa6266 View commit details
    Browse the repository at this point in the history
  14. Simplified local data load

    This used to do a cgov-util copy. Now, it doesn't. The startup sequence
    should take care of it.
    jadudm committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    d329f27 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Updating to reflect new startup sequence

    This was out of date. Retrying preview deploy.
    jadudm committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    c2149f1 View commit details
    Browse the repository at this point in the history
  2. And, forgot the sourcing...

    jadudm committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    e1a3bb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    edf2c1f View commit details
    Browse the repository at this point in the history
  4. Add replaces to Django

    Ref: 8d59859
    asteel-gsa committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    5dd7e92 View commit details
    Browse the repository at this point in the history
  5. Undo

    asteel-gsa committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    db1927b View commit details
    Browse the repository at this point in the history
  6. Should fix local standup/build

    We need to always load the fake VCAP_SERVICES from the file when running
    locally.
    jadudm committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    3ec3e81 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. Removing orderby on combined

    There's no reason to order the results from the mega-table.
    jadudm committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    ffad20f View commit details
    Browse the repository at this point in the history
  2. Splits things away from startup

    Now, pre-post is per-db.
    
    That means we must run the pre/post on SNAPSHOT separately in an action
    before deploy.
    jadudm committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    409792b View commit details
    Browse the repository at this point in the history
  3. Prep API Standup Test

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    7abe12a View commit details
    Browse the repository at this point in the history
  4. Fixes run.sh

    Trying to figure out a bug in staffusers...
    
    :w
    jadudm committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    decc89a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dcb3581 View commit details
    Browse the repository at this point in the history
  6. Update Cypress E2E API checks

    - Fixed an issue where Cypress was checking an undefined method type `HEAD` for the existence of the PDF report.
    - Now, we are just retrieving it with `GET` and checking for a valid status code.
    rnovak338 committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    337ea0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f2ae9de View commit details
    Browse the repository at this point in the history
  8. Fixing email, whitespace

    jadudm committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    df8236d View commit details
    Browse the repository at this point in the history
  9. Test api refresh

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    f2055c5 View commit details
    Browse the repository at this point in the history
  10. Api chmod +x

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    825a3e0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    814a5a7 View commit details
    Browse the repository at this point in the history
  12. Push to run api_refresh

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    72a86a0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    04970aa View commit details
    Browse the repository at this point in the history
  14. API Refresh test

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    d2d910d View commit details
    Browse the repository at this point in the history
  15. Overthinking bash pathing

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    53ede5a View commit details
    Browse the repository at this point in the history
  16. Debugging typo removal

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    5f8a7ec View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    9b361e9 View commit details
    Browse the repository at this point in the history
  18. TF, sequencing

    1. Updates terraform with correct APIs.
    2. Removes more schemas
    3. Aligns compose with our changes
    jadudm committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    bdbbe31 View commit details
    Browse the repository at this point in the history
  19. API Refresh Test - Final?

    asteel-gsa committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    cf769b9 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8977b6d View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. Testing with data

    jadudm committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    209c26a View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Allows for configuration of the DB

    This makes it possible to target a DB that is tunneled, as opposed to
    only using the containerized DB.
    
    Handy for testing in the preview environment.
    
    Uses external env vars to do this, so is safe.
    jadudm committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    38ac254 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8033d3d View commit details
    Browse the repository at this point in the history
  3. Adding documentation

    jadudm committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    ec602d5 View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. Configuration menu
    Copy the full SHA
    2d009d6 View commit details
    Browse the repository at this point in the history
  2. Fix workflows

    asteel-gsa committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    e569dc6 View commit details
    Browse the repository at this point in the history
  3. Fixing two missing tables...

    jadudm committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    fc614dd View commit details
    Browse the repository at this point in the history
  4. Updating tests.

    :wq
    jadudm committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    ab68fa0 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. Linting

    rnovak338 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    24c2c5c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8815dd2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04a85b8 View commit details
    Browse the repository at this point in the history
  4. Linting

    rnovak338 committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    f2084e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. More linting - bandit

    Added max timeout to request
    rnovak338 committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    b04e944 View commit details
    Browse the repository at this point in the history
  2. Reformat local python API tests to rest of the testing suite

    Now uses Django factory testing (like we do with our other tests that fall under `manage.py test`) for the tests that were written up by Matt.
    INCOMPLETE - check the "FIXME" comment. Currently the environment is hardcoded to "local" under the `ApiTests` class, and I haven't gotten a "success" response from the following tests.
    - `test_suppressed_not_accessible_with_bad_key`
    - `test_suppressed_accessible_with_good_key`
    rnovak338 committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    0256047 View commit details
    Browse the repository at this point in the history
  3. FE Linting

    rnovak338 committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    015af34 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2024

  1. Configuration menu
    Copy the full SHA
    d1a17ae View commit details
    Browse the repository at this point in the history
  2. Linting

    rnovak338 committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    04e19e4 View commit details
    Browse the repository at this point in the history