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 1853270: Update console config on change #445
Bug 1853270: Update console config on change #445
Conversation
@jhadvig: This pull request references Bugzilla bug 1853270, 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. |
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
pkg/console/operator/sync_v400.go
Outdated
@@ -200,12 +200,13 @@ func (co *consoleOperator) sync_v400(updatedOperatorConfig *operatorv1.Console, | |||
func (co *consoleOperator) SyncConsoleConfig(consoleConfig *configv1.Console, consoleURL string) (*configv1.Console, error) { | |||
oldURL := consoleConfig.Status.ConsoleURL | |||
updated := consoleConfig.DeepCopy() |
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 could move this inside the if
since we only need to copy if we're doing an update
pkg/console/operator/sync_v400.go
Outdated
updated := consoleConfig.DeepCopy() | ||
metrics.HandleConsoleURL(oldURL, consoleURL) | ||
if updated.Status.ConsoleURL != consoleURL { | ||
klog.V(4).Infof("updating console.config.openshift.io with url: %v", consoleURL) | ||
updated.Status.ConsoleURL = consoleURL | ||
return co.consoleConfigClient.UpdateStatus(co.ctx, updated, metav1.UpdateOptions{}) |
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 := consoleConfig.DeepCopy() | |
metrics.HandleConsoleURL(oldURL, consoleURL) | |
if updated.Status.ConsoleURL != consoleURL { | |
klog.V(4).Infof("updating console.config.openshift.io with url: %v", consoleURL) | |
updated.Status.ConsoleURL = consoleURL | |
return co.consoleConfigClient.UpdateStatus(co.ctx, updated, metav1.UpdateOptions{}) | |
metrics.HandleConsoleURL(oldURL, consoleURL) | |
if oldURL != consoleURL { | |
klog.V(4).Infof("updating console.config.openshift.io with url: %v", consoleURL) | |
updated := consoleConfig.DeepCopy() | |
updated.Status.ConsoleURL = consoleURL | |
return co.consoleConfigClient.UpdateStatus(co.ctx, updated, metav1.UpdateOptions{}) |
/hold |
@spadgett comment addressed. PTAL |
/retest |
/hold cancel |
/retest |
1 similar comment
/retest |
/test e2e-gcp |
/retest |
3 similar comments
/retest |
/retest |
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, spadgett 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 Please review the full test history for this PR and help us cut down flakes. |
6 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. |
@jhadvig: All pull requests linked via external trackers have merged: openshift/console-operator#445. Bugzilla bug 1853270 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. |
/cherry-pick release-4.5 |
@vrutkovs: new pull request created: #446 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. |
We should be updating the console config status only when the consoleURL change
/assign @spadgett