From 64084b0f6d29980078beeda0e1a4f92583d46d74 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Tue, 17 Sep 2024 15:57:30 -0400 Subject: [PATCH 1/3] chore: Upgrade blobs version to latest --- package-lock.json | 31 ++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 098477e803..2cb52015b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@fastly/http-compute-js": "1.1.4", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.0.1", "@netlify/build": "^29.54.2", "@netlify/edge-bundler": "^12.2.3", "@netlify/edge-functions": "^2.10.0", @@ -3867,10 +3867,11 @@ "dev": true }, "node_modules/@netlify/blobs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", - "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-8.0.1.tgz", + "integrity": "sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==", "dev": true, + "license": "MIT", "engines": { "node": "^14.16.0 || >=16.0.0" } @@ -3956,6 +3957,16 @@ } } }, + "node_modules/@netlify/build/node_modules/@netlify/blobs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", + "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.16.0 || >=16.0.0" + } + }, "node_modules/@netlify/build/node_modules/@netlify/opentelemetry-utils": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@netlify/opentelemetry-utils/-/opentelemetry-utils-1.2.1.tgz", @@ -22700,9 +22711,9 @@ "dev": true }, "@netlify/blobs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", - "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-8.0.1.tgz", + "integrity": "sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==", "dev": true }, "@netlify/build": { @@ -22771,6 +22782,12 @@ "yargs": "^17.6.0" }, "dependencies": { + "@netlify/blobs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", + "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "dev": true + }, "@netlify/opentelemetry-utils": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@netlify/opentelemetry-utils/-/opentelemetry-utils-1.2.1.tgz", diff --git a/package.json b/package.json index 692d451e72..69a86bee59 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "homepage": "https://github.com/netlify/next-runtime#readme", "devDependencies": { "@fastly/http-compute-js": "1.1.4", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.0.1", "@netlify/build": "^29.54.2", "@netlify/edge-bundler": "^12.2.3", "@netlify/edge-functions": "^2.10.0", From 3d6d3342e4d03f8dbd9c4f29c23085800d7cc656 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 18 Sep 2024 10:13:15 -0400 Subject: [PATCH 2/3] chore: replace references to experimental region --- src/run/regional-blob-store.cts | 10 ++++------ tests/utils/helpers.ts | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/run/regional-blob-store.cts b/src/run/regional-blob-store.cts index 350237472b..a524569cc4 100644 --- a/src/run/regional-blob-store.cts +++ b/src/run/regional-blob-store.cts @@ -1,13 +1,11 @@ -import { getDeployStore, Store } from '@netlify/blobs' +import { getDeployStore, GetWithMetadataOptions, Store } from '@netlify/blobs' const fetchBeforeNextPatchedIt = globalThis.fetch -export const getRegionalBlobStore = (args: Parameters[0] = {}): Store => { - const options = typeof args === 'string' ? { name: args } : args +export const getRegionalBlobStore = (args: GetWithMetadataOptions = {}): Store => { return getDeployStore({ - ...options, + ...args, fetch: fetchBeforeNextPatchedIt, - experimentalRegion: - process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? 'context' : undefined, + region: process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? undefined : 'us-east-2', }) } diff --git a/tests/utils/helpers.ts b/tests/utils/helpers.ts index c9d6e4ae1a..db6961734b 100644 --- a/tests/utils/helpers.ts +++ b/tests/utils/helpers.ts @@ -59,7 +59,6 @@ export const startMockBlobStore = async (ctx: FixtureTestContext) => { ctx.blobStore = getDeployStore({ apiURL: `http://${ctx.blobStoreHost}`, deployID: ctx.deployID, - experimentalRegion: 'context', siteID: ctx.siteID, token: BLOB_TOKEN, }) @@ -74,7 +73,6 @@ export const getBlobEntries = async (ctx: FixtureTestContext) => { : getDeployStore({ apiURL: `http://${ctx.blobStoreHost}`, deployID: ctx.deployID, - experimentalRegion: 'context', siteID: ctx.siteID, token: BLOB_TOKEN, }) From f07d8ecff3003ebc92f08b8cf9e68edc8745acf6 Mon Sep 17 00:00:00 2001 From: Mateusz Bocian Date: Wed, 18 Sep 2024 10:14:16 -0400 Subject: [PATCH 3/3] fix: feature has been fully released and flag defaults to true --- src/build/plugin-context.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/build/plugin-context.ts b/src/build/plugin-context.ts index 9b0ecc199c..e678cd9364 100644 --- a/src/build/plugin-context.ts +++ b/src/build/plugin-context.ts @@ -153,10 +153,6 @@ export class PluginContext { } get useRegionalBlobs(): boolean { - if (!(this.featureFlags || {})['next-runtime-regional-blobs']) { - return false - } - // Region-aware blobs are only available as of CLI v17.23.5 (i.e. Build v29.41.5) const REQUIRED_BUILD_VERSION = '>=29.41.5' return satisfies(this.buildVersion, REQUIRED_BUILD_VERSION, { includePrerelease: true })