Skip to content

Commit 328da75

Browse files
failing tests resolved
1 parent 6e43617 commit 328da75

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

src/spec-common/injectHeadless.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export interface ResolverParameters {
6060
remoteEnv: Record<string, string>;
6161
buildxPlatform: string | undefined;
6262
buildxPush: boolean;
63+
buildxLabel: string | undefined;
6364
buildxOutput: string | undefined;
6465
buildxCacheTo: string | undefined;
6566
skipFeatureAutoMapping: boolean;

src/spec-node/containerFeatures.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function extendImage(params: DockerResolverParameters, config: Subs
113113
'--target', featureBuildInfo.overrideTarget,
114114
'-f', dockerfilePath,
115115
...additionalImageNames.length > 0 ? additionalImageNames.map(name => ['-t', name]).flat() : ['-t', updatedImageName],
116-
...imageLabels.length > 0 ? imageLabels.map(label => ['--label', label]).flat() : ['--label', imageLabels.toString()],
116+
...imageLabels.length > 0 ? imageLabels.map(label => ['--label', label]).flat() : ['--label', ''],
117117
emptyTempDir
118118
);
119119

src/spec-node/devContainersSpecCLI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ function buildOptions(y: Argv) {
510510
'buildkit': { choices: ['auto' as 'auto', 'never' as 'never'], default: 'auto' as 'auto', description: 'Control whether BuildKit should be used' },
511511
'platform': { type: 'string', description: 'Set target platforms.' },
512512
'push': { type: 'boolean', default: false, description: 'Push to a container registry.' },
513-
'label': { type: 'string', description: 'Provide key and value for the metadata of the container. (<key1>=<value1> <key2>=<value2> )' },
513+
'label': { type: 'string', description: 'Provide key and value configuration that adds metadata to an image' },
514514
'output': { type: 'string', description: 'Overrides the default behavior to load built images into the local docker registry. Valid options are the same ones provided to the --output option of docker buildx build.' },
515515
'additional-features': { type: 'string', description: 'Additional features to apply to the dev container (JSON as per "features" section in devcontainer.json)' },
516516
'skip-feature-auto-mapping': { type: 'boolean', default: false, hidden: true, description: 'Temporary option for testing.' },

src/spec-node/featuresCLI/testCommandImpl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ async function launchProject(params: DockerResolverParameters, workspaceFolder:
550550
const options: ProvisionOptions = {
551551
...staticProvisionParams,
552552
workspaceFolder,
553+
buildxLabel: '',
553554
logLevel: common.getLogLevel(),
554555
mountWorkspaceGitRoot: true,
555556
remoteEnv: common.remoteEnv,
@@ -625,6 +626,7 @@ async function generateDockerParams(workspaceFolder: string, args: FeaturesTestC
625626
const { logLevel, quiet, disposables } = args;
626627
return await createDockerParams({
627628
workspaceFolder,
629+
buildxLabel: undefined,
628630
dockerPath: undefined,
629631
dockerComposePath: undefined,
630632
containerDataFolder: undefined,

src/spec-node/singleContainer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function getDefaultName(config: DevContainerFromDockerfileConfig | DevContainerF
122122
export async function buildNamedImageAndExtend(params: DockerResolverParameters, configWithRaw: SubstitutedConfig<DevContainerFromDockerfileConfig | DevContainerFromImageConfig>, additionalFeatures: Record<string, string | boolean | Record<string, string | boolean>>, canAddLabelsToContainer: boolean, argImageNames?: string[], imageLabels?: string[]): Promise<{ updatedImageName: string[]; imageMetadata: SubstitutedConfig<ImageMetadataEntry[]>; imageDetails: () => Promise<ImageDetails>; labels?: Record<string, string> }> {
123123
const { config } = configWithRaw;
124124
const imageNames = argImageNames ?? [getDefaultName(config, params)];
125-
const imagelabel = imageLabels ?? [getDefaultName(config, params)];
125+
const imagelabel = imageLabels;
126126
params.common.progress(ResolverProgress.BuildingImage);
127127
if (isDockerFileConfig(config)) {
128128
return await buildAndExtendImage(params, configWithRaw as SubstitutedConfig<DevContainerFromDockerfileConfig>, imageNames, params.buildNoCache ?? false, additionalFeatures);

0 commit comments

Comments
 (0)