Skip to content

AWS cloud formation - revisit null checks#1909

Merged
kat-ms merged 5 commits intomainfrom
katms/cloud-formation-revisit-nullability
Apr 30, 2026
Merged

AWS cloud formation - revisit null checks#1909
kat-ms merged 5 commits intomainfrom
katms/cloud-formation-revisit-nullability

Conversation

@kat-ms
Copy link
Copy Markdown
Contributor

@kat-ms kat-ms commented Apr 30, 2026

⚠️ Does this change require a corresponding Server Change?
⚠️ If so - please add a "Requires Server Change" label to this PR!

A previous PR fixed the null reference exception reported by the customer. However the impact of AWS v4 of the SDK returning null collections is wider spread than just the file that was targeted.

This is another attempt to cover off the remaining bases:

  • In Program.cs have set Amazon.AWSConfigs.InitializeCollections = true; - which restores v3 collection behaviour where empty collections are returned instead of null (ref: https://docs.aws.amazon.com/sdk-for-net/v4/developer-guide/net-dg-v4.html)
  • Where identified (with the help of Claude) targeted null checks have been added to collections where they may be null.
  • AwsKubernetesDiscoverer and S3PackageDownloader have been left untested as they directly instantiate the SDK client (would require refactoring)

Fixes FD-273

@kat-ms kat-ms marked this pull request as ready for review April 30, 2026 04:12
@kat-ms kat-ms merged commit 9e8f518 into main Apr 30, 2026
33 checks passed
@kat-ms kat-ms deleted the katms/cloud-formation-revisit-nullability branch April 30, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants