You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix out-of-bounds panic in progress printer (#378)
* Fix out-of-bounds panic in progress printer
We ran into an out-of-bounds panic when we had more tasks reporting as
"currently running" than the number of status bars we had.
That was due to a lack of defensive checks in the face of a possible
race condition.
The race condition leads the `PrintStatuses` method seeing more
"currently running" tasks than there can technically be.
The race condition is between the `PrintStatus` method that prints the
slices of pointers to `*TaskStatus` and the tasks themselves updating
the status non-atomatically.
At least that's what it seems like. I'm not 100% sure about the cause
yet, but I could reproduce the issue by simply injecting more statuses
at the top of `PrintStatuses`. The code here fixes it.
* Add changelog entry
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,15 @@ All notable changes to `src-cli` are documented in this file.
17
17
18
18
### Fixed
19
19
20
+
- Fixed a bug that could cause `src campaign [apply|preview]` to crash in rare circumstances when executing a campaign spec due to a bug in the logic for the progress bar. [#378](https://github.com/sourcegraph/src-cli/pull/378)
21
+
20
22
### Removed
21
23
22
24
## 3.21.9
23
25
24
26
### Added
25
27
26
28
- Commands for campaigns no longer require the `-namespace` parameter. If omitted, campaigns will use the currently authenticated user as the namespace. [#372](https://github.com/sourcegraph/src-cli/pull/372)
27
-
28
29
-`src campaign [apply|preview]` now caches the result of running steps in a repository even if they didn't produce changes.
0 commit comments