From ae126451a734776575576f83717984a7229a3871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taavi=20V=C3=A4=C3=A4n=C3=A4nen?= Date: Sat, 14 Jun 2025 10:50:05 +0300 Subject: [PATCH 1/3] Recommend using npm for build step To ensure the dependencies are installed via it. Change-Id: I02a4989579e1bf42fff0bede30636ff6b617a019 --- README.md | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87916fc..8888eb6 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ the containers with the new dependencies by running `docker-compose build` befor ## Useful commands ## To pre-compile nunjucks templates: -`nunjucks-precompile quarry/web/static/templates/ > quarry/web/static/templates/compiled.js` +`npm run build` See also commands listed in the mainters documentation: https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Quarry diff --git a/package.json b/package.json index 2b7122c..9e8bac9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "private": true, "scripts": { - "test": "eslint quarry/web/static/js/" + "test": "eslint quarry/web/static/js/", + "build": "nunjucks-precompile quarry/web/static/templates/ > quarry/web/static/templates/compiled.js" }, "devDependencies": { "eslint": "5.6.0", From d8b9864c9237487e3bfcb245fb6af0a527c39e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taavi=20V=C3=A4=C3=A4n=C3=A4nen?= Date: Sat, 14 Jun 2025 10:50:34 +0300 Subject: [PATCH 2/3] Fix frontend build Bug: T396904 Change-Id: Ie218df9e8e396d035393b289d2a07ee139649596 --- quarry/web/static/templates/compiled.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/quarry/web/static/templates/compiled.js b/quarry/web/static/templates/compiled.js index 773d10a..15db419 100644 --- a/quarry/web/static/templates/compiled.js +++ b/quarry/web/static/templates/compiled.js @@ -1,7 +1,7 @@ (function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["query-resultset.html"] = (function() { function root(env, context, frame, runtime, cb) { -var lineno = 0; -var colno = 0; +var lineno = null; +var colno = null; var output = ""; try { var parentTemplate = null; @@ -21,15 +21,14 @@ output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "ro output += " rows)\n \n
\n
\n \n
    \n "; frame = frame.push(); var t_3 = {"tsv": "TSV","json": "JSON","json-lines": "JSON Lines","csv": "CSV","wikitable": "Wikitable","html": "HTML"}; -if(t_3) {t_3 = runtime.fromIterator(t_3); -var t_1; +if(t_3) {var t_1; if(runtime.isArray(t_3)) { var t_2 = t_3.length; for(t_1=0; t_1 < t_3.length; t_1++) { -var t_4 = t_3[t_1][0]; -frame.set("[object Object]", t_3[t_1][0]); -var t_5 = t_3[t_1][1]; -frame.set("[object Object]", t_3[t_1][1]); +var t_4 = t_3[t_1][0] +frame.set("format", t_3[t_1][0]); +var t_5 = t_3[t_1][1] +frame.set("formatname", t_3[t_1][1]); frame.set("loop.index", t_1 + 1); frame.set("loop.index0", t_1); frame.set("loop.revindex", t_2 - t_1); @@ -112,8 +111,8 @@ root: root })(); (function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["query-status.html"] = (function() { function root(env, context, frame, runtime, cb) { -var lineno = 0; -var colno = 0; +var lineno = null; +var colno = null; var output = ""; try { var parentTemplate = null; From 3e3cd169e3942fefdfedece741eb348583c04382 Mon Sep 17 00:00:00 2001 From: Github Action Date: Sat, 14 Jun 2025 07:51:17 +0000 Subject: [PATCH 3/3] auto update of tag --- helm-quarry/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-quarry/values.yaml b/helm-quarry/values.yaml index e646799..968ac22 100644 --- a/helm-quarry/values.yaml +++ b/helm-quarry/values.yaml @@ -1,6 +1,6 @@ web: repository: 'quay.io/wikimedia-quarry/quarry' - tag: pr-86 # web tag managed by github actions + tag: pr-88 # web tag managed by github actions resources: requests: memory: "300Mi" @@ -11,7 +11,7 @@ web: worker: repository: 'quay.io/wikimedia-quarry/quarry' - tag: pr-86 # worker tag managed by github actions + tag: pr-88 # worker tag managed by github actions resources: requests: memory: "400Mi"