Skip to content

Commit cc87742

Browse files
Merge branch 'dev'
2 parents 744d31d + 58520e8 commit cc87742

12 files changed

+37
-16
lines changed

.github/workflows/aws-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Configure AWS Credentials
19-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4
19+
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 #v4
2020
with:
2121
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
2222
role-duration-seconds: 7200
@@ -29,7 +29,7 @@ jobs:
2929
$roleArn=$(cat ./response.json)
3030
"roleArn=$($roleArn -replace '"', '')" >> $env:GITHUB_OUTPUT
3131
- name: Configure Test Runner Credentials
32-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4
32+
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 #v4
3333
with:
3434
role-to-assume: ${{ steps.lambda.outputs.roleArn }}
3535
role-duration-seconds: 7200

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
# Assume an AWS Role that provides access to the Access Token
2727
- name: Configure AWS Credentials
28-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4
28+
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 #v4
2929
with:
3030
role-to-assume: ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_ROLE_ARN }}
3131
aws-region: us-west-2

.github/workflows/semgrep-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
p/owasp-top-ten
3636
3737
- name: Upload SARIF file for GitHub Advanced Security Dashboard
38-
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 #v3.28.16
38+
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b #v3.28.17
3939
with:
4040
sarif_file: semgrep.sarif
4141
if: always()

.github/workflows/sync-main-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
# Assume an AWS Role that provides access to the Access Token
2828
- name: Configure AWS Credentials
29-
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 #v4
29+
uses: aws-actions/configure-aws-credentials@f24d7193d98baebaeacc7e2227925dd47cc267f5 #v4
3030
with:
3131
role-to-assume: ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_ROLE_ARN }}
3232
aws-region: us-west-2

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Release 2025-05-19
2+
3+
### Aspire.Hosting.AWS (9.2.2)
4+
* Update default Amazon.Lambda.TestTool version to 0.10.3
5+
* Add IResourceWithWaitSupport support for CloudFormation provisioning. This is useful when using LocalStack container as the CloudFormation endpoint.
6+
17
## Release 2025-05-08
28

39
### Aspire.Hosting.AWS (9.2.1)

src/Aspire.Hosting.AWS/Aspire.Hosting.AWS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PackageTags>aspire integration hosting aws</PackageTags>
77
<Description>Add support for provisioning AWS application resources and configuring the AWS SDK for .NET.</Description>
88
<NoWarn>$(NoWarn);CS8002</NoWarn> <!-- AWS CDK packages are not signed -->
9-
<Version>9.2.1</Version>
9+
<Version>9.2.2</Version>
1010
<PackageReadmeFile>docs\README.md</PackageReadmeFile>
1111
</PropertyGroup>
1212

src/Aspire.Hosting.AWS/CDK/IConstructResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ namespace Aspire.Hosting.AWS.CDK;
77
/// <summary>
88
/// Resource representing an AWS CDK construct.
99
/// </summary>
10-
public interface IConstructResource : IResourceWithParent<IResourceWithConstruct>, IResourceWithConstruct;
10+
public interface IConstructResource : IResourceWithParent<IResourceWithConstruct>, IResourceWithConstruct, IResourceWithWaitSupport;

src/Aspire.Hosting.AWS/CDK/IStackResource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22

33
using Amazon.CDK;
4+
using Aspire.Hosting.ApplicationModel;
45
using Aspire.Hosting.AWS.CloudFormation;
56

67
namespace Aspire.Hosting.AWS.CDK;
78

89
/// <summary>
910
/// Resource representing an AWS CDK stack.
1011
/// </summary>
11-
public interface IStackResource : ICloudFormationTemplateResource, IResourceWithConstruct
12+
public interface IStackResource : ICloudFormationTemplateResource, IResourceWithConstruct, IResourceWithWaitSupport
1213
{
1314
/// <summary>
1415
/// The AWS CDK stack

src/Aspire.Hosting.AWS/CloudFormation/ICloudFormationResource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
using Amazon.CloudFormation;
44
using Amazon.CloudFormation.Model;
5+
using Aspire.Hosting.ApplicationModel;
56

67
namespace Aspire.Hosting.AWS.CloudFormation;
78

89
/// <summary>
910
/// Resource representing an AWS CloudFormation stack.
1011
/// </summary>
11-
public interface ICloudFormationResource : IAWSResource
12+
public interface ICloudFormationResource : IAWSResource, IResourceWithWaitSupport
1213
{
1314
/// <summary>
1415
/// The configured Amazon CloudFormation service client used to make service calls. If this property set

src/Aspire.Hosting.AWS/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ internal static class Constants
4646
/// <summary>
4747
/// The default version of Amazon.Lambda.TestTool that will be automatically installed
4848
/// </summary>
49-
internal const string DefaultLambdaTestToolVersion = "0.10.1";
49+
internal const string DefaultLambdaTestToolVersion = "0.10.3";
5050
}
Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
using Aspire.Hosting.ApplicationModel;
3+
24
namespace Aspire.Hosting.AWS.Provisioning;
35

46
internal interface IAWSResourceProvisioner
57
{
68
Task GetOrCreateResourceAsync(IAWSResource resource, CancellationToken cancellationToken = default);
79
}
810

9-
internal abstract class AWSResourceProvisioner<TResource> : IAWSResourceProvisioner
11+
internal abstract class AWSResourceProvisioner<TResource>(ResourceNotificationService notificationService) : IAWSResourceProvisioner
1012
where TResource : IAWSResource
1113
{
12-
public Task GetOrCreateResourceAsync(
14+
protected ResourceNotificationService NotificationService => notificationService;
15+
16+
public async Task GetOrCreateResourceAsync(
1317
IAWSResource resource,
1418
CancellationToken cancellationToken)
15-
=> GetOrCreateResourceAsync((TResource)resource, cancellationToken);
19+
{
20+
if (resource is IResourceWithWaitSupport waitResource)
21+
{
22+
await notificationService.WaitForDependenciesAsync(waitResource, cancellationToken).ConfigureAwait(false);
23+
await NotificationService.PublishUpdateAsync(resource, state => state with
24+
{
25+
State = new ResourceStateSnapshot("Starting", KnownResourceStateStyles.Info)
26+
}).ConfigureAwait(false);
27+
}
28+
29+
await GetOrCreateResourceAsync((TResource)resource, cancellationToken);
30+
}
1631

1732
protected abstract Task GetOrCreateResourceAsync(TResource resource, CancellationToken cancellationToken);
1833
}

src/Aspire.Hosting.AWS/Provisioning/CloudFormationResourceProvisioner.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212

1313
namespace Aspire.Hosting.AWS.Provisioning;
1414

15-
internal abstract partial class CloudFormationResourceProvisioner<T>(ResourceLoggerService loggerService, ResourceNotificationService notificationService) : AWSResourceProvisioner<T>
15+
internal abstract partial class CloudFormationResourceProvisioner<T>(ResourceLoggerService loggerService, ResourceNotificationService notificationService) : AWSResourceProvisioner<T>(notificationService)
1616
where T : ICloudFormationResource
1717
{
1818
protected ResourceLoggerService LoggerService => loggerService;
1919

20-
protected ResourceNotificationService NotificationService => notificationService;
21-
2220
protected async Task PublishCloudFormationUpdatePropertiesAsync(T resource, ImmutableArray<ResourcePropertySnapshot>? properties = null, ImmutableArray<UrlSnapshot>? urls = default)
2321
{
2422
if (properties == null)

0 commit comments

Comments
 (0)