From 4f63201c1eadc79ba39a6ff2a575ba1d45d11248 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:59:53 +0200 Subject: [PATCH] [release-18.0] VTAdmin: Fix serve-handler's path-to-regexp dep and add default schema refresh (#16778) (#16782) Signed-off-by: Matt Lord Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Matt Lord --- examples/common/scripts/vtadmin-up.sh | 2 +- web/vtadmin/package-lock.json | 21 ++++++++++++++++----- web/vtadmin/package.json | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/examples/common/scripts/vtadmin-up.sh b/examples/common/scripts/vtadmin-up.sh index 356f6ac3880..499c6ea6204 100755 --- a/examples/common/scripts/vtadmin-up.sh +++ b/examples/common/scripts/vtadmin-up.sh @@ -43,7 +43,7 @@ vtadmin \ --alsologtostderr \ --rbac \ --rbac-config="${script_dir}/../vtadmin/rbac.yaml" \ - --cluster "id=${cluster_name},name=${cluster_name},discovery=staticfile,discovery-staticfile-path=${script_dir}/../vtadmin/discovery.json,tablet-fqdn-tmpl=http://{{ .Tablet.Hostname }}:15{{ .Tablet.Alias.Uid }}" \ + --cluster "id=${cluster_name},name=${cluster_name},discovery=staticfile,discovery-staticfile-path=${script_dir}/../vtadmin/discovery.json,tablet-fqdn-tmpl=http://{{ .Tablet.Hostname }}:15{{ .Tablet.Alias.Uid }},schema-cache-default-expiration=1m" \ > "${log_dir}/vtadmin-api.out" 2>&1 & vtadmin_api_pid=$! diff --git a/web/vtadmin/package-lock.json b/web/vtadmin/package-lock.json index 22265bbf6cb..c070d903b3c 100644 --- a/web/vtadmin/package-lock.json +++ b/web/vtadmin/package-lock.json @@ -21,6 +21,7 @@ "highcharts-react-official": "^3.1.0", "history": "^5.3.0", "lodash-es": "^4.17.21", + "path-to-regexp": "^8.1.0", "postcss-flexbugs-fixes": "^5.0.2", "postcss-preset-env": "^8.0.1", "query-string": "^7.1.3", @@ -13689,7 +13690,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.1.0.tgz", "integrity": "sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ==", - "dev": true, "engines": { "node": ">=16" } @@ -15504,7 +15504,7 @@ "mime-types": "2.1.18", "minimatch": "3.1.2", "path-is-inside": "1.0.2", - "path-to-regexp": "^8.0.0", + "path-to-regexp": "^3.3.0", "range-parser": "1.2.0" } }, @@ -15551,6 +15551,12 @@ "node": "*" } }, + "node_modules/serve-handler/node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true + }, "node_modules/serve/node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -27017,8 +27023,7 @@ "path-to-regexp": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.1.0.tgz", - "integrity": "sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ==", - "dev": true + "integrity": "sha512-Bqn3vc8CMHty6zuD+tG23s6v2kwxslHEhTj4eYaVKGIEB+YX/2wd0/rgXLFD9G9id9KCtbVy/3ZgmvZjpa0UdQ==" }, "path-type": { "version": "4.0.0", @@ -28252,7 +28257,7 @@ "mime-types": "2.1.18", "minimatch": "3.1.2", "path-is-inside": "1.0.2", - "path-to-regexp": "^8.0.0", + "path-to-regexp": "^3.3.0", "range-parser": "1.2.0" }, "dependencies": { @@ -28289,6 +28294,12 @@ "requires": { "brace-expansion": "^1.1.7" } + }, + "path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "dev": true } } }, diff --git a/web/vtadmin/package.json b/web/vtadmin/package.json index 045f826dcbe..6ed7cc50123 100644 --- a/web/vtadmin/package.json +++ b/web/vtadmin/package.json @@ -20,6 +20,7 @@ "highcharts-react-official": "^3.1.0", "history": "^5.3.0", "lodash-es": "^4.17.21", + "path-to-regexp": "^8.1.0", "postcss-flexbugs-fixes": "^5.0.2", "postcss-preset-env": "^8.0.1", "query-string": "^7.1.3",