Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Pre-built images that reference a parent but specify a tag that is not in the main variant list get the incorrect version #944

Closed
Chuxel opened this issue Jul 12, 2021 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug build-system

Comments

@Chuxel
Copy link
Member

Chuxel commented Jul 12, 2021

Currently the build system tries to match the correct versioned image tag when building an image that depends on another image generated by the repository. For example, jekyll references mcr.microsoft.com/vscode/devcontainers/ruby:2 and has a dependency set to ensure the ruby image is built first.

This logic is not properly handling the "variantTags" property. For example, in ruby's build config:

		"tags": [
			"ruby:${VERSION}-${VARIANT}"
		],
		"variantTags": {
			"3.0": [ "ruby:${VERSION}-3" ],
			"2.7": [ "ruby:${VERSION}-2" ]
		}

In this case the version "2" is not detected since its an additional tag assigned to another image build (for 2.7 in this case). The end ressult is it gets the "latest" tag of 3.0 which is incorrect.

@Chuxel Chuxel added bug Issue identified by VS Code Team member as probable bug build-system labels Jul 12, 2021
@Chuxel Chuxel closed this as completed in 29a1d95 Jul 13, 2021
@Chuxel
Copy link
Member Author

Chuxel commented Jul 13, 2021

Added a specific parentVariant property to definition-manifest.json that is used to make the right determination rather than relying on automated logic or regex scanning. It then errors if something like 3 or 2 is specified in the example above to ensure nothing unexpected slips through.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug build-system
Projects
None yet
Development

No branches or pull requests

1 participant