prometheus icon indicating copy to clipboard operation
prometheus copied to clipboard

Display GOMEMLIMIT in runtime info

Open narqo opened this issue 1 year ago • 4 comments

This PR updates web's runtime info, adding the current value GOMEMLIMIT (soft memory limit) to the UI.

In the current implementation, the limit's value is returned and displayed as-is in the bytes form — w/o any formatting — in the similar manner to other runtime's values.

narqo avatar Mar 28 '23 18:03 narqo

One of the CI's checks runs the tests against Go 1.18 (or older). This is a bit unexpected, given that go.mod defines go 1.19 as the compatible version:

note: module requires Go 1.19

narqo avatar Mar 28 '23 21:03 narqo

One of the CI's checks runs the tests against Go 1.18 (or older).

Just 1.18, quite deliberately:

https://github.com/prometheus/prometheus/blob/bc7ce50d8536a84041442673af25454c5147167e/.github/workflows/ci.yml#L64

go.mod defines go 1.19 as the compatible version

(here:)

go 1.19

That line is interpreted as "if you can, apply go 1.19 semantics". It is not a statement that go 1.19 is mandatory. https://go.dev/ref/mod#go-mod-file-go

note: module requires Go 1.19

Where are you quoting that from? I can't find it in the Prometheus repo.

bboreham avatar Apr 02 '23 10:04 bboreham

We have a PR to raide the version to 1.20/1.19

Le dim. 2 avr. 2023, 12:30, Bryan Boreham @.***> a écrit :

One of the CI's checks runs the tests against Go 1.18 (or older).

Just 1.18, quite deliberately:

https://github.com/prometheus/prometheus/blob/bc7ce50d8536a84041442673af25454c5147167e/.github/workflows/ci.yml#L64

go.mod defines go 1.19 as the compatible version

(here:)

https://github.com/prometheus/prometheus/blob/408f31f78669a27e92aac41452a4f67dfb44f917/go.mod

go 1.19

That line is interpreted as "if you can, apply go 1.19 semantics". It is not a statement that go 1.19 is mandatory. https://go.dev/ref/mod#go-mod-file-go

note: module requires Go 1.19

Where are you quoting that from? I can't find it in the Prometheus repo.

— Reply to this email directly, view it on GitHub https://github.com/prometheus/prometheus/pull/12191#issuecomment-1493291736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHHJUOIU7MZEIX3EIIYDDW7FIL7ANCNFSM6AAAAAAWK62UMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

roidelapluie avatar Apr 02 '23 10:04 roidelapluie

Where are you quoting that from? I can't find it in the Prometheus repo.

@bboreham this was from the CI's output. But if I attempt to build a package with Go 1.18, I get the same note

% ~/.local/opt/[email protected]/bin/go version
go version go1.18.10 darwin/amd64

% ~/.local/opt/[email protected]/bin/go build ./web/
# github.com/prometheus/prometheus/web
web/web.go:714:25: undefined: debug.SetMemoryLimit
note: module requires Go 1.19

(this comes from https://github.com/golang/go/commit/40f585b21b7547031823d26fa6635500b2cff8da)

narqo avatar Apr 02 '23 16:04 narqo

can you rebase this?

roidelapluie avatar Apr 21 '23 09:04 roidelapluie

"Previous Go version" is still on 1.18; fix here: https://github.com/prometheus/prometheus/pull/12285

bboreham avatar Apr 22 '23 08:04 bboreham

Tried it out in the new RC; this is maybe not the best user experience:

image

bboreham avatar Apr 26 '23 16:04 bboreham

this is maybe not the best user experience

On the one hand, I absolutely agree; this page is very technical and not too user-friendly, imho. But, when worked on the change, I couldn't decide if I'd like the page to format (pretty-print) this value, while it kept the rest of GOXXXX as is.

narqo avatar Apr 26 '23 18:04 narqo

This particular value is 2^63; presumably intended to mean “no limit”.

bboreham avatar Apr 27 '23 13:04 bboreham