You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering issues while trying to build the Prometheus project in Gitpod following CONTRIBUTING.md guidelines. The build process fails with errors indicating that certain packages are not found in the GOROOT. Below are the specific error messages:
../go/pkg/mod/go.opentelemetry.io/otel@v1.25.0/attribute/set.go:7:2: package cmp is not in GOROOT (/home/gitpod/go/src/cmp)
../go/pkg/mod/github.com/!kim!machine!gun/automemlimit@v0.6.0/memlimit/logger.go:5:2: package log/slog is not in GOROOT (/home/gitpod/go/src/log/slog)
../go/pkg/mod/github.com/hashicorp/nomad/api@v0.0.0-20240418183417-ea5f2f6748c7/consul.go:7:2: package maps is not in GOROOT (/home/gitpod/go/src/maps)
model/labels/labels_common.go:19:2: package slices is not in GOROOT (/home/gitpod/go/src/slices)
Ensure the Gitpod Dockerfile and .gitpod.yml are configured as above (the same in master branch).
Attempt to build the project using the tasks defined in the Gitpod YAML configuration.
Actual Behavior
The build fails with errors indicating that certain packages (cmp, log/slog, maps, slices) are not found in GOROOT.
What did you expect to see?
The build should complete successfully without missing package errors.
What did you see instead? Under which circumstances?
Proposed Solution
I propose updating the Go version in the Gitpod docker file to a version that includes the missing packages, such as the latest Go version (Go 1.22.3). This should resolve the missing package errors during the build process.
Willing to Submit a PR
I am willing to submit a PR with the following changes:
Update the Dockerfile to use the latest go version 1.22.3.
After updating the custom go version in the Gitpod docker file to 1.22.3. it works as expected and there are no mission packages errors:
This failure is likely due to the limited computational resources allocated in the Gitpod workspace, rather than the Go version update.
gitpod /workspace/prometheus (test) $ make test
>> cleaning generated parser
>> running goyacc to generate the .go file.
conflicts: 19 shift/reduce
>> checking generated parser
>> running all tests
go test -race ./...
go: downloading github.com/stretchr/objx v0.5.2
go: downloading github.com/evanphx/json-patch v5.6.0+incompatible
? github.com/prometheus/prometheus/discovery/aws [no test files]
? github.com/prometheus/prometheus/discovery/gce [no test files]
? github.com/prometheus/prometheus/discovery/install [no test files]
ok github.com/prometheus/prometheus/cmd/prometheus 109.313s
ok github.com/prometheus/prometheus/cmd/promtool 27.829s
ok github.com/prometheus/prometheus/config 1.195s
ok github.com/prometheus/prometheus/discovery 5.626s
ok github.com/prometheus/prometheus/discovery/azure 1.018s
ok github.com/prometheus/prometheus/discovery/consul 4.031s
ok github.com/prometheus/prometheus/discovery/digitalocean 1.020s
ok github.com/prometheus/prometheus/discovery/dns 1.019s
ok github.com/prometheus/prometheus/discovery/eureka 1.030s
ok github.com/prometheus/prometheus/discovery/file 3.336s
ok github.com/prometheus/prometheus/discovery/hetzner 1.027s
ok github.com/prometheus/prometheus/discovery/http 1.040s
ok github.com/prometheus/prometheus/discovery/ionos 1.024s
ok github.com/prometheus/prometheus/discovery/kubernetes 34.654s
ok github.com/prometheus/prometheus/discovery/legacymanager 4.225s
ok github.com/prometheus/prometheus/discovery/linode 1.030s
ok github.com/prometheus/prometheus/discovery/marathon 1.021s
ok github.com/prometheus/prometheus/discovery/moby 1.114s
ok github.com/prometheus/prometheus/discovery/nomad 1.018s
ok github.com/prometheus/prometheus/discovery/openstack 1.045s
ok github.com/prometheus/prometheus/discovery/ovhcloud 1.028s
ok github.com/prometheus/prometheus/discovery/puppetdb 1.035s
ok github.com/prometheus/prometheus/discovery/refresh 1.018s
ok github.com/prometheus/prometheus/discovery/scaleway 1.028s
ok github.com/prometheus/prometheus/discovery/targetgroup 1.013s
ok github.com/prometheus/prometheus/discovery/triton 1.081s
ok github.com/prometheus/prometheus/discovery/uyuni 1.022s
ok github.com/prometheus/prometheus/discovery/vultr 1.019s
ok github.com/prometheus/prometheus/discovery/xds 3.093s
ok github.com/prometheus/prometheus/discovery/zookeeper 1.032s
? github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter-usage [no test files]
? github.com/prometheus/prometheus/model/exemplar [no test files]
ok github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter 1.015s
? github.com/prometheus/prometheus/model/metadata [no test files]
ok github.com/prometheus/prometheus/model/histogram 1.125s
? github.com/prometheus/prometheus/model/timestamp [no test files]
? github.com/prometheus/prometheus/model/value [no test files]
? github.com/prometheus/prometheus/plugins [no test files]
? github.com/prometheus/prometheus/prompb [no test files]
? github.com/prometheus/prometheus/prompb/io/prometheus/client [no test files]
ok github.com/prometheus/prometheus/model/labels 4.303s
ok github.com/prometheus/prometheus/model/relabel 1.097s
ok github.com/prometheus/prometheus/model/rulefmt 1.112s
ok github.com/prometheus/prometheus/model/textparse 1.071s
ok github.com/prometheus/prometheus/notifier 3.459s
? github.com/prometheus/prometheus/promql/parser/posrange [no test files]
? github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheus [no test files]
? github.com/prometheus/prometheus/tsdb/encoding [no test files]
? github.com/prometheus/prometheus/tsdb/errors [no test files]
? github.com/prometheus/prometheus/util/almost [no test files]
? github.com/prometheus/prometheus/util/annotations [no test files]
? github.com/prometheus/prometheus/util/documentcli [no test files]
? github.com/prometheus/prometheus/util/gate [no test files]
? github.com/prometheus/prometheus/util/jsonutil [no test files]
? github.com/prometheus/prometheus/util/osutil [no test files]
? github.com/prometheus/prometheus/util/runtime [no test files]
? github.com/prometheus/prometheus/util/runutil [no test files]
? github.com/prometheus/prometheus/util/teststorage [no test files]
? github.com/prometheus/prometheus/util/testutil [no test files]
? github.com/prometheus/prometheus/util/treecache [no test files]
? github.com/prometheus/prometheus/web/ui [no test files]
ok github.com/prometheus/prometheus/promql 190.077s
ok github.com/prometheus/prometheus/promql/parser 10.118s
ok github.com/prometheus/prometheus/promql/promqltest 3.208s
--- FAIL: TestAsyncRuleEvaluation (0.51s)
--- FAIL: TestAsyncRuleEvaluation/asynchronous_evaluation_of_all_independent_rules,_insufficient_concurrency (0.18s)
manager_test.go:1963:
Error Trace: /workspace/prometheus/rules/manager_test.go:1963
Error: "0.115001058" is not less than "0.09"
Test: TestAsyncRuleEvaluation/asynchronous_evaluation_of_all_independent_rules,_insufficient_concurrency
FAIL
FAIL github.com/prometheus/prometheus/rules 44.393s
ok github.com/prometheus/prometheus/scrape 33.313s
ok github.com/prometheus/prometheus/storage 1.377s
ok github.com/prometheus/prometheus/storage/remote 63.304s
ok github.com/prometheus/prometheus/storage/remote/azuread 13.043s
ok github.com/prometheus/prometheus/storage/remote/otlptranslator/prometheusremotewrite 1.015s [no tests to run]
ok github.com/prometheus/prometheus/template 1.025s
ok github.com/prometheus/prometheus/tracing 1.098s
ok github.com/prometheus/prometheus/tsdb 455.795s
ok github.com/prometheus/prometheus/tsdb/agent 89.362s
ok github.com/prometheus/prometheus/tsdb/chunkenc 1.093s
ok github.com/prometheus/prometheus/tsdb/chunks 62.484s
ok github.com/prometheus/prometheus/tsdb/fileutil 1.080s
ok github.com/prometheus/prometheus/tsdb/goversion 1.070s
ok github.com/prometheus/prometheus/tsdb/index 80.498s
ok github.com/prometheus/prometheus/tsdb/record 1.030s
ok github.com/prometheus/prometheus/tsdb/tombstones 1.028s
ok github.com/prometheus/prometheus/tsdb/tsdbutil 1.027s
ok github.com/prometheus/prometheus/tsdb/wlog 51.784s
ok github.com/prometheus/prometheus/util/fmtutil 1.096s
ok github.com/prometheus/prometheus/util/httputil 1.184s
ok github.com/prometheus/prometheus/util/logging 1.219s
ok github.com/prometheus/prometheus/util/pool 1.017s
ok github.com/prometheus/prometheus/util/stats 1.180s
ok github.com/prometheus/prometheus/util/strutil 1.087s
ok github.com/prometheus/prometheus/util/zeropool 5.017s
ok github.com/prometheus/prometheus/web 17.181s
ok github.com/prometheus/prometheus/web/api/v1 2.206s
FAIL
make: *** [Makefile.common:153: common-test] Error 1
Please let me know if this solution is acceptable or if there are any additional considerations.
Thank you!
System information
No response
Prometheus version
No response
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Hey @mohamedawnallah, updating the go version in Gitpod Dockerfile sounds like a good solution :)
Even better if somehow we could configure the Dockerfile go version based on the version specified in our go.mod, that way the Gitpod workspace would always be up to date!
Thanks so much, @ArthurSens, for the suggestion! I really like it; it's a durable solution. I've just submitted a PR that automatically fetches the Go version from the go.mod file and the goyacc parser version from the Makefile. I'd love to receive any feedback! 🙏
What did you do?
Description
I am encountering issues while trying to build the Prometheus project in Gitpod following CONTRIBUTING.md guidelines. The build process fails with errors indicating that certain packages are not found in the
GOROOT
. Below are the specific error messages:Environment Details
Gitpod Dockerfile:
prometheus/.gitpod.Dockerfile
Lines 1 to 14 in 52f68a9
Gitpod YAML Configuration:
prometheus/.gitpod.yml
Lines 1 to 20 in 52f68a9
Steps to Reproduce
.gitpod.yml
are configured as above (the same in master branch).Actual Behavior
The build fails with errors indicating that certain packages (
cmp
,log/slog
,maps
,slices
) are not found inGOROOT
.What did you expect to see?
The build should complete successfully without missing package errors.
What did you see instead? Under which circumstances?
Proposed Solution
I propose updating the Go version in the Gitpod docker file to a version that includes the missing packages, such as the latest Go version (Go 1.22.3). This should resolve the missing package errors during the build process.
Willing to Submit a PR
I am willing to submit a PR with the following changes:
Dockerfile
to use the latest go version 1.22.3.After updating the custom go version in the Gitpod docker file to 1.22.3. it works as expected and there are no mission packages errors:
Additional Testing
After updating the Go version to 1.22.3, I ran the test cases to ensure there were no regressions. All tests passed except for one:
TestAsyncRuleEvaluation/asynchronous_evaluation_of_all_independent_rules,_insufficient_concurrency
This failure is likely due to the limited computational resources allocated in the Gitpod workspace, rather than the Go version update.
Please let me know if this solution is acceptable or if there are any additional considerations.
Thank you!
System information
No response
Prometheus version
No response
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response
The text was updated successfully, but these errors were encountered: