Skip to content

test(framework): support running universal tests on remote host #13301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 14, 2025

Conversation

jijiechen
Copy link
Member

@jijiechen jijiechen commented Apr 2, 2025

Motivation

Support running universal tests on remote hosts

Implementation information

  • support establishing SSH tunnels to remote hosts before executing commands
  • introduce a new DockerBackend to encapsulate calls to docker commands: the local backend executes directly, the new remote backend executes commands via an SSH tunnel
  • support forwarding local port to remote host within the SSH tunnel so kumactl is able to access the CP ports exposed from the container running on the remote host

Copy link
Contributor

github-actions bot commented Apr 2, 2025

Reviewer Checklist

🔍 Each of these sections need to be checked by the reviewer of the PR 🔍:
If something doesn't apply please check the box and add a justification if the reason is non obvious.

  • Is the PR title satisfactory? Is this part of a larger feature and should be grouped using > Changelog?
  • PR description is clear and complete. It Links to relevant issue as well as docs and UI issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as an image registry)
  • IPv6 is taken into account (.e.g: no string concatenation of host port)
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
  • Does this contain a change that needs to be notified to users? In this case, UPGRADE.md should be updated.
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)

@jijiechen jijiechen changed the title Support running universal tests on VM hosts Support running universal tests on remote host Apr 3, 2025
Signed-off-by: Jay Chen <[email protected]>
@jijiechen jijiechen marked this pull request as ready for review April 7, 2025 06:47
@jijiechen jijiechen requested a review from a team as a code owner April 7, 2025 06:47
@jijiechen jijiechen requested review from slonka and Automaat April 7, 2025 06:47
@jijiechen jijiechen force-pushed the universal-vm-cluster branch from e6f1987 to 7223167 Compare April 7, 2025 07:03
@jijiechen jijiechen changed the title Support running universal tests on remote host test(framework): support running universal tests on remote host Apr 7, 2025
@jijiechen jijiechen added the ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) label Apr 8, 2025
Copy link
Contributor

@slonka slonka left a comment

Choose a reason for hiding this comment

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

There is a lot of utility code that I'm a bit surprise has not been implemented anywhere else. In general I can't find anything obviously wrong anywhere. Just one Q about the pipes.

@jijiechen
Copy link
Member Author

A lot of thanks to your reviewing! @slonka

There is a lot of utility code that I'm a bit surprise has not been implemented anywhere else.

Agreed, and this is the same feeling that @lahabana had.

I expected there should be some existing SSH tunneling implementations at least. Well, there are such implementations, but those are either out-of-date or very small projects, I could not tell how well they are maintained (or even if they are actually maintained.)

Some example projects are:

The other parts of the RemoteDockendBackend mostly ported from our existing docker commands (which are powered by the terratest library). They are not complicated.

@jijiechen jijiechen requested a review from slonka April 9, 2025 08:47
@jijiechen jijiechen force-pushed the universal-vm-cluster branch from 3472399 to 1177905 Compare April 11, 2025 07:19
Copy link
Contributor

@slonka slonka left a comment

Choose a reason for hiding this comment

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

I don't see anything obviously wrong here, just the pipe thing that Jay explained.

@jijiechen jijiechen merged commit ce1035f into master Apr 14, 2025
25 checks passed
@jijiechen jijiechen deleted the universal-vm-cluster branch April 14, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants