- Notifications
You must be signed in to change notification settings - Fork909
Commitc938bfe
authored
fix: prevent invalid render output for build logs (#17233)
## Changes made- Updated `Line` type in `LogLine.tsx` to support an ID value to preventkey conflicts during React rendering. Also deleted the `LineWithID`type, which became redundant after the change- Updated the `Logs` component to use the ID to avoid render keyconflicts- Updated any component calls to add the ID as a prop## Notes- This does prevent a bunch of extra `console.error` calls that Reactwill automatically spit out, so this should help us a good bit in thefuture- Beyond being a little annoying, there was a chance (that was tiny fornow) that React could accidentally mix up component instances duringre-renders. That wasn't my main goal with this PR (I just wanted lessnoisy logs), but that should now be impossible1 parent0fe7346 commitc938bfe
File tree
9 files changed
+17
-20
lines changed- site/src
- components/Logs
- modules
- resources
- AgentLogs
- workspaces/WorkspaceBuildLogs
- pages/WorkspaceBuildPage
9 files changed
+17
-20
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 |
| - | |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Lines changed: 0 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 | 6 |
| |
14 | 7 |
| |
15 | 8 |
| |
|
Lines changed: 3 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
4 | 5 |
| |
5 | 6 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
| 7 | + | |
11 | 8 |
| |
12 | 9 |
| |
13 | 10 |
| |
14 | 11 |
| |
15 | 12 |
| |
16 |
| - | |
| 13 | + | |
17 | 14 |
| |
18 | 15 |
| |
19 | 16 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
1128 | 1128 |
| |
1129 | 1129 |
| |
1130 | 1130 |
| |
1131 |
| - | |
| 1131 | + |
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| |||
318 | 319 |
| |
319 | 320 |
| |
320 | 321 |
| |
321 |
| - | |
| 322 | + | |
322 | 323 |
| |
323 | 324 |
| |
324 | 325 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
| 3 | + | |
3 | 4 |
| |
4 | 5 |
| |
5 | 6 |
| |
| |||
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
66 |
| - | |
| 67 | + | |
| 68 | + | |
67 | 69 |
| |
68 | 70 |
| |
69 | 71 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
| |||
302 | 303 |
| |
303 | 304 |
| |
304 | 305 |
| |
305 |
| - | |
| 306 | + | |
306 | 307 |
| |
307 | 308 |
| |
308 | 309 |
| |
|
0 commit comments
Comments
(0)