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

fix: set Blobs region in serve command #6597

Merged
merged 2 commits into from
May 14, 2024
Merged

fix: set Blobs region in serve command #6597

merged 2 commits into from
May 14, 2024

Conversation

eduardoboucas
Copy link
Member

Summary

Sets the right metadata properties in the Blobs context for the experimentalRegion property to work correctly in the serve command.

Fixes FRA-503.

@eduardoboucas eduardoboucas requested a review from a team as a code owner May 14, 2024 12:37
Copy link

github-actions bot commented May 14, 2024

📊 Benchmark results

Comparing with 33d2c2c

  • Dependency count: 1,343 (no change)
  • Package size: 311 MB ⬆️ 0.00% increase vs. 33d2c2c
  • Number of ts-expect-error directives: 993 (no change)

Copy link
Contributor

@mrstork mrstork left a comment

Choose a reason for hiding this comment

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

Looks good to me! Tested with a few local apps that were erroring previously, and the internal server error no longer shows up 👍

@@ -27,6 +28,7 @@ export type BlobsContext = BlobsContextWithAPIAccess | BlobsContextWithEdgeAcces
let hasPrintedLocalBlobsNotice = false

export const BLOBS_CONTEXT_VARIABLE = 'NETLIFY_BLOBS_CONTEXT'
const DEV_REGION = 'dev'
Copy link
Contributor

@mrstork mrstork May 14, 2024

Choose a reason for hiding this comment

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

dev is basically just a dummy value, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's a value with no special meaning. We need to have some value for a region, and since we won't actually hit a production service while running dev or serve, it doesn't really matter what the value is.

I've used dev because that's what we're using when invoking functions:

@eduardoboucas eduardoboucas merged commit 3bdf075 into main May 14, 2024
48 checks passed
@eduardoboucas eduardoboucas deleted the fix/blobs-serve branch May 14, 2024 13:56
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.

None yet

2 participants