Skip to content

WIP: Add tcp-echo test analysis and half-close connection work#2502

Closed
evanwang9x wants to merge 1 commit into
skupperproject:mainfrom
evanwang9x:feature/tcp-echo-analysis
Closed

WIP: Add tcp-echo test analysis and half-close connection work#2502
evanwang9x wants to merge 1 commit into
skupperproject:mainfrom
evanwang9x:feature/tcp-echo-analysis

Conversation

@evanwang9x

@evanwang9x evanwang9x commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

WIP

Summary by CodeRabbit

Release Notes

  • New Features

    • Added TCP Echo end-to-end test scenario validating cross-site connectivity.
  • Tests

    • TCP Echo test now runs in CI pipeline.
    • Enhanced test infrastructure with improved namespace handling and kubeconfig configuration.
  • Bug Fixes

    • Streamlined container image loading for test environments.
    • Improved timestamp format consistency in container metadata.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 040da2c5-3beb-4fd4-b732-f2ead4582aa8

📥 Commits

Reviewing files that changed from the base of the PR and between 429fcf4 and 63ed07f.

📒 Files selected for processing (17)
  • Makefile
  • scripts/kind-dev-cluster
  • tests/Makefile
  • tests/e2e/collections/ansible_collections/e2e/tests/roles/run_netcat/tasks/main.yml
  • tests/e2e/scenarios/tcp-echo/README.md
  • tests/e2e/scenarios/tcp-echo/inventory/group_vars/all.yml
  • tests/e2e/scenarios/tcp-echo/inventory/host_vars/east.yml
  • tests/e2e/scenarios/tcp-echo/inventory/host_vars/west.yml
  • tests/e2e/scenarios/tcp-echo/inventory/hosts.yml
  • tests/e2e/scenarios/tcp-echo/resources/east/backend.yml
  • tests/e2e/scenarios/tcp-echo/resources/east/connector.yml
  • tests/e2e/scenarios/tcp-echo/resources/east/site.yml
  • tests/e2e/scenarios/tcp-echo/resources/west/listener.yml
  • tests/e2e/scenarios/tcp-echo/resources/west/site.yml
  • tests/e2e/scenarios/tcp-echo/skupper-sites.yml
  • tests/e2e/scenarios/tcp-echo/test.yml
  • tests/vars.yml

📝 Walkthrough

Walkthrough

Adds a new tcp-echo e2e scenario that tests TCP half-closed connections across two Skupper sites ("west" and "east"). Includes Kubernetes resource manifests, Ansible inventory, a run_netcat role, and a full test playbook. Also fixes UTC timestamp format in SHARED_IMAGE_LABELS, removes SKUPPER_ROUTER_IMAGE from kind image loading, and makes the default kubeconfig path more portable.

Changes

tcp-echo e2e scenario and infra fixes

Layer / File(s) Summary
Infra: UTC timestamp, kind image list, kubeconfig path
Makefile, scripts/kind-dev-cluster, tests/vars.yml
SHARED_IMAGE_LABELS switched from date --iso-8601=seconds to date -u +'%Y-%m-%dT%H:%M:%SZ'; SKUPPER_ROUTER_IMAGE removed from kind docker/podman image load loops; default kubeconfig path changed from /home/{{ ansible_user }}/.kube/config to ~/.kube/config.
Skupper K8s resource manifests (west + east)
tests/e2e/scenarios/tcp-echo/resources/east/..., tests/e2e/scenarios/tcp-echo/resources/west/...
East gets a Site, Deployment (tcp-go-echo backend on port 80), and Connector; west gets a Site with linkAccess: default and a Listener on port 9090 with routingKey: tcp-go-echo.
Ansible inventory for tcp-echo scenario
tests/e2e/scenarios/tcp-echo/inventory/hosts.yml, tests/e2e/scenarios/tcp-echo/inventory/group_vars/all.yml, tests/e2e/scenarios/tcp-echo/inventory/host_vars/east.yml, tests/e2e/scenarios/tcp-echo/inventory/host_vars/west.yml
Defines west and east hosts; group vars set local connection, namespace prefix/label, and disabled debug; host vars set kubeconfig paths, namespace names, and west curl-test parameters.
run_netcat Ansible role
tests/e2e/collections/ansible_collections/e2e/tests/roles/run_netcat/tasks/main.yml
New role computes namespace, creates a busybox netcat Pod, polls until ready, executes an nc command piping payload.txt to tcp-go-echo:9090 (half-close pattern), polls until success, and debugs stdout.
tcp-echo playbook, helper, CI registration, README
tests/e2e/scenarios/tcp-echo/test.yml, tests/e2e/scenarios/tcp-echo/skupper-sites.yml, tests/Makefile, tests/e2e/scenarios/tcp-echo/README.md
test.yml orchestrates env setup, site provisioning on both hosts, token issuance from west to east, netcat connectivity test, and namespace teardown; skupper-sites.yml is a reusable helper for applying site resources; tcp-echo is added to TESTS_CI; LC_ALL=C added to TEST_PREFIX generation; README documents the scenario.

Sequence Diagram

sequenceDiagram
  participant CI as CI / make test
  participant Ansible as test.yml
  participant West as west (Skupper site)
  participant East as east (Skupper site)
  participant NetcatPod as netcat Pod (busybox)

  CI->>Ansible: ansible-playbook test.yml
  Ansible->>West: apply west Site + Listener manifests
  Ansible->>East: apply east Site + Deployment + Connector manifests
  Ansible->>West: skupper.v2.token → issue access token
  West-->>Ansible: token resource YAML
  Ansible->>East: skupper.v2.resource (apply token from west)
  Note over West,East: Skupper link established
  Ansible->>West: run_netcat role → create netcat Pod
  West->>NetcatPod: kubectl exec nc payload.txt → tcp-go-echo:9090
  NetcatPod-->>West: echo response
  West-->>Ansible: netcat_result.stdout
  Ansible->>Ansible: always: delete namespaces (label e2e.id=...)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant