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

Enable review apps with the staging database #1095

Merged
merged 3 commits into from
Apr 18, 2024
Merged

Conversation

xmedr
Copy link
Collaborator

@xmedr xmedr commented Apr 17, 2024

Overview

This alters the release script to look for either a signal that the app is running on either a production or staging environment.

The staging/production apps on heroku have a new boolean config var added to denote whether setup commands should be run.

Review apps have been set up with config vars nearly identical to the staging environment prior to opening this pr. They are also prepped to use the staging database instead of creating a new one every time a new review app gets made. The change in the release script is meant to prevent potential migrations on review apps from changing the staging db.

Smaller changes include updating the readme and clearing the cache on new releases. The nav would occasionally get formatted strangely and clearing the cache always solves this.

Testing Instructions

  • Confirm that a review app gets made with the functionality and data available on the staging site.
  • Run heroku releases:output v6 -a la-metro-cou-feature-re-zibkyf to see the output of the release marked as "Deploy"
    • Confirm that the output shows PRODUCTION or STAGING is not set, skipping setup management commands to note that migrations were not run

@fgregg fgregg temporarily deployed to la-metro-cou-feature-re-77tqxo April 17, 2024 19:12 Inactive
@fgregg fgregg temporarily deployed to la-metro-cou-feature-re-zibkyf April 17, 2024 19:24 Inactive
@xmedr xmedr temporarily deployed to la-metro-cou-feature-re-zibkyf April 17, 2024 20:21 Inactive
@xmedr xmedr marked this pull request as ready for review April 17, 2024 20:27
@xmedr xmedr requested a review from derekeder April 17, 2024 20:27
Copy link

@derekeder derekeder left a comment

Choose a reason for hiding this comment

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

nice - confirmed this works as expected and looks good. yay review apps!

python manage.py migrate --noinput
python manage.py createcachetable
python manage.py import_shapes data/final/boundary.geojson
python manage.py clear_cache

Choose a reason for hiding this comment

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

this line seems new. i wonder why the cache wasn't getting cleared before. seems fine to include now

@xmedr xmedr merged commit a196460 into main Apr 18, 2024
2 checks passed
@xmedr xmedr deleted the feature/review-apps branch April 18, 2024 13:34
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.

Consider review apps
3 participants