Stream description inconsistency between Input Wizard and Streams screen
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- mongodb, typescript
Research direction
Start with graylog2-web-interface/src/components/inputs/InputSetupWizard/steps/components/CreateStreamForm.tsx and compare its description handling with StreamModal.tsx. Read useSetupInputMutations.ts and useStreamMutations.ts, then verify both creation paths store the description field consistently as an empty string when no description is entered.
Written by the indexing model from the issue text.
Description
Expected Behavior
When a Stream is created with an empty description, the stored value for the description field should be consistent regardless of which UI path was used to create the stream.
Current Behavior
When creating a Stream with an empty description from the Streams screen, the backend receives an empty string "" for the description field. When creating a Stream with an empty description from the Input Setup Wizard (Routing step), the description field is omitted entirely from the MongoDB document.
Possible Solution
Update CreateStreamForm.tsx to default the description initial value to '' (empty string) instead of undefined, matching the behavior of StreamModal.tsx.
Steps to Reproduce (for bugs)
- Create a Stream from the Streams screen (e.g. "test-stream-no-desc-0") and leave the description field empty.
- Create a Stream from the Input Setup Wizard (e.g. "test-stream-no-desc-1") by selecting "Create new stream" in the Routing step and leave the description field empty.
- Query MongoDB to compare the stored values:
db.streams.find( {title: {$in: ["test-stream-no-desc-0", "test-stream-no-desc-1"]}}, {title: 1, description: 1} ).forEach(s => { print(s.title + " → description: " + JSON.stringify(s.description) + " (type: " + typeof s.description + ")") }) - Observe the output:
test-stream-no-desc-0 → description: "" (type: string) test-stream-no-desc-1 → description: undefined (type: undefined)
Context
The inconsistency originates from different default values used in the two creation forms:
StreamModal.tsx(Streams screen) defaultsdescriptionto''(line 71).CreateStreamForm.tsx(Input Setup Wizard) defaultsdescriptiontoundefined(line 101), anduseSetupInputMutations.tsalso explicitly setsdescription: undefined(line 41) before spreading the stream object.
When undefined is serialized to JSON, the key is omitted entirely, so the backend's @Nullable description field in CreateStreamRequest.java deserializes it as null. Jackson then omits null values when writing to MongoDB, so the field is absent from the document entirely.
Relevant files:
graylog2-web-interface/src/components/streams/StreamModal.tsxgraylog2-web-interface/src/components/inputs/InputSetupWizard/steps/components/CreateStreamForm.tsxgraylog2-web-interface/src/components/inputs/InputSetupWizard/hooks/useSetupInputMutations.tsgraylog2-web-interface/src/hooks/useStreamMutations.ts
Your Environment
- Graylog Version: 7.1.0-SNAPSHOT (5bc5da03d2)
- Java Version: 21
- OpenSearch Version: opensearchproject/opensearch:2.19.3
- MongoDB Version: mongo:7.0
- Operating System: macOS 26.3
- Browser version: Chrome 145.0.0.0
Checklist
- This issue fix need to be backported.
- Does this issue have security implications?
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 204
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Graylog2/graylog2-server
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Graylog2/graylog2-server#27395 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Graylog2/graylog2-server#27226 · 1 reaction ·
-
bug collector
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Graylog2/graylog2-server#27195 ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Graylog2/graylog2-server#27190 ·
-
bug triaged
Difficulty 2/5 1-2 days Newbie friendliness 72/100
Graylog2/graylog2-server#27187 ·
All issues in Graylog2/graylog2-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100