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

Tugboat Next.js server can be restarted via Composer command #17400

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

Conversation

alexfinnarn
Copy link
Contributor

@alexfinnarn alexfinnarn commented Mar 4, 2024

Description

closes #17209 by adding commands to restart the next server after changing git branches.

Testing done

Tested on Tugboat with a test branch that makes the next-build footer red and switched between that branch and others.

Screenshots

test-red-footer branch on Tugboat

Screenshot 2024-03-12 at 3 43 28 PM

QA steps

  1. Check that the preview server still works by going to the Tugboat URL for next, like https://next-suer27t71oqpgngyx21sblb9hukdweph.ci.cms.va.gov/.
    • Validate that the homepage loads and the footer is the typical "VA blue" or whatever they call it.
    • Validate any tricky parts of next-build, if you know them. I am not aware of typical smoke tests.
  2. Log into the CMS and head to "/admin/content/deploy/next".
  3. Fill out and submit the next server restart form with test-red-footer branch for next-build version and something else for the vets-website version.
  4. Wait a few seconds and refresh. Refresh again if the form fields are not disabled and the build has not started.
    • Validate that the form fields are disabled during the build.
    • Validate that the next-build.txt file link leads to a log file with data in it. The log should grow every time you refresh and end with ==> Done.
  5. Refresh the tab on "/admin/content/deploy/next".
    • Validate that the form fields are no longer disabled.
  6. Navigate back to the next preview server, a URL like https://next-suer27t71oqpgngyx21sblb9hukdweph.ci.cms.va.gov/.
    • Validate that the homepage loads and the footer is now bright red.
    • Validate any tricky parts of next-build, if you know them. I am not aware of typical smoke tests.
  7. (Bonus Points) For a real parlor trick, you can navigate back to "/admin/content/deploy/next" and choose a different next-build branch to restart the server with. You'd have to create another PR in next-build with noticeable changes, but just reporting that users should be able to keep rebuilding the same Tugboat preview with various branches, even if most will only choose a branch one time.

Note: This PR, department-of-veterans-affairs/next-build#451, should be deleted after testing.

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 4, 2024 20:00 Destroyed
@github-actions github-actions bot added Accelerated Publishing CMS Team CMS Product team that manages both editor exp and devops labels Mar 4, 2024
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 5, 2024 17:40 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 5, 2024 19:25 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 6, 2024 17:47 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 7, 2024 21:01 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 8, 2024 20:53 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 8, 2024 20:53 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 8, 2024 20:53 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 8, 2024 21:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 8, 2024 21:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 11, 2024 15:04 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 11, 2024 17:37 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 11, 2024 17:39 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 11, 2024 17:39 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 11, 2024 23:23 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 12, 2024 13:03 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 12, 2024 14:59 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 12, 2024 15:43 Destroyed
#pushd "./next"
yarn install
#popd
# @todo Should the manual steps go here like copying the .env file? or maybe in next-start.sh?
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 need to delete this comment but don't want to rebuild Tugboat before a review.


# Start the dev server. Vets-website assets need to be in place prior to this build.
APP_ENV=tugboat yarn start
# Need to start in the background so the script can exit.
APP_ENV=${APP_ENV} yarn start &> /dev/null &
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 am unsure if running in the background is needed but I think the script paused and didn't continue. However, output isn't logged this way so might need adjusting to get output in logs if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerated Publishing CMS Team CMS Product team that manages both editor exp and devops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tugboat Next.js server can be restarted via Composer command
2 participants