Skip to content

Fix: Skip error log when console link is disabled and absent#949

Merged
openshift-merge-bot[bot] merged 2 commits into
redhat-developer:masterfrom
nmirasch:GITOPS-7331
Sep 3, 2025
Merged

Fix: Skip error log when console link is disabled and absent#949
openshift-merge-bot[bot] merged 2 commits into
redhat-developer:masterfrom
nmirasch:GITOPS-7331

Conversation

@nmirasch

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind bug

What does this PR do / why we need it:
This PR removes misleading error logs that appeared when the environment variable DISABLE_DEFAULT_ARGOCD_CONSOLELINK was set to true and the ConsoleLink resource did not exist before.

Previously, the operator logged an error in this scenario even though the behavior was correct and no real issue occurred. This could confuse users and clutter the logs.
The operator now skips logging an error when the ConsoleLink is disabled and not present, ensuring logs only reflect actual problems.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes: https://issues.redhat.com/browse/GITOPS-7331

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

@openshift-ci openshift-ci Bot added the kind/bug Something isn't working label Aug 19, 2025
@openshift-ci

openshift-ci Bot commented Aug 19, 2025

Copy link
Copy Markdown

Hi @nmirasch. Thanks for your PR.

I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@jgwest

jgwest commented Aug 20, 2025

Copy link
Copy Markdown
Member

/ok-to-test

@nmirasch nmirasch force-pushed the GITOPS-7331 branch 2 times, most recently from 98c3fcb to 584797a Compare August 27, 2025 08:50
Signed-off-by: nmirasch <neus.miras@gmail.com>
Signed-off-by: nmirasch <neus.miras@gmail.com>
@svghadi

svghadi commented Sep 2, 2025

Copy link
Copy Markdown
Member

/lgtm

@anandf anandf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@svghadi

svghadi commented Sep 3, 2025

Copy link
Copy Markdown
Member

/approve

@openshift-ci

openshift-ci Bot commented Sep 3, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: svghadi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-ci openshift-ci Bot added the approved label Sep 3, 2025
@svghadi

svghadi commented Sep 3, 2025

Copy link
Copy Markdown
Member

/cherry-pick v1.18

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/cherry-pick v1.18

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-sigs/prow repository.

@svghadi

svghadi commented Sep 3, 2025

Copy link
Copy Markdown
Member

/cherry-pick v1.17

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/cherry-pick v1.17

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-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot Bot merged commit 9e522bf into redhat-developer:master Sep 3, 2025
16 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@svghadi: new pull request created: #954

Details

In response to this:

/cherry-pick v1.18

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-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@svghadi: #949 failed to apply on top of branch "v1.17":

Applying: Skip error log when console link is disabled and absent
Using index info to reconstruct a base tree...
M	controllers/argocd_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/argocd_controller_test.go
CONFLICT (content): Merge conflict in controllers/argocd_controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Skip error log when console link is disabled and absent

Details

In response to this:

/cherry-pick v1.17

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-sigs/prow repository.

nmirasch added a commit to nmirasch/gitops-operator that referenced this pull request Sep 4, 2025
…developer#949)

* Skip error log when console link is disabled and absent

Signed-off-by: nmirasch <neus.miras@gmail.com>

* Remove ConsoleLink when disabled, otherwise reconcile

Signed-off-by: nmirasch <neus.miras@gmail.com>

---------

Signed-off-by: nmirasch <neus.miras@gmail.com>
(cherry picked from commit 9e522bf)
nmirasch added a commit to nmirasch/gitops-operator that referenced this pull request Sep 5, 2025
…developer#949)

* Skip error log when console link is disabled and absent

Signed-off-by: nmirasch <neus.miras@gmail.com>

* Remove ConsoleLink when disabled, otherwise reconcile

Signed-off-by: nmirasch <neus.miras@gmail.com>

---------

Signed-off-by: nmirasch <neus.miras@gmail.com>
(cherry picked from commit 9e522bf)
openshift-merge-bot Bot pushed a commit that referenced this pull request Sep 8, 2025
…955)

* Skip error log when console link is disabled and absent



* Remove ConsoleLink when disabled, otherwise reconcile



---------


(cherry picked from commit 9e522bf)

Signed-off-by: nmirasch <neus.miras@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants