fix: watcher secret creation log and osc link#2637
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2637 +/- ##
==========================================
+ Coverage 58.73% 58.80% +0.07%
==========================================
Files 206 206
Lines 20296 20296
==========================================
+ Hits 11920 11935 +15
+ Misses 7611 7589 -22
- Partials 765 772 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the console UI initialization in UpdatePacConfig to use a factory method and fixes a logging bug in the reconciler where errors were logged even on success. Specifically, it ensures that createSecretForPipelineRun errors are only logged when an actual unhandled error occurs. Additionally, new tests were added to verify the console UI reset logic and the corrected logging behavior in the reconciler. I have no feedback to provide.
Avoid logging a secret-creation failure when no error occurred in the watcher reconciler. After the secret creation flow moved into the reconciler, the error log ran even on success, which produced noisy messages such as "failed to create secret ...: <nil>". Also fix console URL fallback handling when config resets from a custom console or Tekton dashboard back to the default cluster console. Instead of creating an empty OpenShift console client and ignoring route lookup failures, rebuild the console UI through the normal detection path so we either use the discovered OpenShift console URL or fall back cleanly. Add regression tests for both cases: - successful secret creation should not emit an error log - console reset should use the discovered OpenShift route when present - console reset should fall back cleanly when route lookup fails Tested on cluster
614de4a to
249d80f
Compare
📝 Description of the Change
Bug fixes for watcher secret creation logging and OpenShift console URL fallback handling.
Avoid logging a secret-creation failure when no error occurred in the watcher reconciler. After the secret creation flow moved into the reconciler, the error log ran even on success, which produced noisy messages such as "failed to create secret ...: ".
Also fix console URL fallback handling when config resets from a custom console or Tekton dashboard back to the default cluster console. Instead of creating an empty OpenShift console client and ignoring route lookup failures, rebuild the console UI through the normal detection path so we either use the discovered OpenShift console URL or fall back cleanly.
Add regression tests for both cases:
Tested on dogfooding cluster.
🔗 Linked GitHub Issue
Fixes #2636
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Claude noreply@anthropic.com
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.