-
Notifications
You must be signed in to change notification settings - Fork 61
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): make csi use mr version from go.mod in ci #598
fix(csi): make csi use mr version from go.mod in ci #598
Conversation
Signed-off-by: Alessio Pragliola <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Signed-off-by: Alessio Pragliola <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this re-uses (*in github action) the standard docker-build target from the main makefile, and
/lgtm
thanks a lot @Al-Pragliola
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Al-Pragliola,
Overall I don't think this is going to work as expected for two reasons:
- If we change
.github/workflows/csi-build-and-push-image.yml
we might be in a chicken-egg situation as we would like to release CSI together with model-registry but we don't have yet the tag released - If we change
.github/workflows/csi-test.yml
we might be not able to test csi with a dev version of model-registry, i.e., we might be not able to detect any breaking change in model-registry that would break csi
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this, we are making use of the model-registry version that has pinned in the go.mod as you said, but this makes impossible to test the current CSI with the dev (not yet released) version of model-registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is not the solution to the bigger problem of the relationship between CSI and MR and it's not aimed to be, for that we should consider what you guys proposed in the related issue #338
But to test CSI with the current unreleased version of MR we could make use of:
go get github.com/kubeflow/model-registry@<commit-hash>
so that when we are releasing a new version of both we take the latest commit hash and update the go.mod (if it's needed at all, because if there's no change to the rest client it should be compatible)
wdyt?
yep, with
overriding the version of model-registry from the csi/go.mod file |
Expanding on my previous comment, with # Copy the Go Modules manifests
COPY csi/go.mod go.mod
COPY csi/go.sum go.sum
RUN echo "replace github.com/kubeflow/model-registry => ../" >> go.mod exactly because we would like to test the Consider the scenario where you change something, by mistake or on purpose, you would not be able to detect that if you use a pinned version of model registry. On the other hand, we could try to change
|
Thanks for you feedback @lampajr , what do you think about having another GHA that procs only when changes are made in the thinking out loud, we are only changing dependencies in the build phase, we still test against the current MR deployment when running kind so we should still be able to detect breaking changes |
Let's analyze this scenario:
(from this PR) CI will build using the pinned version from go.mod so the build will succeed - then the e2e tests will fail because we are testing against the local built version of MR (and there's a breaking change) pro:
cons:
(previous) CI will fail to build and stop here pro:
cons:
neither is a perfect solution, as mentioned above, we can improve the "fix" from this PR by adding a GHA that actually checks if something breaks when there's a change in the mr pkg folder |
Hi @Al-Pragliola, I agree there is no "best" solution here and I see drawbacks on both approaches tbh. Let me write down some comments
I am not sure this is actually guaranteed, are you saying that because you had some evidence confirming this?
I agree this would be clearly better, or alternatively we could clearly specify the CSI uses the locally referenced model-registry without ever pinning a version there
Another Overall, I think that having the possibility to check incompatibility issues earlier is appreciated, so having a way to check the CSI with the local/dev version of model registry is really good. TBH I think the ~best solution would be to find what is the best approach among those mentioned here #338 |
I think we can remove this
I agree this is a problem, but I am not sure this is going to be fixed with this PR, happy to be wrong though |
You are right, I did not provide any evidence 🙏🏼 I opened a PR for a recent example of a false negative, here you can see the previous behavior: #548 and post-"fix": I agree with you that we should implement a solution from #338 , I am a fan of the sub command approach 👍🏼 |
Thanks for the examples 🙏🏻
I am planning to propose something sooner, then I think we can discuss whether that approach is cleaner or not and if we want to proceed that way, wdyt? |
Sure, that sounds good to me. Let's discuss it further once you've proposed the approach |
Closed in favor of #601 |
Description
When building/testing CSI in the CI we are using "local" mr as a dependency instead of the version pinned in the go.mod file, this bring an inconsistency between what we are shipping as a docker image and what is actually in the codebase.
Side effect: This should fix all the problems that dependabot gives us when touching mr go.mod.
How Has This Been Tested?
no local testing is needed
Merge criteria:
DCO
check)