From 591ba6112a8cd4a357e46c44d7d848e39d895dcc Mon Sep 17 00:00:00 2001 From: Artur Tagisow Date: Mon, 16 Dec 2024 13:22:45 +0100 Subject: [PATCH 1/2] ES-1393 Fix /readyz returning 503 if readinessProbes not defined in options --- .changeset/curly-gifts-hang.md | 7 +++++++ packages/middleware/src/terminus.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/curly-gifts-hang.md diff --git a/.changeset/curly-gifts-hang.md b/.changeset/curly-gifts-hang.md new file mode 100644 index 0000000000..68a435413f --- /dev/null +++ b/.changeset/curly-gifts-hang.md @@ -0,0 +1,7 @@ +--- +"@vue-storefront/middleware": patch +--- + +- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts + +Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior) diff --git a/packages/middleware/src/terminus.ts b/packages/middleware/src/terminus.ts index 8dc7be5cdd..9948a7bd4e 100644 --- a/packages/middleware/src/terminus.ts +++ b/packages/middleware/src/terminus.ts @@ -30,7 +30,7 @@ export const createReadyzHandler = }; export const createTerminusOptions = ( - readinessChecks: ReadinessProbe[] + readinessChecks: ReadinessProbe[] = [] ): TerminusOptions => { return { useExit0: true, From 5032bff233c99d105f92df7ec71ce8b19ec21fd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 12:30:48 +0000 Subject: [PATCH 2/2] ci: release --- .changeset/curly-gifts-hang.md | 7 ------- docs/content/3.middleware/4.reference/change-log.md | 8 ++++++++ packages/middleware/CHANGELOG.md | 8 ++++++++ packages/middleware/package.json | 2 +- packages/sdk/package.json | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) delete mode 100644 .changeset/curly-gifts-hang.md diff --git a/.changeset/curly-gifts-hang.md b/.changeset/curly-gifts-hang.md deleted file mode 100644 index 68a435413f..0000000000 --- a/.changeset/curly-gifts-hang.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@vue-storefront/middleware": patch ---- - -- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts - -Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior) diff --git a/docs/content/3.middleware/4.reference/change-log.md b/docs/content/3.middleware/4.reference/change-log.md index a571f52173..85f8cf3661 100644 --- a/docs/content/3.middleware/4.reference/change-log.md +++ b/docs/content/3.middleware/4.reference/change-log.md @@ -1,5 +1,13 @@ # Change log +## 5.3.2 + +### Patch Changes + +- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts + +Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior) + ## 5.3.1 ### Patch Changes diff --git a/packages/middleware/CHANGELOG.md b/packages/middleware/CHANGELOG.md index a571f52173..85f8cf3661 100644 --- a/packages/middleware/CHANGELOG.md +++ b/packages/middleware/CHANGELOG.md @@ -1,5 +1,13 @@ # Change log +## 5.3.2 + +### Patch Changes + +- **[FIXED]** Fix /readyz returning 503 if readinessProbes not passed in middleware.config.ts + +Before this fix, sending a GET request to `http://localhost:4000/readyz` would return { "status": "error" } and a HTTP 503 status. This happened only when `readinessProbes` wasn't added to middleware options (the default behavior) + ## 5.3.1 ### Patch Changes diff --git a/packages/middleware/package.json b/packages/middleware/package.json index f0d27f3e4a..9a02739ea8 100644 --- a/packages/middleware/package.json +++ b/packages/middleware/package.json @@ -1,6 +1,6 @@ { "name": "@vue-storefront/middleware", - "version": "5.3.1", + "version": "5.3.2", "main": "lib/index.cjs.js", "module": "lib/index.es.js", "types": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 76ea85afa4..c26f9bf598 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -25,7 +25,7 @@ "devDependencies": { "@types/jest": "^29.0.3", "@types/node": "^18.11.17", - "@vue-storefront/middleware": "5.3.1", + "@vue-storefront/middleware": "5.3.2", "axios": "^1.6.7", "babel-preset-node": "^5.1.1", "isomorphic-fetch": "^3.0.0",