Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle either tolerated_failure_count or tolerated_failure_percentage #284

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

agrare
Copy link
Member

@agrare agrare commented Oct 8, 2024

Follow-up to #282 (comment) to handle both ToleratedFailureCount and ToleratedFailurePercent present

@agrare agrare requested a review from Fryguy as a code owner October 8, 2024 17:32
@agrare agrare mentioned this pull request Oct 8, 2024
7 tasks
@Fryguy
Copy link
Member

Fryguy commented Oct 8, 2024

My brain is having trouble with ||= with booleans for some reason, but I think this is good.

@agrare agrare force-pushed the map_state_add_tolerated_failure branch from 29f095c to c045c07 Compare October 8, 2024 19:09
@agrare
Copy link
Member Author

agrare commented Oct 8, 2024

My brain is having trouble with ||= with booleans for some reason, but I think this is good.

Yeah it is funny how used to ||= being for nil we get 😄

@agrare agrare force-pushed the map_state_add_tolerated_failure branch from c045c07 to 369d341 Compare October 8, 2024 20:45
@agrare agrare added the enhancement New feature or request label Oct 8, 2024
@Fryguy Fryguy merged commit dfe547e into ManageIQ:master Oct 9, 2024
5 checks passed
@agrare agrare deleted the map_state_add_tolerated_failure branch October 9, 2024 13:25
@@ -110,13 +110,18 @@ def success?(context)
total = contexts.count

return true if num_failed.zero? || total.zero?
return true if tolerated_failure_percentage && tolerated_failure_percentage == 100
return false if tolerated_failure_count.nil? && tolerated_failure_percentage.nil?
Copy link
Member

@kbrock kbrock Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be a configuration error and not a runtime error?

UPDATE: I guess maybe it is alright to leave as is

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a payload validation, this is saying if there are any failures in the sub workflows and no tolerated_failure_* has been provided then the state has failed

agrare added a commit that referenced this pull request Oct 28, 2024
Added
- Add WorkflowBase base class for Workflow (#279)
- Add tool for using the aws stepfunctions simulator (#244)
- Implement Map state (#184)
- Add Map State Tolerated Failure (#282)
- Run Map iterations in parallel up to MaxConcurrency (#283)
- Implement Parallel State (#291)

Changed
- More granular compare_key and determine path at initialization time (#274)
- For Choice validation, use instance variables and not payload (#277)
- Return ExceedToleratedFailureThreshold if ToleratedFailureCount/Percentage is present (#285)

Fixed
- Fix case on log messages (#280)
- Handle either ToleratedFailureCount or ToleratedFailurePercentage (#284)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants