Skip to content

Conversation

@Karavil
Copy link

@Karavil Karavil commented Sep 17, 2025

Why it matters: CloudFront served a brand-new index.html while the referenced app.[hash].js files were still on their way to S3, so early visitors hit 403s and saw a white screen.

 deploy start
   ├─▶ (reverse iteration) upload index.html
   │       └─▶ HTML points at app.[hash].js (missing)
   └───── lag ──▶ upload app.[hash].js
                           ↓
                       viewer → S3 403 → sad user

What changed: we keep user-defined cache semantics, but split fileOptions into HTML vs. non-HTML buckets so SST always ships hashed assets before HTML.

 configure: [ ...non-html..., ...html... ]
 reverse ▶  [ html-group, non-html-group ]
 reorder ▶  [ non-html-group, html-group ]
 serve   ▶  assets uploaded → index.html uploaded → no 403 gap

Testing: not run (library change).

@vimtor vimtor self-assigned this Dec 17, 2025
@vimtor
Copy link
Collaborator

vimtor commented Dec 18, 2025

thanks for your contribution @Karavil

i'm closing this in favor of #6289 since your pr didn't actually fixed the issue

@vimtor vimtor closed this Dec 18, 2025
@Karavil
Copy link
Author

Karavil commented Dec 18, 2025

thanks for your contribution @Karavil

i'm closing this in favor of #6118 since your pr didn't actually fixed the issue

Hey Vimtor, what do you mean it didn't actually fix the issue?

@Karavil
Copy link
Author

Karavil commented Dec 18, 2025

thanks for your contribution @Karavil

i'm closing this in favor of #6118 since your pr didn't actually fixed the issue

Also could you point me to the PR that you're merging? That points to the current one #6118

@vimtor
Copy link
Collaborator

vimtor commented Dec 18, 2025

sorry, it's this one #6289

@vimtor
Copy link
Collaborator

vimtor commented Dec 18, 2025

@Karavil more context on your pr:

it had a bug because by processing the non-html option first you accidentally include the html files with the first glob ** thus setting the wrong cache-control header for them

CleanShot 2025-12-18 at 18 38 53@2x

also, as you can see in the linked pr i found another issue that's more likely to be the root cause

@Karavil
Copy link
Author

Karavil commented Dec 18, 2025

@Karavil more context on your pr:

it had a bug because by processing the non-html option first you accidentally include the html files with the first glob ** thus setting the wrong cache-control header for them

CleanShot 2025-12-18 at 18 38 53@2x

also, as you can see in the linked pr i found another issue that's more likely to be the root cause

Got it! I appreciate the response and review :)

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