Skip to content

test(e2e): add KinD workflow to run integration tests#670

Open
nicknikolakakis wants to merge 2 commits into
knative-extensions:mainfrom
nicknikolakakis:fix/496-kind-e2e
Open

test(e2e): add KinD workflow to run integration tests#670
nicknikolakakis wants to merge 2 commits into
knative-extensions:mainfrom
nicknikolakakis:fix/496-kind-e2e

Conversation

@nicknikolakakis
Copy link
Copy Markdown

@nicknikolakakis nicknikolakakis commented May 2, 2026

Proposed Changes

  • Seed third_party/eventing-latest/eventing-{crds,core}.yaml from the knative-nightly bucket so the update-nightlies job set up in knobots#402 can start producing daily PRs against this repo.
  • Add .github/workflows/kind-e2e.yaml that creates a KinD cluster, installs Knative Serving + Kourier and the seeded Eventing core, builds and deploys eventing-gitlab via ko, applies the existing samples/ fixtures, and runs go test -tags=integration ./test/....

The integration test added in #568 drives the GitLabSource receive adapter via simulated webhook POSTs but had no CI hook. This wires it up.

Notes for reviewers

  • The sample GitLabSource points at gitlab.example.com, so the controller cannot register a real webhook and the source will not become Ready. The workflow waits on the receive adapter Knative Service URL instead, which is the only condition the test actually depends on. This is documented inline in the workflow YAML.
  • Versions pinned in the matrix: KinD v0.31.0, K8s v1.34.3 (digest-pinned), Knative knative-v1.22.0. Eventing manifests come from the seeded third_party/eventing-latest/ so update-nightlies can roll them forward daily.
  • Open question on the issue: whether to follow this up with a real-GitLab-via-helm variant. Happy to do that as a separate PR if maintainers prefer.

Fixes #496

Release Note

NONE

PR knative-extensions#568 introduced an integration-tagged Go test that drives the
GitLabSource receive adapter via simulated webhook POSTs, but it had
no CI hook. This adds the missing pieces to run it on every push and
pull request:

  - Seed third_party/eventing-latest/eventing-{crds,core}.yaml from
    the knative-nightly bucket so the update-nightlies job set up in
    knative-extensions/knobots#402 can start producing daily PRs.

  - Add .github/workflows/kind-e2e.yaml that creates a KinD cluster,
    installs Knative Serving + Kourier and the seeded Eventing core,
    builds and deploys eventing-gitlab via ko, applies the existing
    samples/ fixtures, and runs go test -tags=integration ./test/...

The sample GitLabSource points at gitlab.example.com so the controller
cannot register a real webhook. Rather than waiting on the source to
become Ready, the workflow waits on the receive adapter Knative
Service URL, which is what the test actually depends on.

Fixes knative-extensions#496

Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
@knative-prow knative-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 2, 2026
@knative-prow knative-prow Bot requested review from aliok and creydr May 2, 2026 09:35
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 2, 2026

Welcome @nicknikolakakis! It looks like this is your first PR to knative-extensions/eventing-gitlab 🎉

@knative-prow knative-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 2, 2026
@nicknikolakakis nicknikolakakis marked this pull request as ready for review May 2, 2026 09:36
@knative-prow knative-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 2, 2026
@knative-prow knative-prow Bot requested a review from Cali0707 May 2, 2026 09:36
@dprotaso
Copy link
Copy Markdown
Contributor

dprotaso commented May 5, 2026

/assign @creydr

@dprotaso
Copy link
Copy Markdown
Contributor

dprotaso commented May 5, 2026

/ok-to-test

@knative-prow knative-prow Bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.93%. Comparing base (dc6cc3d) to head (bd687ed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #670   +/-   ##
=======================================
  Coverage   37.93%   37.93%           
=======================================
  Files          20       20           
  Lines         580      580           
=======================================
  Hits          220      220           
  Misses        347      347           
  Partials       13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The integration test runs `go test` on the GitHub runner, but the
GitLabSource receive adapter ksvc resolves to *.svc.cluster.local,
which the runner's host resolver cannot reach. Every webhook POST
failed with `lookup ...svc.cluster.local: server misbehaving`.

Forward the cluster-local Kourier listener (svc/kourier-internal:80
in kourier-system) to localhost in the workflow, and have the test
honor WEBHOOK_URL / WEBHOOK_HOST env overrides. The override path
preserves the original ksvc host as the Host header so Knative still
routes the request to the correct service.

Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 6, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nicknikolakakis
Once this PR has been reviewed and has the lgtm label, please ask for approval from creydr. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add KinD test verifying the source deploys and becomes ready

3 participants