You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing dotnet/dotnet-docker#5021, I tried to re-use the existing jammy-chiseledruntime and aspnet Dockerfiles but add an argument for specifying the variant of the base image, since there should be no difference to the Dockerfile content. Generating readmes fails for this scenario, I believe because of this code:
Which would see that the platforms are matching and remove the matching doc info. This means when we add the McrTagsMetadata for the new tags, the new tags are ignored and thus readme generation fails.
I validated that changing the source Dockerfile fixes this.
Actual behavior
GENERATING MCR TAGS METADATA
----------------------------
Unhandled exception: System.InvalidOperationException: A value was not found for the variable '$(McrTagsYmlTagGroup:8.0-jammy-chiseled-extra-amd64)'
at Microsoft.DotNet.ImageBuilder.ViewModel.VariableHelper.SubstituteValues(String expression, Func`3 getContextBasedSystemValue) in /image-builder/src/ViewModel/VariableHelper.cs:line 95
at Microsoft.DotNet.ImageBuilder.McrTagsMetadataGenerator.Execute() in /image-builder/src/McrTagsMetadataGenerator.cs:line 57
at Microsoft.DotNet.ImageBuilder.McrTagsMetadataGenerator.Execute(IGitService gitService, ManifestInfo manifest, RepoInfo repo, String sourceRepoUrl, String sourceBranch) in /image-builder/src/McrTagsMetadataGenerator.cs:line 29
at Microsoft.DotNet.ImageBuilder.Commands.GenerateReadmesCommand.UpdateTagsListing(String readme, RepoInfo repo) in /image-builder/src/Commands/GenerateReadmesCommand.cs:line 112
at Microsoft.DotNet.ImageBuilder.Commands.GenerateReadmesCommand.<ExecuteAsync>b__6_8(String readmeContent, ValueTuple`2 context) in /image-builder/src/Commands/GenerateReadmesCommand.cs:line 57
at Microsoft.DotNet.ImageBuilder.Commands.GenerateArtifactsCommand`2.GenerateArtifactAsync[TContext](String templatePath, String artifactPath, TContext context, GetTemplateState`1 getState, String artifactName, Func`3 postProcess) in /image-builder/src/Commands/GenerateArtifactsCommand.cs:line 106
at Microsoft.DotNet.ImageBuilder.Commands.GenerateArtifactsCommand`2.GenerateArtifactsAsync[TContext](IEnumerable`1 contexts, Func`2 getTemplatePath, Func`2 getArtifactPath, GetTemplateState`1 getState, String templatePropertyName, String artifactName, Func`3 postProcess) in /image-builder/src/Commands/GenerateArtifactsCommand.cs:line 85
...
The text was updated successfully, but these errors were encountered:
lbussell
changed the title
ImageBuilder cannot generate MCR Tags Metadata for two images built with the same Dockerfile but different and tags
ImageBuilder cannot generate MCR Tags Metadata for two images built with the same Dockerfile but different tags
Nov 24, 2023
While implementing dotnet/dotnet-docker#5021, I tried to re-use the existing
jammy-chiseled
runtime
andaspnet
Dockerfiles but add an argument for specifying the variant of the base image, since there should be no difference to the Dockerfile content. Generating readmes fails for this scenario, I believe because of this code:docker-tools/src/Microsoft.DotNet.ImageBuilder/src/McrTagsMetadataGenerator.cs
Lines 139 to 150 in 74f9169
Which would see that the platforms are matching and remove the matching doc info. This means when we add the McrTagsMetadata for the new tags, the new tags are ignored and thus readme generation fails.
I validated that changing the source Dockerfile fixes this.
Actual behavior
The text was updated successfully, but these errors were encountered: