Skip to content

chore: Reenable BitbucketDC and move more tests to GHE#2497

Merged
chmouel merged 2 commits intotektoncd:mainfrom
chmouel:move-more-tests-to-ghe
Feb 23, 2026
Merged

chore: Reenable BitbucketDC and move more tests to GHE#2497
chmouel merged 2 commits intotektoncd:mainfrom
chmouel:move-more-tests-to-ghe

Conversation

@chmouel
Copy link
Copy Markdown
Member

@chmouel chmouel commented Feb 23, 2026

📝 Description of the Change

Reenable Btibucket DC since we have finally renewed license.

Move more tests to GHE, avoiding as much as possible GitHUb.com, and
using the local GHE instance instead.

👨🏻‍ 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

@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 focuses on enhancing the testing infrastructure by shifting several existing end-to-end tests from public GitHub to a GitHub Enterprise environment. This strategic move aims to improve test reliability and provide more control over the testing setup by utilizing a local GHE instance, thereby minimizing dependencies on external GitHub.com services for these specific test scenarios.

Highlights

  • Test Migration to GHE: Migrated several GitHub-related end-to-end tests to specifically target GitHub Enterprise (GHE) instances, reducing reliance on public GitHub.com.
  • Test Function Renaming: Renamed various test functions across multiple files to include a 'GHE' prefix, clearly indicating their new focus on GitHub Enterprise environments.
  • Environment Variable Updates: Updated environment variable references within the tests to use GHE-specific variables (e.g., TEST_GITHUB_SECOND_APPLICATION_ID, TEST_GITHUB_SECOND_API_URL, TEST_GITHUB_SECOND_EL_URL, TEST_GITHUB_SECOND_WEBHOOK_SECRET), ensuring correct interaction with the GHE instance.
  • GHE Flag Activation: Set the GHE: true flag in tgithub.PRTest structs for the migrated tests, enabling GHE-specific test logic.
  • Controller Log Assertion Update: Modified controller log assertions to target 'ghe-controller' instead of 'controller' for GHE-specific tests.
Changelog
  • test/github_pullrequest_oktotest_test.go
    • Renamed TestGithubPullRequestOkToTest to TestGithubGHEPullRequestOkToTest.
    • Set GHE: true in the tgithub.PRTest configuration.
    • Updated environment variable references for installation ID, API URL, EL URL, and webhook secret to their GHE-specific counterparts.
  • test/github_pullrequest_privaterepository_test.go
    • Renamed TestGithubPullRequestGitClone to TestGithubGHEPullRequestGitClonePublic.
    • Set GHE: true in the tgithub.PRTest configuration.
    • Changed the controller log assertion from 'controller' to 'ghe-controller'.
  • test/github_pullrequest_rerequest_test.go
    • Renamed TestGithubPullRerequest to TestGithubGHEPullRerequest.
    • Set GHE: true in the tgithub.PRTest configuration.
    • Updated environment variable references for installation ID, EL URL, webhook secret, and API URL to their GHE-specific counterparts.
  • test/github_pullrequest_test.go
    • Renamed TestGithubPullRequest to TestGithubGHEPullRequestBasic.
    • Set GHE: true in the tgithub.PRTest configuration for TestGithubGHEPullRequestBasic.
    • Renamed TestGithubCancelInProgressSettingFromConfigMapOnPR to TestGithubGHECancelInProgressSettingFromConfigMapOnPR.
    • Updated tgithub.Setup call to pass true for GHE in TestGithubGHECancelInProgressSettingFromConfigMapOnPR.
    • Set GHE: true in the tgithub.PRTest configuration for TestGithubGHECancelInProgressSettingFromConfigMapOnPR.
    • Renamed TestGithubCancelInProgressSettingFromConfigMapOnPush to TestGithubGHECancelInProgressSettingFromConfigMapOnPush.
    • Updated tgithub.Setup call to pass true for GHE in TestGithubGHECancelInProgressSettingFromConfigMapOnPush.
    • Set GHE: true in the tgithub.PRTest configuration for TestGithubGHECancelInProgressSettingFromConfigMapOnPush.
  • test/github_push_retest_test.go
    • Renamed TestGithubPullRequestRetestPullRequestNumberSubstitution to TestGithubGHEPullRequestRetestPullRequestNumberSubstitution.
    • Set GHE: true in the tgithub.PRTest configuration.
  • test/github_push_test.go
    • Renamed TestGithubPushRequestCELMatchOnTitle to TestGithubGHEPushRequestCELMatchOnTitle.
    • Set GHE: true in the tgithub.PRTest configuration.
Activity
  • No human activity detected on this pull request yet.
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.

@pipelines-as-code
Copy link
Copy Markdown

pipelines-as-code bot commented Feb 23, 2026

🔍 PR Lint Feedback

Note: This automated check helps ensure your PR follows our contribution guidelines.

⚠️ Items that need attention:

🎫 Jira reference

Add a Jira reference in the description using one of the following formats:

  • https://issues.redhat.com/browse/SRVKP-<number>

If no SRVKP ticket exists yet, link a GitHub issue instead (e.g., Fixes #123).
Minor housekeeping PRs without Jira coverage can skip this after confirming with reviewers.


🤖 AI attribution

The following commits lack an explicit AI attribution footer:

  • 3c832c3 chore: re-enable tests for Bitbucket Data Center
  • 2b7e358 feat: Move more tests to GHE

If no AI assistance was used for a commit, you can ignore this warning.
Otherwise add an Assisted-by: or Co-authored-by: footer referencing the AI used.


ℹ️ Next Steps

  • Review and address the items above
  • Push new commits to update this PR
  • This comment will be automatically updated when issues are resolved
🔧 Admin Tools (click to expand)

Automated Issue/Ticket Creation:

  • /issue-create - Generate a GitHub issue from this PR content using AI
  • /jira-create - Create a SRVKP Jira ticket from this PR content using AI

⚠️ Important: Always review and edit generated content before finalizing tickets/issues.
The AI-generated content should be used as a starting point and may need adjustments.

These commands are available to maintainers and will post the generated content as PR comments for review.

🤖 This feedback was generated automatically by the PR CI system

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

The pull request successfully migrates several existing GitHub tests to utilize a GitHub Enterprise (GHE) instance. This is achieved by renaming test functions to reflect their GHE context, setting the GHE: true flag in tgithub.PRTest configurations, and updating environment variable references to point to GHE-specific API endpoints and application IDs. Additionally, the change to use ghe-controller for log matching indicates a proper separation for GHE-related operations. The changes are consistent with the pull request's objective and enhance the test suite's coverage for GHE environments.

@chmouel chmouel force-pushed the move-more-tests-to-ghe branch from 747df39 to 8711f98 Compare February 23, 2026 09:45
@chmouel chmouel force-pushed the move-more-tests-to-ghe branch from 8711f98 to dcf065a Compare February 23, 2026 13:04
@chmouel chmouel changed the title feat: Move more tests to GHE chore: Reenable BitbucketDC and move more tests to GHE Feb 23, 2026
@chmouel chmouel marked this pull request as ready for review February 23, 2026 13:34
Copilot AI review requested due to automatic review settings February 23, 2026 13:34
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 updates the E2E test suite to (1) re-enable Bitbucket Data Center coverage now that infra is available again, and (2) shift more GitHub E2E coverage to the local GitHub Enterprise (GHE) “second controller” setup to reduce reliance on GitHub.com.

Changes:

  • Re-enable Bitbucket Data Center E2E tests by removing the temporary unconditional skips.
  • Migrate/rename multiple GitHub E2E tests to run against GHE (and adjust controller/log/configmap targeting accordingly).
  • Extend the E2E helper ChangeGlobalConfig to accept a configurable ConfigMap name (to support the second controller’s configmap).

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/pkg/configmap/configmap.go ChangeGlobalConfig now accepts a configMapName to support multiple controllers/configmaps.
test/github_scope_token_to_list_of_private_public_repos_test.go Updates helper call to pass explicit configmap name.
test/github_push_test.go Moves a push CEL-title test to GHE and simplifies it.
test/github_push_retest_test.go Converts retest PR-number substitution scenario to run on GHE.
test/github_pullrequest_test.go Renames/selects several PR tests for GHE and switches cancel-in-progress config to use ghe-configmap.
test/github_pullrequest_rerequest_test.go Moves rerequest test to GHE and swaps payload/env inputs for second controller.
test/github_pullrequest_privaterepository_test.go Renames test and switches controller log lookup to ghe-controller.
test/github_pullrequest_oktotest_test.go Moves ok-to-test test to GHE and swaps payload/env inputs for second controller.
test/gitea_test.go Updates helper call to pass explicit configmap name.
test/gitea_params_test.go Updates helper call to pass explicit configmap name.
test/gitea_access_control_test.go Updates helper call to pass explicit configmap name.
test/bitbucket_datacenter_push_test.go Re-enables Bitbucket DC push-path-change E2E test (removes unconditional skip).
test/bitbucket_datacenter_pull_request_test.go Re-enables Bitbucket DC PR E2E tests (removes unconditional skips).
test/bitbucket_datacenter_dynamic_variables_test.go Re-enables Bitbucket DC dynamic variables E2E test (removes unconditional skip).
Comments suppressed due to low confidence (2)

test/github_pullrequest_oktotest_test.go:58

  • github.Installation.ID is being populated from TEST_GITHUB_SECOND_APPLICATION_ID, but webhook payloads expect an installation ID (and the workflow already defines TEST_GITHUB_SECOND_REPO_INSTALLATION_ID separately). Using the application ID here will make the controller fail to generate an app token / resolve the installation. Please switch to the correct env var (installation ID) consistently for both the payload and the payload.Send header argument.
	installID, err := strconv.ParseInt(os.Getenv("TEST_GITHUB_SECOND_APPLICATION_ID"), 10, 64)
	assert.NilError(t, err)
	event := github.IssueCommentEvent{
		Comment: &github.IssueComment{
			Body: github.Ptr(`/ok-to-test`),
		},
		Installation: &github.Installation{
			ID: &installID,
		},

test/github_pullrequest_rerequest_test.go:60

  • This test uses TEST_GITHUB_SECOND_APPLICATION_ID to populate github.Installation.ID and to set the X-GitHub-Hook-Installation-Target-ID header (via payload.Send). Those are not the GitHub App application ID; they should be the app installation ID (the workflow provides TEST_GITHUB_SECOND_REPO_INSTALLATION_ID). Using the application ID will break webhook processing/token generation.
	installID, err := strconv.ParseInt(os.Getenv("TEST_GITHUB_SECOND_APPLICATION_ID"), 10, 64)
	assert.NilError(t, err)
	event := github.CheckRunEvent{
		Action: github.Ptr("rerequested"),
		Installation: &github.Installation{
			ID: &installID,
		},
		CheckRun: &github.CheckRun{

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

Move more tests to GHE, avoiding as much as possible GitHUb.com, and
using the local GHE instance instead.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@chmouel chmouel force-pushed the move-more-tests-to-ghe branch from dcf065a to 2b7e358 Compare February 23, 2026 13:52
@chmouel
Copy link
Copy Markdown
Member Author

chmouel commented Feb 23, 2026

there is still more work to do to completely erase github public, its sill the one that flakes as well compared to ghe
image

@chmouel chmouel merged commit 561d5e9 into tektoncd:main Feb 23, 2026
18 of 19 checks passed
@chmouel chmouel deleted the move-more-tests-to-ghe branch February 23, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants