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

fix: state machine improvements and error handling (SOFIE-3751) #207

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nytamin
Copy link
Contributor

@nytamin nytamin commented Jan 23, 2025

About Me

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a: Bug fix

Current Behavior

We saw a situation in production that PM was not handling very well.

Issue A:
There was an expectation that throw in workOnExpectation with error:

"Error: Clip id 123456789 not found"

And PM reported the errors as bad status, which didn't look too good.

Issue B:
Expectations that are fulfilled but are waiting for another expectation get stuck in a state loop fullfilled->new->waiting->fullfilled.

New Behavior

PM will handle the issues more gracefully.

Issue A: Expectations will stay in WAITING state when the Quantel clip is not found, without throwing errors.

Issue B: Those expectations will not loop through the states anymore.

Testing Instructions

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

…her expectation, loop through fullfilled->new->waiting->fullfilled statuses.

This was caused by the WAITING state didn't check if the expectaiton was waiting for another BEFORE checking if it was fulfilled. But the FULFILLED state did.
@nytamin nytamin changed the title fix: state machine improvements and error handling fix: state machine improvements and error handling (SOFIE-3751) Jan 23, 2025
@nytamin nytamin requested a review from a team January 23, 2025 12:35
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.

1 participant