From 138a7d5841154c2fe8abcc55d93ac82a742045c3 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:54:05 -0400 Subject: [PATCH] VTAdmin: Fix serve-handler's path-to-regexp dep and add default schema refresh (#16778) Signed-off-by: Matt Lord --- examples/common/scripts/vtadmin-up.sh | 2 +- web/vtadmin/package-lock.json | 10 ++++++++-- web/vtadmin/package.json | 1 + 3 files changed, 10 insertions(+), 3 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 c46f0c6f480..0c169be4517 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", @@ -14133,7 +14134,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" } @@ -16208,7 +16208,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" } }, @@ -16233,6 +16233,12 @@ "node": ">= 0.6" } }, + "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", diff --git a/web/vtadmin/package.json b/web/vtadmin/package.json index 52029ddd9e4..78d14ea9e9c 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",