Skip to content

Conversation

@rpmcginty
Copy link
Collaborator

@rpmcginty rpmcginty commented Nov 22, 2025

What's in this Change?

It turns out that when aws_cdk.aws_stepfunctions code renders state machine definitions, it goes through all the code definitions and removes any null or undefined (which is None in our case). This means that despite us specifically specifying a field in a a parameter of a pass state, this value gets stripped out.

The solution is to fill in this value with a JsonNull.INSTANCE. It preserves the null value when rendered as cloud formation.

Testing

I synthesized results and confirmed the existence of the null value once I made this change:
image

@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.54%. Comparing base (c9668d2) to head (fba413b).

Files with missing lines Patch % Lines
...rmatics_cdk_lib/constructs_/sfn/fragments/batch.py 33.33% 2 Missing ⚠️
...lib/constructs_/sfn/fragments/informatics/batch.py 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   52.51%   52.54%   +0.03%     
==========================================
  Files          58       58              
  Lines        2866     2868       +2     
  Branches      246      246              
==========================================
+ Hits         1505     1507       +2     
  Misses       1334     1334              
  Partials       27       27              
Files with missing lines Coverage Δ
...lib/constructs_/sfn/fragments/informatics/batch.py 41.37% <50.00%> (+0.68%) ⬆️
...rmatics_cdk_lib/constructs_/sfn/fragments/batch.py 27.02% <33.33%> (+0.99%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rpmcginty rpmcginty merged commit d086b83 into main Nov 22, 2025
6 checks passed
@rpmcginty rpmcginty deleted the bugfix/make-null-value-permanent-in-sfn-definition branch November 22, 2025 01:57
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.

4 participants