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

Feature/TP1-569: Add Invoke command to copy Staging DB to a specific Review App #12493

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

AdalbertoMoz
Copy link
Contributor

@AdalbertoMoz AdalbertoMoz commented Jun 17, 2024

Description

This script is a refined and Python-rewritten version of the one used in the Mofo Cron Repository, with minor changes.

New Command:

I have introduced a new invoke command: invoke staging-to-review-app <review_app_name>. This command allows you to copy the Staging Database to the Review Apps.

Benefits of Using the Staging Database

1. Shared S3 Bucket:
Staging shares the same S3 bucket as the Review Apps. This ensures that all S3 assets are displayed correctly, preventing any loss of static files on the pages.

2. Recent Data:
Staging is synced with the Production Database every Monday. Therefore, the data copied to our Review App is always recent and up-to-date.

FAQ

- Is the issue with Review Apps redirecting to Staging resolved?
Yes, this issue is resolved. The cleanup.sql file now includes changes that automatically update the domain and hostnames within the Review App Databases for both Foundation and Mozfest sites.

- Do I need any prerequisites installed to execute the script?
Yes, you need to have the Heroku CLI and psql installed on your local machine. The script will check for these prerequisites and will not start if they are not installed.


Link to sample test page: https://foundation-s-feature-tp-id5474.herokuapp.com/
Related PRs/issues: #12255

Checklist

Pending Steps

  • Updating documentation to include this new invoke command

Tests
- [ ] Is the code I'm adding covered by tests?

Changes in Models:
- [ ] Did I update or add new fake data?
- [ ] Did I squash my migration?
- [ ] Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

Documentation:
- [ ] Is my code documented?
- [ ] Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

┆Issue is synchronized with this Jira Story

@AdalbertoMoz AdalbertoMoz temporarily deployed to foundation-s-feature-tp-oyrjt8 June 18, 2024 00:29 Inactive
@AdalbertoMoz AdalbertoMoz changed the title Test: Add invoke command Feature/TP1-569: Add Invoke command to copy Staging DB to a specific Review App Jun 18, 2024
@mofodevops mofodevops temporarily deployed to foundation-s-feature-tp-id5474 June 18, 2024 00:30 Inactive
@AdalbertoMoz AdalbertoMoz self-assigned this Jun 18, 2024
@AdalbertoMoz AdalbertoMoz temporarily deployed to foundation-s-feature-tp-id5474 June 18, 2024 00:36 Inactive
@AdalbertoMoz AdalbertoMoz temporarily deployed to foundation-s-feature-tp-id5474 June 18, 2024 15:54 Inactive
Copy link
Collaborator

@robdivincenzo robdivincenzo left a comment

Choose a reason for hiding this comment

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

LGTM and works well @AdalbertoMoz! Left one small comment on documenting before merging in. Thanks!

Copy link
Collaborator

@danielfmiranda danielfmiranda left a comment

Choose a reason for hiding this comment

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

Amazing work @AdalbertoMoz! Thanks very much for taking this on, I know its going to be very helpful to the team in the future 👍 Approved!

@AdalbertoMoz AdalbertoMoz temporarily deployed to foundation-s-feature-tp-id5474 June 19, 2024 16:43 Inactive
@AdalbertoMoz AdalbertoMoz temporarily deployed to foundation-s-feature-tp-id5474 June 19, 2024 16:53 Inactive
Copy link
Collaborator

@ramram-mf ramram-mf left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks Adal!

@AdalbertoMoz AdalbertoMoz merged commit da2d912 into main Jun 19, 2024
6 checks passed
@AdalbertoMoz AdalbertoMoz deleted the feature/TP1-569 branch June 19, 2024 18:10
@data-sync-user
Copy link
Collaborator

➤ Simon Acosta Torres commented:

PR merged.

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.

6 participants