Skip to content

Conversation

@BolajiOlajide
Copy link
Contributor

Setting -v to true didn't include information that can be used for debugging. This PR improves that adding detailed logging to several points of the Batch Changes pre-execution and execution steps.

Closes CP-4

Test plan

Manually running a batch spec with the src-cli.

Add detailed verbose logging to stepsExecTUI for batch changes execution.
When -v flag is passed, users now see logs for:
- Archive download start/completion/failure
- Workspace initialization
- Step caching (skipped steps)
- Step preparation and execution
- Step completion with diff size and file change counts
- Step failures with exit codes
Add verbose logging to TUI for batch changes pre-execution steps:
- Namespace resolution: show resolved namespace ID
- Container images: log successful preparation
- Workspace resolution: show workspace/repo counts and unsupported/ignored counts
- Cache check: show cached specs and tasks to execute
@BolajiOlajide BolajiOlajide requested a review from a team December 11, 2025 13:09
@BolajiOlajide BolajiOlajide self-assigned this Dec 11, 2025
switch startStep {
case 1:
ui.updateStatusBar("Skipping step 1. Found cached result.")
ui.out.Verbosef("[%s] Skipping step 1 (cached result found)", ui.task.Repository.Name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't we have duplicate output when using -v?

[              Skipping step 1. Found cached result.             ]
[sourcegraph/sourcegraph] Skipping step 1 (cached result found)

or can you provide a screenshot of how this looks? with and without the verbose flag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, however, the statusbar text changes depending on the steps so the text isn't preserved for one to see if they aren't looking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants