-
Notifications
You must be signed in to change notification settings - Fork 606
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
Bug 2009664: fix edit ksvc in git import flow #10255
Conversation
@debsmita1: This pull request references Bugzilla bug 2009664, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind bug |
/cc @karthikjeeyar |
/retest |
e2e tests seem to be failing. |
@nemesis09 Rebased. PTAL |
I think we need to create a new imagestream only if the image is impacted i.e if url is changed otherwise for any other change in ksvc like change scaling options, labels etc should not create any new image steam. And this behaviour is in deploy image as well so it'll be nice to get the fix there as well as we are created extra imagestreams which can be avoided. |
referencePolicy: { type: 'Local' }, | ||
}, | ||
], | ||
}, | ||
}; | ||
const imageStream = mergeData(originalImageStream, newImageStream); | ||
return verb === 'update' |
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.
Verb is always set to true even in edit flow 🤔 , so Imagestreams are getting created everytime.
@debsmita1: This pull request references Bugzilla bug 2009664, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@debsmita1 I verified locally, By updating the git URL the revisions are now coming up successfully, Note: Updating the scaling options is the Deploy Image flow doesn't create new imagestream (expected) and revisions are coming up there as well. Edit: Make Serverless option creates a new Imagestream for the new KSVC workload and that is expected. Git flow, Deploy Image and Make serverless options work fine. /lgtm |
/lgtm |
const originalRepository = | ||
appResources?.buildConfig?.data?.spec?.source?.git?.uri ?? | ||
appResources?.pipeline?.data?.spec?.params?.find((param) => param?.name === 'GIT_REPO') | ||
?.default ?? | ||
null; |
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.
can we have as below as no need to explicitly return null i think
const originalRepository = | |
appResources?.buildConfig?.data?.spec?.source?.git?.uri ?? | |
appResources?.pipeline?.data?.spec?.params?.find((param) => param?.name === 'GIT_REPO') | |
?.default ?? | |
null; | |
const originalRepository = | |
appResources?.buildConfig?.data?.spec?.source?.git?.uri ?? | |
appResources?.pipeline?.data?.spec?.params?.find((param) => param?.name === 'GIT_REPO') | |
?.default; |
@debsmita1 on edit for ksvc if I change git repo for git import flow or change image for container image flow then revision gets created and it does come up but I still see it's not serving the content from the new image. We need to look into this. |
@invincibleJai tried this out in both the flows |
@debsmita1 I verified again and could not see above issue and overall looks good, I overserved one issue with the edit of ksvc (which is created via make Serverless flow) |
@debsmita1: This pull request references Bugzilla bug 2009664, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixed! PTAL |
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.
/approve
@debsmita1 I tested the PR locally, Revisions are coming up properly but I observed a strange thing. When I edit the url from a nodejs repo to spring boot repo url, the revisions come up properly but the image the ksvc has is still pointing to the nodejs (old image). After a long time it automatically resets to newly edited image (spring boot). Not sure if this is the default knative behavior. |
@karthikjeeyar yeah this is expected behaviour as if we make a change in git import flow with edit flow then first build (S2I) happens, then image steam get updated and finally serverless pick it up so it takes a while. It will be quick in case of container image flow. |
@invincibleJai Yes, Container image flow is quick in updating to a new image, only git import took some time. Thanks for clarifying it. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: debsmita1, karthikjeeyar, rohitkrai03 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@debsmita1: All pull requests linked via external trackers have merged: Bugzilla bug 2009664 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@debsmita1: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Fixes:
https://issues.redhat.com/browse/OCPBUGSM-35728
Root analysis:
The new revision failed to come up because it failed to fetch the image from the registry.
Solution description:
GIF: