From 34f728521ca992ca53c1d692fd5bbc3ea24b54ad Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 22 Jan 2021 14:59:28 -0600 Subject: [PATCH 1/3] Add git-submodule to manage lattice version --- .gitignore | 1 - .gitmodules | 3 +++ Makefile | 10 ++++++++-- lattice | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 lattice diff --git a/.gitignore b/.gitignore index 9bf572296..82a553aed 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ vendor .DS_Store build *~ -lattice release-pilosa-fsck.*.*.tar.gz /log.* /tourna.log.* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..afb2db2d6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lattice"] + path = lattice + url = git@github.com:molecula/lattice.git diff --git a/Makefile b/Makefile index 9114fda54..a1b80b5b8 100644 --- a/Makefile +++ b/Makefile @@ -155,11 +155,17 @@ install: install-bench: go install -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/pilosa-bench +# Ensure lattice is cloned and the pinned version is checked out lattice: - git clone git@github.com:molecula/lattice.git + git submodule update --init +# Build the lattice assets build-lattice: lattice require-yarn - cd lattice && git pull && yarn install && yarn build + cd lattice && yarn install && yarn build + +# Upgrade lattice to the latest version +upgrade-lattice: lattice + git submodule update --remote # `go generate` protocol buffers generate-protoc: require-protoc require-protoc-gen-gofast diff --git a/lattice b/lattice new file mode 160000 index 000000000..36f453c1e --- /dev/null +++ b/lattice @@ -0,0 +1 @@ +Subproject commit 36f453c1ea3bf86c546a8ad4a88f2a926724d683 From 671c7262c9f756785f8adc1e67c07c3d715bd23b Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Fri, 22 Jan 2021 16:26:09 -0600 Subject: [PATCH 2/3] Add lattice to PHONY --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a1b80b5b8..2e6cc7331 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build check-clean clean build-lattice cover cover-viz default docker docker-build docker-test docker-tag-push generate generate-protoc generate-pql generate-statik gometalinter install install-build-deps install-golangci-lint install-gometalinter install-protoc install-protoc-gen-gofast install-peg install-statik prerelease prerelease-upload release release-build test testv testv-race testvsub testvsub-race test-txstore-rbf +.PHONY: build check-clean clean build-lattice cover cover-viz default docker docker-build docker-test docker-tag-push generate generate-protoc generate-pql generate-statik gometalinter install install-build-deps install-golangci-lint install-gometalinter install-protoc install-protoc-gen-gofast install-peg install-statik prerelease prerelease-upload release release-build test testv testv-race testvsub testvsub-race test-txstore-rbf lattice CLONE_URL=github.com/pilosa/pilosa MOD_VERSION=v2 From 852057533be7109e1fd51c85777fecfb11fbdc99 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Fri, 22 Jan 2021 16:51:17 -0600 Subject: [PATCH 3/3] Add lattice submodule upgrade instructions --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 4543a3524..f8ff52c19 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,15 @@ 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: