[WEB-10045] Use platform astro-adapter-aws-lambda for CI builds - #39732
Open
devindford wants to merge 2 commits into
Open
[WEB-10045] Use platform astro-adapter-aws-lambda for CI builds#39732devindford wants to merge 2 commits into
devindford wants to merge 2 commits into
Conversation
Contributor
Preview links (active after the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
Prepares the Astro
/apiapp for the websites deployment platform's SSR model by building with the platform adapter in CI.astro-adapter-aws-lambdav1.0.0 (published via corp-node-packages) as a dependency.astro.config.mjsnow selects the adapter per build environment (resolveSiteEnv()):build:preview/build:live): useastro-adapter-aws-lambdainstatic: truemode. This generatesdist/_routes.json(default:static, emptyssr) that the deploy pipeline turns into the CloudFront KVS manifest, replacing the hand-written one, and emits thedist/lambda/entry.mjsstub the platform build tooling expects.@astrojs/nodestandalone, soastro previewkeeps working (the platform adapter has no preview mode).output: "server"+ per-routeprerender = trueshape is unchanged;staticApiGuardstill enforces the fully-static invariant. When the first SSR route lands,staticflips tofalsewithplatformModeper the divergences doc checklist.Companion PRs:
_routes.jsonmanifest + handler upload)Fixes WEB-10045 (follow-up: SSR readiness)
Merge readiness
For Datadog employees:
<name>/<description>convention and include the forward slash (/)./reviewto run an automated check before review.AI assistance
pi (Claude) helped wire the adapter selection into
astro.config.mjsand updatepackage.json/yarn.lock.Additional notes
astro syncloads the config in both CI mode (withCI_ENVIRONMENT_NAME+CI_COMMIT_REF_NAME) and local mode; the adapter package resolves and instantiates.viewsBuilder+ 7api-html-snapshotsfixture-snapshot failures exist on the base branch without these changes).CI_ENVIRONMENT_NAME=preview CI_COMMIT_REF_NAME=<branch> yarn build:preview(or let CI run it) and confirmdist/_routes.jsonis emitted with"default":"static"and emptyssr, and thatdist/lambda/entry.mjsis present.