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(scheduler): Add unit tests for chainer service #5480

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

sakoush
Copy link
Member

@sakoush sakoush commented Mar 26, 2024

This PR adds more test coverage for the chainer service:

  • testing pipeline creation and deletion
  • testing rolling pipeline upgrade

@sakoush sakoush requested a review from lc525 as a code owner March 26, 2024 12:10
@sakoush sakoush added the v2 label Mar 26, 2024
Copy link
Member

@lc525 lc525 left a comment

Choose a reason for hiding this comment

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

Minor observation on expected errors/states, might require a small fix. Lgtm otherwise.

g.Expect(psr).To(BeNil())
}
} else {
pipeline, err := s.pipelineHandler.GetPipeline(test.loadReqV2.Name)
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this part of the test fail if test.connection == false and we don't pass a loadReqV2 ?
If I understand the logic correctly, we should test on whether loadReqV2 exists, and expect "PipelineNotFoundErr" out of GetPipeline(...) if it doesn't.

Copy link
Member Author

Choose a reason for hiding this comment

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

what I am testing here is that we still have loadReqV2 (ie a new version to roll out) but we do not have a connection to the dataflow engine. In this case the state of the pipeline should be marked with no dataflow engines. I will add a note to explain in the code.

if we do not pass loadReqV2 no events will be sent to dataflow engine in the first place as we do not have a rolling update. which is covered a little bit above this snippet.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in 3b88833 I have also made the error message check explicit to this specific case.

@sakoush sakoush merged commit 55aea43 into SeldonIO:v2 Mar 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants