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

#2903: Target Stable/Staging for Clone Workflow #3061

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

Matt-Spence
Copy link
Contributor

@Matt-Spence Matt-Spence commented Nov 8, 2024

Ticket

Related to (but does not resolve) #2903

Changes

  • Changes target environments
  • Rename Workflow

Context for reviewers

Setup

Code Review Verification Steps

Unfortunately this can't be tested until merging, but we have run existing versions of this workflow against Staging/MS to verify it. Check the GH Actions tab and scroll through the latest runs of the "Clone Staging" workflow to see the results. You can also check Staging/MS to make sure they are functioning properly.

As the original developer, I have

Satisfied acceptance criteria and met development standards

  • Met the acceptance criteria, or will meet them in a subsequent PR
  • Created/modified automated tests
  • Update documentation in READMEs and/or onboarding guide

Ensured code standards are met (Original Developer)

  • If any updated dependencies on Pipfile, also update dependencies in requirements.txt.
  • Interactions with external systems are wrapped in try/except
  • Error handling exists for unusual or missing values

Validated user-facing changes (if applicable)

  • Tag @dotgov-designers in this PR's Reviewers for design review. If code is not user-facing, delete design reviewer checklist
  • Verify new pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)

As a code reviewer, I have

Reviewed, tested, and left feedback about the changes

  • Pulled this branch locally and tested it
  • Verified code meets all checks above. Address any checks that are not satisfied
  • Reviewed this code and left comments. Indicate if comments must be addressed before code is merged
  • Checked that all code is adequately covered by tests
  • Verify migrations are valid and do not conflict with existing migrations

Validated user-facing changes as a developer

Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.

  • New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
  • Checked keyboard navigability
  • Meets all designs and user flows provided by design/product
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • (Rarely needed) Tested as both an analyst and applicant user

As a designer reviewer, I have

Verified that the changes match the design intention

  • Checked that the design translated visually
  • Checked behavior. Comment any found issues or broken flows.
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links

Validated user-facing changes as a designer

  • Checked keyboard navigability
  • Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
  • Tested with multiple browsers (check off which ones were used)
    • Chrome
    • Microsoft Edge
    • FireFox
    • Safari
  • (Rarely needed) Tested as both an analyst and applicant user

References

Screenshots

Copy link

github-actions bot commented Nov 8, 2024

🥳 Successfully deployed to developer sandbox ms.

@Matt-Spence Matt-Spence changed the title [DRAFT] Target Stable/Staging for Clone Workflow Target Stable/Staging for Clone Workflow Nov 8, 2024
@Matt-Spence Matt-Spence changed the title Target Stable/Staging for Clone Workflow #2903: Target Stable/Staging for Clone Workflow Nov 8, 2024
@abroddrick abroddrick self-assigned this Nov 12, 2024
@@ -1,4 +1,4 @@
name: Clone Staging Database
name: Clone Stable Database

on:
schedule:
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment here is incorrect, please update

CF_USERNAME: ${{ secrets.CF_MS_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_MS_PASSWORD }}
CF_USERNAME: ${{ secrets.CF_STAGING_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_STAGING_PASSWORD }}
steps:
- name: Clone Database
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we updating to cf8-cli here?

Copy link
Contributor

Choose a reason for hiding this comment

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

also don't you need to do continue-on-error: true so that if this fails before unsharing the service the last step is triggered? reference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've been using cf8-cli for months (including when researching for this ticket) with no issues so I figured it would be fine to just go ahead and use it here too.

For your second question: I have set the next step to run always(), which does the same thing as continue-on-error in practice. Just two different ways of accomplishing the same thing.

Copy link
Contributor

@abroddrick abroddrick left a comment

Choose a reason for hiding this comment

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

Some blocking questions. I couldn't test the one on staging/ms right now because the login.gov test env is down. This should resolve by tomorrow and hopefully I can then log into the sandboxes to test this then.

@@ -1,4 +1,4 @@
name: Clone Staging Database
name: Clone Stable Database
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: Clone Stable Database
# This workflow runs at the top of every hour and can be manually run as needed
# The workflow will copy the database from stable (production) to our staging sandbox.
name: Clone Stable Database

Copy link
Contributor

Choose a reason for hiding this comment

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

Also if the database is missing columns/tables in staging that exist in stable then we do expect this workflow to fail temporarily, correct? If so update this comment to reflect that as that is a very real possibility

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we do, we will need to ensure that the target database has a compatible schema with the source database.

.github/workflows/clone-db.yaml Show resolved Hide resolved
.github/workflows/clone-db.yaml Show resolved Hide resolved
.github/workflows/clone-db.yaml Show resolved Hide resolved
Copy link

🥳 Successfully deployed to developer sandbox ms.

Copy link
Contributor

@abroddrick abroddrick left a comment

Choose a reason for hiding this comment

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

Quick change request can you have the fixtures be it's own step? Reasoning being that it will be faster for us to see what is breaking if it's just the fixtures step that's failing. Having it being in the clone step could make it look like the Cloning is failing

Copy link
Contributor

@abroddrick abroddrick left a comment

Choose a reason for hiding this comment

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

LGTM, tested staging workflow on staging and MS and verified the only big difference here is running fixtures on staging

@Matt-Spence Matt-Spence merged commit a872893 into main Nov 14, 2024
7 of 8 checks passed
@Matt-Spence Matt-Spence deleted the ms/2903-clone-stable-to-staging branch November 14, 2024 22:08
Copy link

🥳 Successfully deployed to developer sandbox ms.

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.

2 participants