fix(e2e): find controller in installation namespaces#2603
fix(e2e): find controller in installation namespaces#2603chmouel merged 1 commit intotektoncd:mainfrom
Conversation
E2E instrumentation was broken because it searched for the
controller in the test namespace (e.g., pac-e2e-ns-*), but
controllers actually run in installation namespaces
(pipelines-as-code or openshift-pipelines).
The fix iterates through info.InstallNamespaces to find the
controller, restoring the original behavior that searched across
all namespaces. Also fixed linter warning (interface{} to any).
Signed-off-by: Akshay Pant <akpant@redhat.com>
Assisted-by: Claude <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue in the end-to-end testing framework where the system failed to locate the controller for log collection, leading to broken instrumentation. The core change enables the test suite to correctly identify the controller by iterating through all potential installation namespaces, thereby restoring the reliability of E2E tests. A minor type declaration update was also included for code hygiene. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the collectGitHubAPICalls function to iterate through info.InstallNamespaces when attempting to retrieve controller logs, enhancing resilience by searching multiple namespaces until a controller is located. Additionally, it updates the parseAPICallLog function to use any instead of interface{} for map values, aligning with Go 1.18+ syntax. A potential bug was identified where the collectGitHubAPICalls function might incorrectly proceed if info.InstallNamespaces is empty, as the loop would be skipped and the error check would not catch the lack of a found controller.
📝 Description of the Change
E2E instrumentation was broken because it searched for the controller in the test namespace (e.g., pac-e2e-ns-*), but controllers actually run in installation namespaces (pipelines-as-code or openshift-pipelines).
The fix iterates through info.InstallNamespaces to find the controller, restoring the original behavior that searched across all namespaces. Also fixed linter warning (interface{} to any).
🔗 Linked GitHub Issue
N/A
🧪 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.