RDoc-4100 Make CloudFront function code an update/publish a build step - #2673
Merged
Merged
Conversation
Fix the CSP push, which aborted the first staging deploy before writing.
get-response-headers-policy returns `{}` for headers that are not configured,
and update-response-headers-policy refuses that: once XSSProtection,
FrameOptions or ReferrerPolicy appears in the payload it requires its own
fields. The read shape is not a valid write shape, so empty objects are now
dropped before the config goes back. Stripping happens before the pre-write
snapshot and again on the post-write re-read, so both sides of every diff are
comparable and the one-field guarantee still holds.
Empty arrays are left alone, since {Quantity: 0, Items: []} is valid inbound.
The strip returns arrays comma-prefixed: unrolled, a one-element array would
collapse to a scalar and turn {Items: ["x"]} into {Items: "x"}. The guard
cannot catch that, because it compares post-strip against post-strip.
A config-sync failure no longer strands the content that phases 1 and 2 already
uploaded. The error is held and rethrown after the invalidation and the stale
asset cleanup, so the build still fails but the edge stops serving the previous
release from cache.
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.
Issue link
https://issues.hibernatingrhinos.com/issue/RDoc-4100
Additional description
Fixes the CSP push added in #2660, which aborted the first staging deploy before writing anything:
get-response-headers-policyreturns{}for headers that are not configured andupdate-response-headers-policyrefuses them, so the read shape of a policy is not a valid write shape.Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI