As from UIv2.2.12 ui-server is part of UI code only, I am trying to build ui-server in that repo.
To build I am using the command ‘make build-server’ but it gives the following error,
github.com/temporalio/ui-server/v2/server/api imports
github.com/temporalio/ui-server/v2/api/workflowservice/v1: module github.com/temporalio/ui-server@latest found (v0.15.1), but does not contain package github.com/temporalio/ui-server/v2/api/workflowservice/v1
server\api\handler.go:35:2: no required module provides package github.com/temporalio/ui-server/v2/api/workflowservice/v1; to add it:
go get github.com/temporalio/ui-server/v2/api/workflowservice/v1
When running “go get github.com/temporalio/ui-server/v2/api/workflowservice/v1 ” it gives following error,
go: module github.com/temporalio/ui-server@upgrade found (v0.15.1), but does not contain package github.com/temporalio/ui-server/v2/api/workflowservice/v1
Could you please provide some solution to fix this issue or any other way to run ui-server.
Try removing your local ui-server clone and re-clone it from github.
Think this is due to git update still keeping a submodule that was removed from the ui-server repo that you still might have locally.
esc
June 21, 2023, 7:52pm
3
Hello i seem to be having the same issue with v2.16.5 or building directly from the main branch. The Dockerfile also fails to build the same issue.
% docker build . -t ui
[+] Building 30.3s (16/20) docker:orbstack
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 820B 0.0s
=> [internal] load metadata for docker.io/temporalio/base-server:1.15.1 1.6s
=> [internal] load metadata for docker.io/temporalio/base-builder:1.14.1 1.5s
=> [server-builder 1/6] FROM docker.io/temporalio/base-builder:1.14.1@sha256:15d101f0cb04b271335c0c60d2aa828b5a984eb80365887f8366e528393cbea9 9.7s
=> => resolve docker.io/temporalio/base-builder:1.14.1@sha256:15d101f0cb04b271335c0c60d2aa828b5a984eb80365887f8366e528393cbea9 0.0s
=> => sha256:3bb6809feae6840b6f39626e494885e6e3669032920bbd16d82957d71a7f41bb 155B / 155B 0.3s
=> => sha256:15d101f0cb04b271335c0c60d2aa828b5a984eb80365887f8366e528393cbea9 1.61kB / 1.61kB 0.0s
=> => sha256:1d1bddc402c2b54f2d335cc276f324d8e1b75f06a5a2266af9b28cb3f343b4a5 1.25kB / 1.25kB 0.0s
=> => sha256:8f354c03548212c6fc53bfec56614b8e602cf0db36d25c090d6e0382209fc773 5.47kB / 5.47kB 0.0s
=> => sha256:5a768fa670f57b0faf1a0a8cb211432ed97307628729fa53e3ea9981ba7512d4 286.29kB / 286.29kB 0.3s
=> => sha256:04e93037748df9b60559b897102d67352180f07a12cbbaba3c4e9d2f55358c0c 96.08MB / 96.08MB 6.6s
=> => extracting sha256:5a768fa670f57b0faf1a0a8cb211432ed97307628729fa53e3ea9981ba7512d4 0.0s
=> => sha256:d4837a9776ddec88f2664a7f871584cef80b086afdb1df9ad2103c86d92fa644 5.27MB / 5.27MB 1.6s
=> => extracting sha256:04e93037748df9b60559b897102d67352180f07a12cbbaba3c4e9d2f55358c0c 2.8s
=> => extracting sha256:3bb6809feae6840b6f39626e494885e6e3669032920bbd16d82957d71a7f41bb 0.0s
=> => extracting sha256:d4837a9776ddec88f2664a7f871584cef80b086afdb1df9ad2103c86d92fa644 0.1s
=> [internal] load build context 0.1s
=> => transferring context: 4.71MB 0.0s
=> [ui-server 1/9] FROM docker.io/temporalio/base-server:1.15.1@sha256:a52ba3dd822dc12af107813d7bb95ddd95e3694889a51b6ffe06aa222cdcd8bf 0.1s
=> => resolve docker.io/temporalio/base-server:1.15.1@sha256:a52ba3dd822dc12af107813d7bb95ddd95e3694889a51b6ffe06aa222cdcd8bf 0.0s
=> => sha256:4ef787281079eef732f3f715608d72c026e570e3c215b63d5edcfd1c2e57da18 865B / 865B 0.0s
=> => sha256:e43c303d9c8bad2a0c84cb7e1179ad35d21be74576ea51973c1feb8333dfb5cb 2.49kB / 2.49kB 0.0s
=> => sha256:a52ba3dd822dc12af107813d7bb95ddd95e3694889a51b6ffe06aa222cdcd8bf 1.61kB / 1.61kB 0.0s
=> [ui-server 2/9] WORKDIR /home/ui-server 0.1s
=> [ui-server 3/9] RUN addgroup -g 5000 temporal 0.3s
=> [ui-server 4/9] RUN adduser -u 5000 -G temporal -D temporal 0.4s
=> [ui-server 5/9] RUN mkdir ./config 0.4s
=> [server-builder 2/6] WORKDIR /home/server-builder 0.2s
=> [server-builder 3/6] COPY go.mod go.sum ./ 0.0s
=> [server-builder 4/6] RUN go mod download 16.4s
=> [server-builder 5/6] COPY . ./ 0.0s
=> ERROR [server-builder 6/6] RUN make build-server 2.4s
------
> [server-builder 6/6] RUN make build-server:
0.366 go mod tidy
0.366 go build -o ui-server ./cmd/server/main.go
0.462 go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
0.482 go: downloading github.com/google/go-cmp v0.5.9
0.677 go: downloading github.com/kr/pretty v0.3.0
0.719 go: downloading github.com/rogpeppe/go-internal v1.9.0
0.719 go: downloading github.com/kr/text v0.2.0
0.850 go: finding module for package github.com/temporalio/ui-server/v2/api/workflowservice/v1
0.850 go: finding module for package github.com/temporalio/ui-server/v2/api/operatorservice/v1
1.255 go: downloading github.com/temporalio/ui-server v0.15.1
2.285 github.com/temporalio/ui-server/v2/server/api imports
2.285 github.com/temporalio/ui-server/v2/api/operatorservice/v1: module github.com/temporalio/ui-server@latest found (v0.15.1), but does not contain package github.com/temporalio/ui-server/v2/api/operatorservice/v1
2.285 github.com/temporalio/ui-server/v2/server/api imports
2.285 github.com/temporalio/ui-server/v2/api/workflowservice/v1: module github.com/temporalio/ui-server@latest found (v0.15.1), but does not contain package github.com/temporalio/ui-server/v2/api/workflowservice/v1
2.360 server/api/handler.go:35:2: no required module provides package github.com/temporalio/ui-server/v2/api/operatorservice/v1; to add it:
2.360 go get github.com/temporalio/ui-server/v2/api/operatorservice/v1
2.360 server/api/handler.go:36:2: no required module provides package github.com/temporalio/ui-server/v2/api/workflowservice/v1; to add it:
2.360 go get github.com/temporalio/ui-server/v2/api/workflowservice/v1
2.360 ui/embed.go:8:12: pattern all:assets: no matching files found
2.361 make: *** [Makefile:34: build-server] Error 1
------
Dockerfile:13
--------------------
11 | COPY . ./
12 |
13 | >>> RUN make build-server
14 |
15 | ##### UI server #####
--------------------
ERROR: failed to solve: process "/bin/sh -c make build-server" did not complete successfully: exit code: 2
I have tested it multiple times and resolved the issue by running the command “go build -o ui-server ./cmd/server/main.go.” @tihomir Not cache / submod issues I think.