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(csi): prevent race condition in ci tests step #426

Conversation

Al-Pragliola
Copy link
Contributor

@Al-Pragliola Al-Pragliola commented Sep 24, 2024

Description

fixes a race condition found in the ci CSI tests: https://github.com/opendatahub-io/model-registry/actions/runs/10997757515/job/30534062040#logs

How Has This Been Tested?

run the ci

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.

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
@Al-Pragliola Al-Pragliola force-pushed the Al-Pragliola/csi-ci-prevent-race-cond branch from 7b2d9c2 to 89fa54f Compare September 24, 2024 16:53
@Al-Pragliola Al-Pragliola marked this pull request as ready for review September 24, 2024 16:54
@google-oss-prow google-oss-prow bot requested a review from rareddy September 24, 2024 16:54
@Al-Pragliola
Copy link
Contributor Author

cc @lampajr

Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

thank you @Al-Pragliola this is great and cc @lampajr for awareness and in case this "pattern" of the sleep is used in other places?

/lgtm

Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Al-Pragliola, it looks great to me!!!

@tarilabs the only other place where we could use the same approach is here

sleep 5
SERVICE_HOSTNAME=$(kubectl get inferenceservice sklearn-iris -n $KSERVE_TEST_NAMESPACE -o jsonpath='{.status.url}' | cut -d "/" -f 3)
res=$(curl -s -H "Host: ${SERVICE_HOSTNAME}" -H "Content-Type: application/json" "http://${INGRESS_HOST}/v1/models/sklearn-iris:predict" -d @/tmp/iris-input.json)
echo "Received: $res"

iirc I introduced the 5s sleep because sometimes the res was not populated.. but I don't rembember if it was failing in retrieving SERVICE_HOSTNAME or the res directly. So I think this could be done as a follow-up PR if needed.

csi/test/test_utils.sh Show resolved Hide resolved
@google-oss-prow google-oss-prow bot removed the lgtm label Sep 25, 2024
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
@Al-Pragliola Al-Pragliola force-pushed the Al-Pragliola/csi-ci-prevent-race-cond branch from 791d832 to 4f3003c Compare September 25, 2024 10:13
Copy link
Member

@lampajr lampajr left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @Al-Pragliola !

/lgtm
/approve

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lampajr, tarilabs

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

The pull request process is described 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

@google-oss-prow google-oss-prow bot merged commit 3110d1b into kubeflow:main Sep 25, 2024
17 checks passed
@Al-Pragliola Al-Pragliola deleted the Al-Pragliola/csi-ci-prevent-race-cond branch September 25, 2024 14:06
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.

3 participants