-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: deployment workflow fails if there is no default vpc #672
Conversation
e3fd591
to
7821440
Compare
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/Generated/Recipe.cs
Outdated
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Generated/Recipe.cs
Outdated
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkWindows/Generated/Recipe.cs
Outdated
Show resolved
Hide resolved
src/AWS.Deploy.CLI/Commands/TypeHints/ElasticBeanstalkVpcCommand.cs
Outdated
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe
Show resolved
Hide resolved
cd28f59
to
8fc2c21
Compare
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkLinux/Generated/Recipe.cs
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppElasticBeanstalkWindows/Generated/Recipe.cs
Show resolved
Hide resolved
src/AWS.Deploy.Recipes/CdkTemplates/AspNetAppAppRunner/Generated/Recipe.cs
Show resolved
Hide resolved
8fc2c21
to
8331e0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redeployment to a loadbalanced beanstalk environment that was created with the 1.0 version of the CLI fails with this branch. I'm getting the following serialization error.
Unhandled exception. This is a bug. Please copy the stack trace below and file a bug at https://github.com/aws/aws-dotnet-deploy.
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at AWS.Deploy.CLI.Commands.DeployCommand.DisplayValue(Recommendation recommendation, OptionSettingItem optionSetting, Int32 optionSettingNumber, Int32 optionSettingsCount, Type typeHintResponseType, DisplayOptionSettingsMode mode) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\DeployCommand.cs:line 785
at AWS.Deploy.CLI.Commands.DeployCommand.DisplayOptionSetting(Recommendation recommendation, OptionSettingItem optionSetting, Int32 optionSettingNumber, Int32 optionSettingsCount, DisplayOptionSettingsMode mode) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\DeployCommand.cs:line 685
at AWS.Deploy.CLI.Commands.DeployCommand.GetSelectedRecommendationFromPreviousDeployment(Orchestrator orchestrator, List`1 recommendations, CloudApplication deployedApplication, DeploymentSettings deploymentSettings, String deploymentProjectPath) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\DeployCommand.cs:line 361
at AWS.Deploy.CLI.Commands.DeployCommand.InitializeDeployment(String cloudApplicationName, DeploymentSettings deploymentSettings, String deploymentProjectPath) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\DeployCommand.cs:line 213
at AWS.Deploy.CLI.Commands.DeployCommand.ExecuteAsync(String applicationName, String deploymentProjectPath, DeploymentSettings deploymentSettings) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\DeployCommand.cs:line 118
at AWS.Deploy.CLI.Commands.CommandFactory.<BuildDeployCommand>b__43_0(DeployCommandHandlerInput input) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.CLI\Commands\CommandFactory.cs:line 255
Error converting value {null} to type 'System.Boolean'. Path 'CreateNew', line 1, position 29.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at AWS.Deploy.Common.Recipes.OptionSettingItem.GetValue[T](IDictionary`2 replacementTokens, IDictionary`2 displayableOptionSettings) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.Common\Recipes\OptionSettingItem.ValueOverride.cs:line 20
at AWS.Deploy.Orchestration.OptionSettingHandler.GetOptionSettingValue[T](Recommendation recommendation, OptionSettingItem optionSetting) in C:\codebase\aws-dotnet-deploy\src\AWS.Deploy.Orchestration\OptionSettingHandler.cs:line 220
Null object cannot be converted to a value type.
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
[
Be sure to do lots of redeployment testing from environments created before this change. This has to be a seamless update for users.
Other then my redeployment concerns the changes to the Recipes and CDK projects look good. I did not get a chance to review the orchestrator/typehint code.
cdf5326
to
538993c
Compare
src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/VpcExistsValidator.cs
Outdated
Show resolved
Hide resolved
538993c
to
81c35f6
Compare
Issue #, if available:
DOTNET-6108
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.