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 1807868: fixes issue with knative service in edit flow #4528
Bug 1807868: fixes issue with knative service in edit flow #4528
Conversation
@invincibleJai: This pull request references Bugzilla bug 1807868, 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
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. |
@@ -5,7 +5,7 @@ export interface AppResources { | |||
service?: FirehoseResult<K8sResourceKind>; | |||
route?: FirehoseResult<K8sResourceKind>; | |||
buildConfig?: FirehoseResult<K8sResourceKind>; | |||
imageStream?: FirehoseResult<K8sResourceKind>; | |||
imageStream?: FirehoseResult; |
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.
imageStream?: FirehoseResult; | |
imageStream?: FirehoseResult<K8sResourceKind[]>; |
a81d2b1
to
d595519
Compare
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.
Tested all the scenario it working fine with this changes.
/lgtm
@@ -22,6 +22,7 @@ import { | |||
import { RegistryType } from '../../utils/imagestream-utils'; | |||
import { AppResources } from '../edit-application/edit-application-types'; | |||
import { DeployImageFormData, Resources } from './import-types'; | |||
import { getRandomChars } from '../pipelines/pipeline-resource/pipelineResource-utils'; |
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.
We need to be putting this function in a nicer location... import for knative pulling from pipelines is odd.
We can probably leave this for the sake for 4.4 getting done but we should log a refactor task to clean this up.
We could probably keep this to dev-console
though...
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 it in under dev-console/utils
in shared-submit-utils.ts
?
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, that's works
@@ -90,12 +95,18 @@ export const createOrUpdateImageStream = ( | |||
], | |||
}, | |||
}; | |||
|
|||
if (formData.resources === Resources.KnativeService && !_.isEmpty(originalImageStream)) { | |||
const OrignalImageStreamTag = _.find(originalImageStream?.status?.tags, ['tag', tag]); |
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.
const OrignalImageStreamTag = _.find(originalImageStream?.status?.tags, ['tag', tag]); | |
const orignalImageStreamTag = _.find(originalImageStream?.status?.tags, ['tag', tag]); |
Not sure why this got a capital... it's just a value like anything else.
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.
Updated
|
||
let generatedImageStreamName: string; |
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.
Oh yikes... the reason this is outside of the function is that you're sharing it between functions... this is not ideal in anyway. Bump this variable up a scope and then pass it through to the functions as needed.
Looks like the goal of this is to revalue name
... perhaps do it seamlessly at the top level by reworking the "formData" to include the repurposed name before it's passed down. This feels like a hack where one (I don't think) is needed.
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 was bad. have updated it. Thanks
37f80fe
to
2109843
Compare
b21fe93
to
71fb7d2
Compare
/kind bug |
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.
Tiny typo
@@ -402,11 +401,22 @@ export const createOrUpdateDeployImageResources = async ( | |||
// Do not run serverless call during the dry run. | |||
let imageStreamUrl: string = image?.dockerImageReference; | |||
if (registry === RegistryType.External) { | |||
let generatedImageStreamName: string = ''; | |||
if (imageStreamList && imageStreamList.length && verb === 'update') { | |||
const orignalImageStreamTag = _.find(originalImageStream?.status?.tags, [ |
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.
const orignalImageStreamTag = _.find(originalImageStream?.status?.tags, [ | |
const originalImageStreamTag = _.find(originalImageStream?.status?.tags, [ |
71fb7d2
to
d4005c3
Compare
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.
/lgtm
/approve
/cherry-pick release-4.4 |
@invincibleJai: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you. 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, invincibleJai, vikram-raj 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 |
/test analyze Bundle size flake. |
Well that's not a good test to see fail... Going to rerun... hopefully this is not one of those times this flake holds down the PR. /retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/cherrypick release-4.4 |
@christianvogt: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you. 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. |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
8 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@invincibleJai: All pull requests linked via external trackers have merged. Bugzilla bug 1807868 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. |
@invincibleJai: new pull request created: #4610 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. |
Fixes:
https://issues.redhat.com/browse/ODC-3069
Analysis / Root cause:
On editing knative Service from topology view with different image not creating new revision.
Solution Description:
In case of knative service edit generating new Image Stream with
name-randomChars
and update service with new image registry url and filtering image stream based on instance name.Screen shots / Gifs for design review:
Browser conformance: