-
Notifications
You must be signed in to change notification settings - Fork 711
fix: Logs redirection due to empty streams #9221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Failed to generate code suggestions for PR |
c2814e4 to
0322342
Compare
95b9ddf to
20a526c
Compare
20a526c to
6e04ada
Compare
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryFixed logs redirection issue caused by empty stream objects by initializing stream state to Key Changes:
Issue Found:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant App as Application
participant Store as Vuex Store
participant useStreams as useStreams Composable
participant Cache as streamsCache
Note over Store: BEFORE: Initial state = {}
Note over Store: AFTER: Initial state = null
App->>useStreams: isStreamFetched(streamType)
useStreams->>Cache: Check streamsCache[streamType]?.value?.list
alt Stream state is null (NEW behavior)
Cache-->>useStreams: Returns undefined
useStreams-->>App: Returns false (not fetched)
else Stream state is {} (OLD behavior)
Cache-->>useStreams: {}.list = undefined
useStreams-->>App: Returns false (not fetched)
end
App->>useStreams: getStream(name, type, schema)
useStreams->>useStreams: Check if stream fetched
useStreams->>Store: Access streamsIndexMapping[streamType][streamName]
useStreams->>Cache: streamsCache[streamType].value?.list?.[index]
Note over useStreams,Cache: Optional chaining (?.) prevents<br/>errors when value is null
Cache-->>useStreams: Return stream or {}
useStreams-->>App: Stream data
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 1 comment
6e04ada to
d529be6
Compare
d529be6 to
bc8e2e7
Compare
d0ad30c to
ce28a83
Compare
No description provided.