From 77f8f05c9f74ee62ee5a74c82033893bd957ff69 Mon Sep 17 00:00:00 2001 From: aws-sdk-dotnet-automation Date: Mon, 27 Jun 2022 19:43:57 +0000 Subject: [PATCH 1/7] build: version bump to 0.50 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 59c9968c7..bdfbd567f 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.49", + "version": "0.50", "publicReleaseRefSpec": [ ".*" ], From b27f13ed578056f596442e55db0f596b38bdeea7 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Wed, 29 Jun 2022 13:22:35 -0700 Subject: [PATCH 2/7] fix: Correctly validate platform architecture for Windows instance types --- .../InstanceTypeValidator.cs | 4 ++-- .../InstanceTypeCommandTest.cs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs index ea1d287a3..cb98b1e3c 100644 --- a/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs +++ b/src/AWS.Deploy.Common/Recipes/Validation/OptionSettingItemValidators/InstanceTypeValidator.cs @@ -73,9 +73,9 @@ public async Task Validate(object input, Recommendation recomm return ValidationResult.Failed($"The specified instance type {rawInstanceType} does not exist in the deployment region."); } - if (string.Equals(_platform, EC2.FILTER_PLATFORM_WINDOWS) && !instanceTypeInfo.ProcessorInfo.SupportedArchitectures.Contains("x64_86")) + if (string.Equals(_platform, EC2.FILTER_PLATFORM_WINDOWS) && !instanceTypeInfo.ProcessorInfo.SupportedArchitectures.Contains(EC2.FILTER_ARCHITECTURE_X86_64)) { - return ValidationResult.Failed($"The specified instance type {rawInstanceType} does not support x86_64."); + return ValidationResult.Failed($"The specified instance type {rawInstanceType} does not support {EC2.FILTER_ARCHITECTURE_X86_64}."); } return ValidationResult.Valid(); diff --git a/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/InstanceTypeCommandTest.cs b/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/InstanceTypeCommandTest.cs index cfda75c43..7c20d585b 100644 --- a/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/InstanceTypeCommandTest.cs +++ b/test/AWS.Deploy.CLI.UnitTests/TypeHintCommands/InstanceTypeCommandTest.cs @@ -384,7 +384,7 @@ public async Task LinuxExecute() var interactiveServices = new TestToolInteractiveServiceImpl(new List { "y", // Free tier - "1", // Architecture x64_86 + "1", // Architecture x86_64 "1", // CPU "1", // Memory "1" // Instance type @@ -438,13 +438,13 @@ public async Task WindowsValidate() .Setup(x => x.DescribeInstanceType(It.IsAny())) .ReturnsAsync((string type) => { - if (type == "t1.x64_86") + if (type == "t1.x86_64") { return new InstanceTypeInfo { ProcessorInfo = new ProcessorInfo { - SupportedArchitectures = new List { "x64_86" } + SupportedArchitectures = new List { "x86_64" } } }; } @@ -464,7 +464,7 @@ public async Task WindowsValidate() { ProcessorInfo = new ProcessorInfo { - SupportedArchitectures = new List { "x64_86", EC2.FILTER_ARCHITECTURE_ARM64 } + SupportedArchitectures = new List { "x86_64", EC2.FILTER_ARCHITECTURE_ARM64 } } }; } @@ -474,7 +474,7 @@ public async Task WindowsValidate() var validator = new WindowsInstanceTypeValidator(_mockAWSResourceQueryer.Object); - Assert.True(validator.Validate("t1.x64_86", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); + Assert.True(validator.Validate("t1.x86_64", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.False(validator.Validate("t1.arm64", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.True(validator.Validate("t1.both", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.False(validator.Validate("t1.fake", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); @@ -502,13 +502,13 @@ public async Task LinuxValidate() .Setup(x => x.DescribeInstanceType(It.IsAny())) .ReturnsAsync((string type) => { - if (type == "t1.x64_86") + if (type == "t1.x86_64") { return new InstanceTypeInfo { ProcessorInfo = new ProcessorInfo { - SupportedArchitectures = new List { "x64_86" } + SupportedArchitectures = new List { "x86_64" } } }; } @@ -528,7 +528,7 @@ public async Task LinuxValidate() { ProcessorInfo = new ProcessorInfo { - SupportedArchitectures = new List { "x64_86", EC2.FILTER_ARCHITECTURE_ARM64 } + SupportedArchitectures = new List { "x86_64", EC2.FILTER_ARCHITECTURE_ARM64 } } }; } @@ -538,7 +538,7 @@ public async Task LinuxValidate() var validator = new LinuxInstanceTypeValidator(_mockAWSResourceQueryer.Object); - Assert.True(validator.Validate("t1.x64_86", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); + Assert.True(validator.Validate("t1.x86_64", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.True(validator.Validate("t1.arm64", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.True(validator.Validate("t1.both", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); Assert.False(validator.Validate("t1.fake", beanstalkRecommendation, instanceTypeSetting).Result.IsValid); From 5ca1da180f316a1ae9bd8c94cb58a3d91f2b5b9f Mon Sep 17 00:00:00 2001 From: aws-sdk-dotnet-automation Date: Wed, 29 Jun 2022 21:19:12 +0000 Subject: [PATCH 3/7] build: version bump to 0.51 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index bdfbd567f..adccf568c 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.50", + "version": "0.51", "publicReleaseRefSpec": [ ".*" ], From 7450278306863391d5a640f7ac2863d435e05196 Mon Sep 17 00:00:00 2001 From: Phil Asmar Date: Thu, 30 Jun 2022 09:24:01 -0400 Subject: [PATCH 4/7] feat: added validation for Preferred Start Time in Beanstalk recipe --- .../ASP.NETAppElasticBeanstalkLinux.recipe | 9 +++++++++ .../ASP.NETAppElasticBeanstalkWindows.recipe | 9 +++++++++ ...BeanStalkOptionSettingItemValidationTests.cs | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe index 973795dfd..35bfba1ef 100644 --- a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe +++ b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkLinux.recipe @@ -470,6 +470,15 @@ "DefaultValue": "Sun:00:00", "AdvancedSetting": true, "Updatable": true, + "Validators": [ + { + "ValidatorType": "Regex", + "Configuration": { + "Regex": "^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$", + "ValidationFailedMessage": "Invalid Preferred Start Time. You need to specify a day and time in the 'day:hour:minute' format such as 'Sun:00:00'." + } + } + ], "DependsOn": [ { "Id": "ElasticBeanstalkManagedPlatformUpdates.ManagedActionsEnabled", diff --git a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe index 2d726848a..f0400a88a 100644 --- a/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe +++ b/src/AWS.Deploy.Recipes/RecipeDefinitions/ASP.NETAppElasticBeanstalkWindows.recipe @@ -459,6 +459,15 @@ "DefaultValue": "Sun:00:00", "AdvancedSetting": true, "Updatable": true, + "Validators": [ + { + "ValidatorType": "Regex", + "Configuration": { + "Regex": "^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$", + "ValidationFailedMessage": "Invalid Preferred Start Time. You need to specify a day and time in the 'day:hour:minute' format such as 'Sun:00:00'." + } + } + ], "DependsOn": [ { "Id": "ElasticBeanstalkManagedPlatformUpdates.ManagedActionsEnabled", diff --git a/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs b/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs index 66c117650..6c3a5d664 100644 --- a/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs +++ b/test/AWS.Deploy.CLI.Common.UnitTests/Recipes/Validation/ElasticBeanStalkOptionSettingItemValidationTests.cs @@ -46,6 +46,23 @@ public async Task ApplicationNameValidationTest(string value, bool isValid) await Validate(optionSettingItem, value, isValid); } + [Theory] + [InlineData("Sun:00:00", true)] + [InlineData("sun:00:00", false)] + [InlineData("Suns:00:00", false)] + [InlineData("Mon:23:59", true)] + [InlineData("Mon:24:00", false)] + [InlineData("Mon:00:60", false)] + [InlineData("", false)] + [InlineData("test", false)] + public async Task PreferredStartTimeValidationTest(string value, bool isValid) + { + var optionSettingItem = new OptionSettingItem("id", "fullyQualifiedId", "name", "description"); + // valid examples are in the 'day:hour:minute' pattern such as 'Sun:00:00' + optionSettingItem.Validators.Add(GetRegexValidatorConfig("^(Mon|Tue|Wed|Thu|Fri|Sat|Sun):(0[0-9]|1\\d|2[0-3]):(0[0-9]|1\\d|2\\d|3\\d|4\\d|5\\d)$")); + await Validate(optionSettingItem, value, isValid); + } + [Theory] [InlineData("abc-123", true)] [InlineData("abc-ABC-123-xyz", true)] From 4bbe82f1db07a524754abdf3f2e3e3d8360dc489 Mon Sep 17 00:00:00 2001 From: El Asmar Date: Tue, 5 Jul 2022 11:27:11 -0400 Subject: [PATCH 5/7] docs: update documentation to remove TODO --- site/content/docs/commands/project.md | 4 +++- site/content/docs/commands/server-mode.md | 7 ++++--- site/content/index.md | 4 ---- site/content/troubleshooting-guide/missing-dependencies.md | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/site/content/docs/commands/project.md b/site/content/docs/commands/project.md index 5142cfa24..ce07fa4a2 100644 --- a/site/content/docs/commands/project.md +++ b/site/content/docs/commands/project.md @@ -10,4 +10,6 @@ Generates and saves the deployment CDK project in a user provided directory path without proceeding with a deployment. Allows user to customize the CDK project before deploying the application. ### Examples -TBD... +``` +dotnet aws deployment-project generate --region us-west-2 +``` \ No newline at end of file diff --git a/site/content/docs/commands/server-mode.md b/site/content/docs/commands/server-mode.md index ab59fd41d..4e763af8b 100644 --- a/site/content/docs/commands/server-mode.md +++ b/site/content/docs/commands/server-mode.md @@ -9,6 +9,7 @@ ### Description Starts the tool in the server mode to provide integration with IDEs, for example Visual Studio. This tool is not intended for the end user usage unless you are writing a custom integration into an IDE. -### Options - -TODO +### Examples +``` +dotnet aws server-mode --port 1234 --parent-pid 12345 +``` diff --git a/site/content/index.md b/site/content/index.md index 2f1b2f0ac..45791c707 100644 --- a/site/content/index.md +++ b/site/content/index.md @@ -20,10 +20,6 @@ AWS Deploy tool is available for download as a NuGet package. See [How to instal ### ... in AWS Toolkit for Visual Studio The AWS Toolkit for Visual Studio exposes the same deployment functionality via **Publish to AWS** feature. For information about toolkit versions and using the feature, see [Publish to AWS](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/publish-experience.html) in the [AWS Toolkit for Visual Studio User Guide](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/). -## What's new? - -TODO - ## Additional Resources * The [aws-dotnet-deploy](https://github.com/aws/aws-dotnet-deploy) GitHub repo. diff --git a/site/content/troubleshooting-guide/missing-dependencies.md b/site/content/troubleshooting-guide/missing-dependencies.md index 357d35ece..633f14cfb 100644 --- a/site/content/troubleshooting-guide/missing-dependencies.md +++ b/site/content/troubleshooting-guide/missing-dependencies.md @@ -6,7 +6,7 @@ This section of the troubleshooting guide explains how to determine, diagnose, a **Why is this happening**: AWS.Deploy.Tools relies on [AWS Cloud Development Kit](https://aws.amazon.com/cdk/) (CDK) to provision resources for your cloud application. AWS CDK requires Node.js to be installed in your machine. See the [CDK's FAQs](https://aws.amazon.com/cdk/faqs/) for more information about how it uses Node.js. -*Minimum required Node.js version >= 10.13.0* +*Minimum required Node.js version >= 14.17.0* **Resolution**: See [here](https://nodejs.org/en/download/) to install Node.js on your system. From d8c4a7dc17c68626a513ab97d3cfa1ce47a38863 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Sun, 3 Jul 2022 01:46:00 -0700 Subject: [PATCH 6/7] fix: Make validation state for the recommendation is not written in deployment project recipe. --- src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs b/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs index b2823bc1f..b9cd04b6a 100644 --- a/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs +++ b/src/AWS.Deploy.Common/Recipes/OptionSettingItem.cs @@ -164,6 +164,7 @@ public partial class OptionSettingItem : IOptionSettingItem /// /// The validation state of the setting that contains the validation status and message. /// + [JsonIgnore] public OptionSettingValidation Validation { get; set; } public OptionSettingItem(string id, string fullyQualifiedId, string name, string description) From 0bd19f3364d43f5911a876c259d68c29e824c86d Mon Sep 17 00:00:00 2001 From: Phil Asmar Date: Tue, 5 Jul 2022 13:15:14 -0400 Subject: [PATCH 7/7] chore: update to the GA version 1.0 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index adccf568c..3d784fe69 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.51", + "version": "1.0", "publicReleaseRefSpec": [ ".*" ],