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

VACMS-16288 use generated assets for next preview server #16340

Merged
merged 15 commits into from
Jan 2, 2024

Conversation

tjheffner
Copy link
Contributor

@tjheffner tjheffner commented Dec 6, 2023

Description

Relates to #16288. (or closes?)

next-build needs the assets from vets-website, cms already requests a full content release, let's re-use those assets to save a little bit of time.

Not able to re-use the vets-website built from content-build, issues with symlinks & timing. Easiest approach for now is to build vets-website separately solely for next-build's use.

Testing done

  • tried different combinations of yarn dev and yarn start with symlinks from vets-website directories. Ultimately, needed to build and install vets-website at the tugboat root (similar to next-build) and symlink from there. In this way, we can ensure that assets are available for next-build preview immediately without failure.

QA steps

  • enable the next build feature flag
  • visit a story page
  • preview hopefully renders quicker than it does, with all correct assets in place

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

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 6, 2023 23:01 Destroyed
@tjheffner tjheffner force-pushed the VACMS-16288-next-preview-assets branch from 77e082e to 44779da Compare December 20, 2023 23:06
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 20, 2023 23:06 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 20, 2023 23:16 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 20, 2023 23:51 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 00:22 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 02:07 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 16:51 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 17:30 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 18:07 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 18:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 21, 2023 20:43 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 22, 2023 16:18 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 22, 2023 18:29 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 22, 2023 19:43 Destroyed
@tjheffner tjheffner changed the title [WIP] VACMS-16288 use generated assets for next preview server VACMS-16288 use generated assets for next preview server Dec 22, 2023
@tjheffner tjheffner marked this pull request as ready for review December 22, 2023 21:49
@tjheffner tjheffner requested a review from a team as a code owner December 22, 2023 21:49

# Create symlink between vets-website assets and next-build
# - ln -snf "${DOCROOT}/vendor/va-gov/vets-website/build/localhost/generated" "${TUGBOAT_ROOT}/next/public/generated"
- ln -snf "${TUGBOAT_ROOT}/vets-website/build/localhost/generated" "${TUGBOAT_ROOT}/next/public/generated"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noting that attempting to symlink to the vets-website installed inside vendor seemed to have issues either creating the symlink or building vets-website later as part of content-build.

Installing & symlinking to a different directory entirely had no issues, the assets are immediately present for the next-build server.

@tjheffner
Copy link
Contributor Author

Noting that the Rebuild Tugboat Preview / Rebuild Tugboat Preview (pull_request) Failing after 6s check is a false alarm for this PR, as I needed to manually rebuild the tugboat preview to test changes inside the init: block. All other checks are passing, which is expected.

Copy link
Contributor

@ndouglas ndouglas left a comment

Choose a reason for hiding this comment

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

Thank you again for discussing the approach with me 🙂

@tjheffner tjheffner merged commit f0b0711 into main Jan 2, 2024
20 of 21 checks passed
@tjheffner tjheffner deleted the VACMS-16288-next-preview-assets branch January 2, 2024 23:12
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.

3 participants