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

feat(inferenceservice): added integration tests to inferenceservice reconcile function #574

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Al-Pragliola
Copy link
Contributor

@Al-Pragliola Al-Pragliola commented Nov 19, 2024

Description

This pull request introduces integration tests for the new inferenceservice reconcile feature, and I chose to use envtest to test the functionality, as it is the de facto standard for testing controller-like behavior. Since envtest is not a real Kubernetes cluster, I had to mock responses from the model registry, as you can see in the suite_test.go file, and check that the inference-service-id label is added to the kserve inferenceservice CR. I also found some bugs in the reconciler thanks to the tests, and fixed them in this PR.

NOTE: The large chunk of code in this PR comes from the CRD that needs to be added to the envtest cluster to make it handle inference services.

How Has This Been Tested?

make test

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andreyvelich for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Al-Pragliola Al-Pragliola marked this pull request as ready for review November 19, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant