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

Bug 1929577: Fix to avoid overriding of d/dc pod template container values #8201

Merged
merged 2 commits into from Feb 25, 2021

Conversation

divyanshiGupta
Copy link
Contributor

@divyanshiGupta divyanshiGupta commented Feb 19, 2021

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1929577
Fixes: https://issues.redhat.com/browse/ODC-5546

Root Cause:
Currently on editing d/dc using edit flow overrides the current resource containers completely with new resource containers https://github.com/openshift/console/pull/4517/files#diff-7fd530a4a1b4113f74f1e7e64beadbdb448845c1fad06d6a4d4824425583c2d6R53-R55 not taking in account the values that we dont add from UI like envFrom, imagePullPolicy etc thereby removing these values from the containers.

In container image flow when imagestream from internal registry is selected then its name is wrongly used as container name in the trigger annotation.

Solution:
Do not completely override the containers instead update only the values that we add from UI and leave other values as is.
Use correct container name in trigger annotation.

Gif:
Peek 2021-02-19 21-31

Peek 2021-02-22 14-53

Unit Test Coverage:
image

/kind bug

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 19, 2021
@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: This pull request references Bugzilla bug 1929577, 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
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1929577: Fix to avoid overriding of d/dc pod template container values

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.

@divyanshiGupta
Copy link
Contributor Author

/cc: @christianvogt

@spadgett
Copy link
Member

Hi, @divyanshiGupta. Does this also address the incorrect image.openshift.io/triggers annotation? (See the comments in the Bugzilla.)

@divyanshiGupta
Copy link
Contributor Author

@spadgett I created a separate bug https://issues.redhat.com/browse/ODC-5546 for that issue. But if needed I can add the fix in this PR only or raise a separate PR tomorrow.

@spadgett
Copy link
Member

@spadgett I created a separate bug https://issues.redhat.com/browse/ODC-5546 for that issue. But if needed I can add the fix in this PR only or raise a separate PR tomorrow.

OK, thanks. We'll probably want to backport both fixes. I'd recommend either fixing both in one PR or creating separate Bugzilla bugs.

@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: This pull request references Bugzilla bug 1929577, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1929577: Fix to avoid overriding of d/dc pod template container values

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: This pull request references Bugzilla bug 1929577, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1929577: Fix to avoid overriding of d/dc pod template container values

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.

@jerolimov
Copy link
Member

/assign @andrewballantyne

@spadgett
Copy link
Member

/cherry-pick release-4.7

@openshift-cherrypick-robot

@spadgett: once the present PR merges, I will cherry-pick it on top of release-4.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.7

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.

@spadgett
Copy link
Member

/cherry-pick release-4.6

@openshift-cherrypick-robot

@spadgett: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.6

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.

@rohitkrai03
Copy link
Contributor

/assign

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/approve

Code changes looks good to me. Tested locally for both env variables and trigger annotation issue. Works as expected.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2021
Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: divyanshiGupta, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 255395d into openshift:master Feb 25, 2021
@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: All pull requests linked via external trackers have merged:

Bugzilla bug 1929577 has been moved to the MODIFIED state.

In response to this:

Bug 1929577: Fix to avoid overriding of d/dc pod template container values

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.

@openshift-cherrypick-robot

@spadgett: new pull request created: #8248

In response to this:

/cherry-pick release-4.7

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.

@openshift-cherrypick-robot

@spadgett: #8201 failed to apply on top of branch "release-4.6":

Applying: Do not override/remove container values
Using index info to reconstruct a base tree...
M	frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts
M	frontend/packages/dev-console/src/components/import/advanced/DeploymentConfigSection.tsx
A	frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts
A	frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx
M	frontend/packages/dev-console/src/utils/resource-label-utils.ts
Falling back to patching base and 3-way merge...
Auto-merging frontend/packages/dev-console/src/utils/resource-label-utils.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/utils/resource-label-utils.ts
CONFLICT (modify/delete): frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx deleted in HEAD and modified in Do not override/remove container values. Version Do not override/remove container values of frontend/packages/dev-console/src/utils/__tests__/resource-label-utils.spec.tsx left in tree.
CONFLICT (modify/delete): frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts deleted in HEAD and modified in Do not override/remove container values. Version Do not override/remove container values of frontend/packages/dev-console/src/utils/__tests__/resource-label-utils-data.ts left in tree.
Auto-merging frontend/packages/dev-console/src/components/import/advanced/DeploymentConfigSection.tsx
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/components/import/advanced/DeploymentConfigSection.tsx
Auto-merging frontend/packages/dev-console/src/components/edit-application/edit-application-utils.ts
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Do not override/remove container values
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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.

@spadgett
Copy link
Member

@divyanshiGupta Looks like we will need to manually backport to 4.6.z unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console component/knative Related to knative-plugin kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants