Add option to disable newsfeed in UI#1110
Conversation
| } | ||
|
|
||
| func (s *StartOptions) buildUIServer() *uiserver.Server { | ||
| disableNewsFetch, _ := strconv.ParseBool(os.Getenv("TEMPORAL_DISABLE_NEWS_FETCH")) |
There was a problem hiding this comment.
I don't think we should silently fail here. I think it makes sense to include in the start options (unless those are generated somehow)
There was a problem hiding this comment.
just pushed up another way of doing this. It's more consistent with the existing configuration of the UI server in the CLI.
Replace the TEMPORAL_DISABLE_NEWS_FETCH env var read in buildUIServer with a proper --ui-disable-news-fetch CLI flag that flows through StartOptions, matching the other --ui-* options.
|
Replaced the env-var read with a Help output: Demo — start the dev server with it: |
|
Apologies for the delay on my part. I made my previous commit just before boarding a very long flight. I built an executable from your updated code and verified that it works as expected. That is, when I run the |
chaptersix
left a comment
There was a problem hiding this comment.
pending description and title update
TEMPORAL_DISABLE_NEWS_FETCH env var#1111) ## What changed? Cherry-picks the News Feed disable feature to `release/1.8.x`: - **#1109** — Bump ui-server to v2.50.1 (required for the News Feed feature). Applied against the 1.8.x dependency baseline via `go mod tidy` rather than pulling `main`'s full dependency tree, so `go.temporal.io/api`, `sdk`, and `server` stay pinned at their 1.8.x versions; only the transitive deps ui-server v2.50.1 requires were bumped. - **#1110** — Add `--ui-disable-news-fetch` option (and `TEMPORAL_DISABLE_NEWS_FETCH` env binding) to disable the UI newsfeed. Applied cleanly. ## Why? Backport of the newsfeed-disable capability to the 1.8.x release line. ## How was this tested? - `go build ./...` - `make gen` (no drift; generated `commands.gen.go` matches) - `go test ./internal/temporalcli/` (server/devserver command tests pass) --------- Co-authored-by: Tom Wheeler <tom@temporal.io>
Related issues
Related to #1104
What changed?
This adds a command-line option that configures the embedded UI server to disable the news feed feature.
Checklist
Manual tests
Setup #1 (default case)
Happy path #1 (default case)
Open the Web UI and observe that the news fetch feature is enabled, as it is by default. This is visible by way of a megaphone icon in the top navigation.
Setup two (feature disabled)
Happy path two (feature disabled)
Open the Web UI and observe that the news fetch feature is disabled, since the environment variable is set to disable it, as described in the documentation. This is evident by the megaphone icon being omitted from the top navigation and the Web UI not making a request for the feed.