Repository navigation
issueReporter: fix branded-build media and repository tests - #343343
Conversation
Respect configured product repository casing and distinguish codec encoding from playback support. Keep real codec tests active and select usable recording formats without assuming OSS runtime capabilities. Addresses microsoft/vscode-engineering#4294. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open issues
isSupportednow callsgetSupportedFormats(), which (viacanPlayType) allocates a new… · NewisSupportednow callsgetSupportedFormats(), which (viacanPlayType) allocates a new… · New The fallback to the genericvideo/webmMIME type can still allow a mismatch between what the… · New This stub bypasses decoding and returns a fixeddurationMs, which makes the earlier byte-level… · New
What changed in this PR
Fixes issue reporter failures in branded builds by aligning repository-casing expectations with configured product URLs and improving media recording/decoding test reliability across environments.
Changes:
- Make recording format selection require both MediaRecorder encoder support and HTML video decoder support, with fallback when a preferred format is unusable.
- Update issue reporter repository tests to preserve configured casing while deduplicating case-insensitively.
- Adjust media import/decoding tests to be less sensitive to platform codec availability and provide clearer decode failure diagnostics.
| File | Description |
|---|---|
| src/vs/workbench/contrib/issue/electron-browser/nativeRecordingService.ts | Filters supported recording formats by both recording and playback capability; adjusts isSupported/startRecording logic accordingly. |
| src/vs/workbench/contrib/issue/test/electron-browser/nativeRecordingService.test.ts | Adds test coverage for decode-capable format filtering; strengthens round-trip assertions and error diagnostics. |
| src/vs/workbench/contrib/issue/test/electron-browser/issueReporterMediaImport.test.ts | Stubs video decoding for a specific import case to avoid codec/environment dependency. |
| src/vs/workbench/contrib/issue/test/common/issueReporterTarget.test.ts | Adds coverage for preserving configured product repository casing while deduplicating repositories case-insensitively. |
| src/vs/workbench/contrib/issue/test/browser/issueReporterOverlay.test.ts | Derives displayed repository text from resolved target to handle branded casing consistently. |
| src/vs/workbench/contrib/issue/test/browser/issueReporterMedia.test.ts | Distinguishes unsupported container/codec; guards duration-metadata test based on decode capability. |
| src/vs/workbench/contrib/issue/test/browser/issueFormService.test.ts | Derives expected upload repository from product configuration instead of hardcoding OSS casing. |
Review effort: Lite
| readonly _serviceBrand: undefined; | ||
| get isSupported(): boolean { | ||
| return !!this.getMediaRecorderConstructor() && !!this.getMediaDevices()?.getDisplayMedia; | ||
| return !!this.getMediaDevices()?.getDisplayMedia && this.getSupportedFormats().length > 0; |
| protected canPlayType(mimeType: string): boolean { | ||
| return mainWindow.document.createElement('video').canPlayType(mimeType) !== ''; |
| } else if (this.isFormatSupported(MediaRecorder, 'video/webm')) { | ||
| formats.push({ mimeType: 'video/webm', label: 'WebM', extension: 'webm' }); |
| const durationTag = bytes.findIndex((value, index) => value === 0x44 && bytes[index + 1] === 0x89 && bytes[index + 2] === 0x88); | ||
| bytes[durationTag] = 0xEC; | ||
| pane.videoDecoder = (_resource, token) => readIssueReporterVideo(`data:video/webm;base64,${encodeBase64(VSBuffer.wrap(bytes))}`, token); | ||
| pane.videoDecoder = async () => ({ width: 48, height: 32, durationMs: 500, thumbnailDataUrl: issueReporterImageFixture }); |
|
Giuseppe Cianci (@Giuspepe) thanks for the quick fix. I validated it under product-build conditions (ADO def 111, CI mode, publish off) on this PR's head in 487783. All 10 casing tests pass now. 3 WebM tests still fail on Linux, Windows and macOS:
On the shipped feed Electron, the demuxer can't open WebM at all, while
|
Product builds test on the Electron from the `vscode-electron-prebuilt` feed. There, Chromium can't open any WebM container (`PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open context failed`), including a clip MediaRecorder just produced. After #343343, three tests still require WebM to decode and keep main red on every OS (def 111 run 487783). Skip only those, linking #343345. Also make the recording test's `.timeout` safe when it's skipped: `test.skip` returns nothing in this runner. Co-authored-by: Copilot <[email protected]>
Product builds test on the Electron from the `vscode-electron-prebuilt` feed. There, Chromium can't open any WebM container (`PipelineStatus::DEMUXER_ERROR_COULD_NOT_OPEN: FFmpegDemuxer: open context failed`), including a clip MediaRecorder just produced. After #343343, three tests still require WebM to decode and keep main red on every OS (def 111 run 487783). Skip only those, linking #343345. Also make the recording test's `.timeout` safe when it's skipped: `test.skip` returns nothing in this runner. Co-authored-by: Copilot <[email protected]>

Problem
Fixes https://github.com/microsoft/vscode-engineering/issues/4294
The tests assumed the OSS product URL's lowercase owner and WebM playback availability. Branded builds use
Microsoft/vscode, and encoder support alone does not establish that recorded video can be played back.Fix
No tests are disabled. Production repository display casing and media-resource access rules remain unchanged.
Validation
npm run build-fast -- --client-only: passed.npm run typecheck-client: passed.git diff --check: passed.Validation used macOS OSS Electron. The exact Microsoft Electron download was blocked by package-feed
ReadPackagesaccess. Branded Windows, macOS, and Linux CI must confirm recovery; this PR does not claim that build 487717 is fixed before that run.