Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
"A kubeconfig source with identical YAML already exists.": "A kubeconfig source with identical YAML already exists.",
"A new connection will be added to your Connections View.\nDo you want to continue?\n\nNote: You can disable these URL handling confirmations in the exension settings.": "A new connection will be added to your Connections View.\nDo you want to continue?\n\nNote: You can disable these URL handling confirmations in the exension settings.",
"A playground is already running on this cluster. Wait for it to finish.": "A playground is already running on this cluster. Wait for it to finish.",
"A setup operation is already in progress.": "A setup operation is already in progress.",
"A specific problem was identified": "A specific problem was identified",
"A value is required to proceed.": "A value is required to proceed.",
"A wildcard index key must be the only index key.": "A wildcard index key must be the only index key.",
Expand Down Expand Up @@ -659,6 +658,7 @@
"Docker access denied": "Docker access denied",
"Docker answered too vaguely to name a cause, so setup can still be attempted.": "Docker answered too vaguely to name a cause, so setup can still be attempted.",
"Docker became unavailable during setup: {0}": "Docker became unavailable during setup: {0}",
"Docker became unavailable during setup.": "Docker became unavailable during setup.",
"Docker check timed out": "Docker check timed out",
"Docker CLI": "Docker CLI",
"Docker CLI {0} found": "Docker CLI {0} found",
Expand Down Expand Up @@ -1796,6 +1796,7 @@
"Settings:": "Settings:",
"Setup did not finish": "Setup did not finish",
"Setup did not finish. {0}": "Setup did not finish. {0}",
"Setup failed: {0}": "Setup failed: {0}",
"Setup failed.": "Setup failed.",
"Setup is already in progress.": "Setup is already in progress.",
"Setup progress": "Setup progress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ describe('QuickStartService — WP-3 provisioning durability and port model', ()
const events = await collect(service.provision(new AbortController().signal, { port: QUICK_START_PORT }));

expect(events.at(-1)).toMatchObject({ stage: 'checking', status: 'error' });
expect(events.at(-1)?.message).toContain(String(QUICK_START_PORT));
expect(events.at(-1)?.message).toEqual({ key: 'portInUse', port: QUICK_START_PORT });
expect(service.getStatus().state).toBe(InstanceState.Error);
});

Expand All @@ -383,8 +383,9 @@ describe('QuickStartService — WP-3 provisioning durability and port model', ()

const events = await collect(service.provision(new AbortController().signal));

expect(events.at(-1)?.message).toContain(String(QUICK_START_PORT));
expect(events.at(-1)?.message).not.toContain('Bind for');
expect(events.at(-1)?.message).toEqual({ key: 'portInUse', port: QUICK_START_PORT });
// The daemon's own wording never rides along: a keyed message has nowhere to put it.
expect(events.at(-1)?.message?.detail).toBeUndefined();
});

describe('suggestPort / checkPort (Configure-step validation, L3)', () => {
Expand Down
26 changes: 17 additions & 9 deletions src/services/localQuickStart/QuickStartService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { ext } from '../../extensionVariables';
import { StorageService } from '../storageService';
import { disposeQuickStartOutputChannel, type IContainerRuntime } from './ContainerRuntime';

import { getReadinessTimeoutMessage, QuickStartServiceImpl } from './QuickStartService';
import { formatQuickStartMessage } from './quickStartMessages';
import { QuickStartServiceImpl } from './QuickStartService';
import { listInstances, PROVISIONING_LEASE_TTL_MS, upsertInstance, writeConnectionString } from './quickStartStore';
import {
DEFAULT_ALIAS,
Expand Down Expand Up @@ -1488,9 +1489,10 @@ describe('QuickStartService — WI-2e-1 provision RR4 volume-wipe gate', () => {
expect(events.at(-1)).toMatchObject({
stage: 'error',
status: 'error',
message: `Docker became unavailable during setup: daemon disappeared during ${
failingStage === 'pulling' ? 'pull' : 'run'
}`,
message: {
key: 'dockerUnavailableDuringSetup',
detail: `daemon disappeared during ${failingStage === 'pulling' ? 'pull' : 'run'}`,
},
dockerReadiness: unavailable,
});
expect(isDockerReady).toHaveBeenLastCalledWith({ forceRefresh: true });
Expand Down Expand Up @@ -1530,7 +1532,7 @@ describe('QuickStartService — WI-2e-1 provision RR4 volume-wipe gate', () => {
}

expect(retryEvents[0]).toMatchObject({ stage: 'checking', status: 'active' });
expect(retryEvents.map((event) => event.message)).not.toContain('Setup is already in progress.');
expect(retryEvents.map((event) => event.message?.key)).not.toContain('setupAlreadyInProgress');
});

it('keeps an image failure on the provisioning path when Docker remains ready', async () => {
Expand Down Expand Up @@ -1562,7 +1564,10 @@ describe('QuickStartService — WI-2e-1 provision RR4 volume-wipe gate', () => {
events.push(event);
}

expect(events.at(-1)).toMatchObject({ stage: 'error', error: 'manifest unknown' });
expect(events.at(-1)).toMatchObject({
stage: 'error',
message: { key: 'unexpectedFailure', detail: 'manifest unknown' },
});
expect(events.at(-1)?.dockerReadiness).toBeUndefined();
});

Expand Down Expand Up @@ -1608,15 +1613,18 @@ describe('QuickStartService — WI-2e-1 provision RR4 volume-wipe gate', () => {
events.push(event);
}

expect(events.at(-1)).toMatchObject({ stage: 'error', error: 'manifest unknown' });
expect(events.at(-1)).toMatchObject({
stage: 'error',
message: { key: 'unexpectedFailure', detail: 'manifest unknown' },
});
expect(events.at(-1)?.dockerReadiness).toBeUndefined();
});

it('adds the published-port explanation only for dev-container readiness timeouts', () => {
expect(getReadinessTimeoutMessage('devContainer')).toContain(
expect(formatQuickStartMessage({ key: 'readinessTimeout', environment: 'devContainer' })).toContain(
'published localhost port might not be reachable from inside the dev container',
);
expect(getReadinessTimeoutMessage('linux')).toBe(
expect(formatQuickStartMessage({ key: 'readinessTimeout', environment: 'linux' })).toBe(
'DocumentDB did not accept connections in time. It may still be initializing.',
);
});
Expand Down
Loading