From f51bb0ea43da33f4a28786dddda4b8d01b2121c4 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 24 May 2021 20:42:08 -0500 Subject: [PATCH 1/3] Update and verbosify job-skipping CI steps --- .circleci/config.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e02e7d45a..ffe55c216 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,11 +37,23 @@ commands: skip-if-root-unchanged: description: "skips the parent job if the PR includes no changes to pilosa" steps: - - run: '[ -n "$(git diff --name-only HEAD $(git merge-base master HEAD) | grep -v \"^lattice/\")" ] || circleci step halt || true' + - run: | + ROOT_CHANGED_FILES="$(git diff --name-only HEAD $(git merge-base master HEAD) | grep -v '^lattice/')" + echo "ROOT_CHANGED_FILES = $ROOT_CHANGED_FILES" + if [ -z $ROOT_CHANGED_FILES ] ; then + echo "halting step" + circleci step halt + fi skip-if-lattice-unchanged: description: "skips the parent job if the PR includes no changes to lattice" steps: - - run: '[ -n "$(git diff --name-only HEAD $(git merge-base master HEAD) | grep ^lattice/\")" ] || circleci step halt || true' + - run: | + LATTICE_CHANGED_FILES="$(git diff --name-only HEAD $(git merge-base master HEAD) | grep '^lattice/')" + echo "LATTICE_CHANGED_FILES = $LATTICE_CHANGED_FILES" + if [ -z $LATTICE_CHANGED_FILES ] ; then + echo "halting step" + circleci step halt + fi jobs: setup: From 45dd6dd6bc60c2ec1b41f3ef636e7ac82c17bb85 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 24 May 2021 21:09:57 -0500 Subject: [PATCH 2/3] Remove leftovers from lattice submodule --- README.md | 9 --------- api.go | 5 ----- http/handler.go | 2 +- version.go | 5 ----- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index f8ff52c19..4543a3524 100644 --- a/README.md +++ b/README.md @@ -58,15 +58,6 @@ Check out how the Pilosa [Data Model](https://www.pilosa.com/docs/data-model/) w You can interact with Pilosa directly in the console using the [Pilosa Query Language](https://www.pilosa.com/docs/query-language/) (PQL). -## Upgrading UI - -Lattice is now a submodule of Pilosa, for the purpose of keeping the frontend and backend components of the UI system synchronized. When making a change to the UI that requires changing both the backend and frontend, follow steps in this order: - -1. merge frontend (Lattice) PR -2. run `make upgrade-lattice` -3. run `git add lattice`, `git commit -m"Upgrade Lattice"`, `git push` -4. merge backend (Pilosa) PR - ## Client Libraries There are supported libraries for the following languages: diff --git a/api.go b/api.go index 35ff82b20..06c983c3e 100644 --- a/api.go +++ b/api.go @@ -1841,11 +1841,6 @@ func (api *API) Version() string { return strings.TrimPrefix(Version, "v") } -// Version returns the Lattice version. -func (api *API) LatticeVersion() string { - return LatticeVersionInfo() -} - // Info returns information about this server instance. func (api *API) Info() serverInfo { si := api.server.systemInfo diff --git a/http/handler.go b/http/handler.go index 8e74e50eb..a5acf5ab0 100644 --- a/http/handler.go +++ b/http/handler.go @@ -507,7 +507,7 @@ type statikHandler struct { func newStatikHandler(h *Handler) statikHandler { fs, err := h.fileSystem.New() if err == nil { - h.logger.Printf("enabled Web UI (%s) at %s", h.api.LatticeVersion(), h.url) + h.logger.Printf("enabled Web UI at %s", h.url) } return statikHandler{ diff --git a/version.go b/version.go index 73a78f5c7..7d886e5ed 100644 --- a/version.go +++ b/version.go @@ -23,7 +23,6 @@ var Version string var Commit string var Variant string var BuildTime string -var LatticeCommit string var GoVersion string = runtime.Version() var TrialDeadline string @@ -59,7 +58,3 @@ func VersionInfo() string { } return prefix + "Pilosa" + suffix } - -func LatticeVersionInfo() string { - return "g" + LatticeCommit -} From 58f0f42c1e89b94f7dc29dbf3e662c5fc8e0bb16 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 24 May 2021 21:10:27 -0500 Subject: [PATCH 3/3] Add /querybuilder path to statik lattice handler --- http/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/handler.go b/http/handler.go index a5acf5ab0..76ebd87dd 100644 --- a/http/handler.go +++ b/http/handler.go @@ -363,7 +363,7 @@ func (h *Handler) collectStats(next http.Handler) http.Handler { // latticeRoutes lists the frontend routes that do not directly correspond to // backend routes, and require special handling. -var latticeRoutes = []string{"/tables", "/query"} +var latticeRoutes = []string{"/tables", "/query", "/querybuilder"} // TODO somehow pull this from some metadata in the lattice directory // newRouter creates a new mux http router. func newRouter(handler *Handler) http.Handler {