prom3theu5 / aspirational-manifests

Handle deployments of .NET Aspire AppHost Projects
MIT License
702 stars 36 forks source link

Generate kustomize manifest for angular (AddNpmApp) fails #194

Closed TobiasNBG closed 6 months ago

TobiasNBG commented 6 months ago

🔥 Bug Description

Getting an exception when calling aspirate generate when I include an angular app (AddNpmApp) Generating with --output-format compose or helm works fine

Exception:

System.NullReferenceException: Object reference not set to an instance of an object. at bool Aspirate.Shared.Models.Aspirate.KubernetesDeploymentData.get_HasAnyAnnotations() in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Shared/Models/Aspirate/KubernetesDeploymentData.cs:160 at object HandlebarsDotNet.MemberAccessors.ReflectionMemberAccessor.RawObjectTypeDescriptor.<>cDisplayClass11_1`2.b__1(object o) at bool HandlebarsDotNet.MemberAccessors.ReflectionMemberAccessor.TryGetValueImpl(object instance, Type instanceType, ChainSegment memberName, out object value) at bool HandlebarsDotNet.MemberAccessors.ReflectionMemberAccessor.TryGetValue(object instance, ChainSegment memberName, out object value) at bool HandlebarsDotNet.BindingContext.TryGetVariable(ChainSegment segment, out object value) at bool HandlebarsDotNet.PathStructure.PathResolver.TryResolveValue(bool isVariable, BindingContext context, ChainSegment chainSegment, object instance, out object value) at object HandlebarsDotNet.PathStructure.PathResolver.ResolvePath(BindingContext context, PathInfo pathInfo) at object HandlebarsDotNet.Helpers.LateBindHelperDescriptor.Invoke(in HelperOptions options, in Context context, in Arguments arguments) at object HandlebarsDotNet.Helpers.LateBindHelperDescriptor.HandlebarsDotNet.Helpers.IHelperDescriptor.Invoke(in HelperOptions options, in Context context, in Arguments arguments) at void lambda_method15(Closure , ref EncodedTextWriter , BindingContext ) at void HandlebarsDotNet.HandlebarsEnvironment.<>cDisplayClass19_0.b0(TextWriter writer, object context, object data) at string HandlebarsDotNet.HandlebarsEnvironment.<>cDisplayClass20_0.b__0(object context, object data) at void Aspirate.Services.Implementations.ManifestWriter.CreateFile(string inputFile, string outputPath, TTemplateData data, string templatePath) in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Services/Implementations/ManifestWriter.cs:147 at void Aspirate.Services.Implementations.ManifestWriter.CreateDeployment(string outputPath, TTemplateData data, string templatePath) in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Services/Implementations/ManifestWriter.cs:41 at Task Aspirate.Processors.Resources.Dockerfile.DockerfileProcessor.CreateManifests(CreateManifestsOptions options) in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Processors/Resources/Dockerfile/DockerfileProcessor.cs:45 at async Task Aspirate.Commands.Actions.Manifests.GenerateKustomizeManifestsAction.ProcessIndividualResourceManifests(KeyValuePair<string, Resource> resource) in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Commands/Actions/Manifests/GenerateKustomizeManifestsAction.cs:56 at async Task Aspirate.Commands.Actions.Manifests.GenerateKustomizeManifestsAction.ExecuteAsync() in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Commands/Actions/Manifests/GenerateKustomizeManifestsAction.cs:29 at async Task Aspirate.Commands.Actions.ActionExecutor.ExecuteCommandsAsync() in /home/runner/work/aspirational-manifests/aspirational-manifests/src/Aspirate.Commands/Actions/ActionExecutor.cs:65

prom3theu5 commented 6 months ago

Thanks for reporting - fix is building now - version 0.7.5-preview, will be on nuget in about 10 mins

TobiasNBG commented 6 months ago

Thanks!! Works great now