Step Functions State Machine: Add reachability check for all states#4465
Step Functions State Machine: Add reachability check for all states#4465r-heimann wants to merge 1 commit into
Conversation
|
@kddejong Could you please trigger the pipeline? |
af3e1d7 to
1faef33
Compare
|
@kddejong Would you be so kind to trigger the pipeline? (Not ready for merge yet) |
9bb96f3 to
04cb6da
Compare
|
@kddejong Would you be so kind to trigger once more the pipeline? |
|
I was wondering why Tests unrelated to Step Functions are failing and did a rebase to fix #4550, but (locally) more tests are failing now: @kddejong I'm not entirely sure if i am doing something wrong on my side, but are there issues with Tests on the |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4465 +/- ##
==========================================
- Coverage 94.42% 94.40% -0.03%
==========================================
Files 430 430
Lines 15099 15126 +27
Branches 2924 2937 +13
==========================================
+ Hits 14257 14279 +22
- Misses 461 462 +1
- Partials 381 385 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Should be better. I've been working on separating out the schema work into its own repository. Testing is a lot more clean now if you do another re-base or merge with main. |
4702183 to
5cdb3d8
Compare
|
@kddejong Thank you, i have rebased my branch and done pip install -e ".[full]"
cfn-lint -u
tox -e py313
tox -e styleand the tests are passing, would you be so kind to trigger the pipeline once more? |
|
|
||
| yield ValidationError(message, path=error_path, rule=self) | ||
| while to_visit: | ||
| current = to_visit.pop(0) |
There was a problem hiding this comment.
to_visit.pop(0) is O(n) per pop since it shifts all elements. collections.deque is already imported — switch to deque with popleft() for O(1).
| to_visit.append(target) | ||
| state_type = state.get("Type") | ||
|
|
||
| if state_type == "Parallel": |
There was a problem hiding this comment.
The old code iterated all states to find nested Parallel/Map sub-state-machines. The new code only recurses into nested state machines within reachable states. Is this intentional? It means nested validation errors inside unreachable states won't surface until reachability is fixed. Seems reasonable — just confirming it's deliberate.
Issue #, if available:
fixes #4073
Description of changes:
Adds reachability checks for all states and updates the State Machine tests.
An LLM was used as help in the creation of this PR. In my tests i didn't find any regressions but i cannot rule out that something might have slipped through.
@tyukei would you be so kind to review this PR?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.