Skip to content

fix: Add target ns annotation to on-tag e2e pipelinerun#2495

Merged
theakshaypant merged 1 commit intotektoncd:mainfrom
chmouel:add-on-tag-add-target-namespace-annotation
Feb 23, 2026
Merged

fix: Add target ns annotation to on-tag e2e pipelinerun#2495
theakshaypant merged 1 commit intotektoncd:mainfrom
chmouel:add-on-tag-add-target-namespace-annotation

Conversation

@chmouel
Copy link
Copy Markdown
Member

@chmouel chmouel commented Feb 19, 2026

📝 Description of the Change

We missed it and this was causing all soft of issues when running the tests, like this error:

{"level":"info","ts":1771518055.214899,"caller":"wait/check.go:46","msg":"Check if we have the repository set as succeeded"}
{"level":"info","ts":1771518055.2227476,"caller":"wait/check.go:103","msg":"Success, number of status 2 has been matched"}
{"level":"info","ts":1771518055.2289314,"caller":"test/gitlab_merge_request_test.go:687","msg":"Changing Title on MergeRequest https://gitlab.pipelinesascode.com/pac/e2e-testing/-/merge_requests/184"}
    gitlab_merge_request_test.go:697: assertion failed: len(prs.Items) is not 2
{"level":"info","ts":1771518063.511838,"caller":"gitlab/setup.go:71","msg":"Closing PR 184"}
{"level":"info","ts":1771518064.5724115,"caller":"gitlab/setup.go:80","msg":"Deleting Ref pac-e2e-test-t9vms"}
--- FAIL: TestGitlabMergeRequestOnUpdateAtAndLabelChange (33.54s)

👨🏻‍ Linked Jira

🔗 Linked GitHub Issue

Fixes #

🚀 Type of Change

  • 🐛 Bug fix (fix:)
  • ✨ New feature (feat:)
  • 💥 Breaking change (feat!:, fix!:)
  • 📚 Documentation update (docs:)
  • ⚙️ Chore (chore:)
  • 💅 Refactor (refactor:)
  • 🔧 Enhancement (enhance:)
  • 📦 Dependency update (deps:)

🧪 Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

🤖 AI Assistance

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.

If you have used AI assistance, please provide the following details:

Which LLM was used?

  • GitHub Copilot
  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Cursor
  • Gemini (Google)
  • Other: ____________

Extent of AI Assistance:

  • Documentation and research only
  • Unit tests or E2E tests only
  • Code generation (parts of the code)
  • Full code generation (most of the PR)
  • PR description and comments
  • Commit message(s)

Important

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer to your commit message.
For example:

Co-authored-by: Gemini gemini@google.com
Co-authored-by: ChatGPT noreply@chatgpt.com
Co-authored-by: Claude noreply@anthropic.com
Co-authored-by: Cursor noreply@cursor.com
Co-authored-by: Copilot Copilot@users.noreply.github.com

**💡You can use the script ./hack/add-llm-coauthor.sh to automatically add
these co-author trailers to your commits.

✅ Submitter Checklist

  • 📝 My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • ♽ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • 📖 I have added or updated documentation for any user-facing changes.
  • 🧪 I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • 🔎 I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

Copilot AI review requested due to automatic review settings February 19, 2026 21:37
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @chmouel, 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 addresses a critical bug affecting end-to-end tests by introducing a missing annotation to a Tekton PipelineRun definition. The absence of this annotation led to test failures, and its inclusion ensures the proper execution and validation of the on-tag e2e pipelinerun.

Highlights

  • E2E Test Fix: Resolved an issue in end-to-end tests by adding the pipelinesascode.tekton.dev/target-namespace annotation to the pipelinerun-on-tag.yaml manifest, which was causing assertion failures.
Changelog
  • test/testdata/pipelinerun-on-tag.yaml
    • Added the pipelinesascode.tekton.dev/target-namespace annotation to the PipelineRun metadata.
Activity
  • The pull request description indicates that this is a bug fix (fix:) and involves end-to-end tests.
  • No specific review comments or progress updates are mentioned in the provided context.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a missing annotation in the end-to-end test file for tag-based pipeline runs. The pipelinesascode.tekton.dev/target-namespace annotation was absent from pipelinerun-on-tag.yaml, which was causing test failures when running tag-based GitOps tests.

Changes:

  • Added the target-namespace annotation to the pipelinerun-on-tag.yaml test file with the correct template syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a bug in an end-to-end test by adding the missing pipelinesascode.tekton.dev/target-namespace annotation to the pipelinerun-on-tag.yaml test data. This change is necessary to ensure the PipelineRun is created in the correct namespace during testing, resolving the assertion failures mentioned in the description. The implementation is straightforward and I have no further suggestions.

@chmouel chmouel force-pushed the add-on-tag-add-target-namespace-annotation branch from 900f841 to 1f0696b Compare February 19, 2026 21:46
We missed it and this was causing all soft of issues when running the
tests, like this error:

"test/gitlab_merge_request_test.go:687", "msg":"Changing Title on MergeRequest
https://gitlab.pipelinesascode.com/pac/e2e-testing/-/merge_requests/184"}
gitlab_merge_request_test.go:697: assertion failed: len(prs.Items) is not 2
--- FAIL: TestGitlabMergeRequestOnUpdateAtAndLabelChange (33.54s)

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@chmouel chmouel force-pushed the add-on-tag-add-target-namespace-annotation branch from 1f0696b to 119d17e Compare February 19, 2026 21:54
@theakshaypant theakshaypant merged commit 6069143 into tektoncd:main Feb 23, 2026
15 of 16 checks passed
@chmouel chmouel deleted the add-on-tag-add-target-namespace-annotation branch February 23, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants