Skip to content

[gitpod-network-check] Introduce lambda and local runners #18

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

geropl
Copy link
Member

@geropl geropl commented Apr 2, 2025

Description

This is a PR to cleanup the grown code base a little, and extract the tests we run, and the EC2TestRunner we have right now.

Goals:

  • add ability to add an LambdaTestRunner
  • add a LocalTestRunner (just issues the request, helpful if deployed with genie for instance 💡

Related Issue(s)

Fixes CLC-1285

How to test

  • try gitpod-network-check --runner=ec2
  • try gitpod-network-check --runner=lamda

Documentation

/hold

geropl added 8 commits March 27, 2025 14:45
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
@geropl geropl changed the title [WIP][gitpod-network-check] Introduce lambda and local runners [gitpod-network-check] Introduce lambda and local runners Apr 8, 2025
@geropl geropl marked this pull request as ready for review April 8, 2025 07:32
@geropl geropl requested review from a team as code owners April 8, 2025 07:32
@geropl
Copy link
Member Author

geropl commented Apr 8, 2025

@nandajavarma or @kylos101 Would be awesome if you could do a review here. Basically follow the test steps above.

@kylos101
Copy link
Contributor

kylos101 commented Apr 8, 2025

@geropl how do we manually do cleanup, like if the ec2 or lambda runner partially install, but fail or just need to be deleted manually after being run?

I checked to see if there's a cleanup command, but get an error when using --help:

gitpod /workspace/enterprise-deployment-toolkit/gitpod-network-check (gpl/refactor-checks-runner) $ go run . --help
# github.com/gitpod-io/enterprise-deployment-toolkit/gitpod-network-check/cmd
cmd/checks.go:30:50: Flags.Mode undefined (type struct{SelectedTestsets []string; RunnerTypeStr string; RunnerType runner.RunnerType} has no field or method Mode)
cmd/cleanup.go:20:55: Flags.Mode undefined (type struct{SelectedTestsets []string; RunnerTypeStr string; RunnerType runner.RunnerType} has no field or method Mode)

At the moment, the build is failing (a couple old go files are broke, cleanup.go and checks.go):

go install github.com/goreleaser/goreleaser@latest

gitpod /workspace/enterprise-deployment-toolkit (gpl/refactor-checks-runner) $ goreleaser build --clean --skip=validate
  • starting build...
  • loading                                          path=.goreleaser.yaml
  • skipping validate...
  • loading environment variables
  • getting and validating git state
    • git state                                      commit=772d51a280f7e1315979c9def271499c3eddbd3d branch=gpl/refactor-checks-runner current_tag=v0.2.10 previous_tag=v0.2.9 dirty=true
    • pipe skipped                                   reason=validation is disabled
  • parsing tag
  • setting defaults
  • checking distribution directory
    • cleaning dist
  • setting up metadata
  • storing release metadata
    • writing                                        file=dist/metadata.json
  • loading go mod information
    • pipe skipped                                   reason=not a go module
  • build prerequisites
  • writing effective config file
    • writing                                        config=dist/config.yaml
  • building binaries
    • building                                       binary=dist/enterprise-deployment-toolkit_darwin_arm64/gitpod-network-check
    • building                                       binary=dist/enterprise-deployment-toolkit_linux_arm64/gitpod-network-check
    • building                                       binary=dist/enterprise-deployment-toolkit_linux_amd64_v1/gitpod-network-check
    • building                                       binary=dist/enterprise-deployment-toolkit_windows_amd64_v1/gitpod-network-check.exe
    • building                                       binary=dist/enterprise-deployment-toolkit_darwin_amd64_v1/gitpod-network-check
    • took: 50s
  ⨯ build failed after 49s                   error=failed to build for linux_arm64: exit status 1: # github.com/gitpod-io/enterprise-deployment-toolkit/gitpod-network-check/cmd
cmd/checks.go:30:50: Flags.Mode undefined (type struct{SelectedTestsets []string; RunnerTypeStr string; RunnerType runner.RunnerType} has no field or method Mode)
cmd/cleanup.go:20:55: Flags.Mode undefined (type struct{SelectedTestsets []string; RunnerTypeStr string; RunnerType runner.RunnerType} has no field or method Mode)

I'll test in catfood (private) and demo (public) next, and then review code.

geropl added 2 commits April 8, 2025 09:22
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
@geropl geropl force-pushed the gpl/refactor-checks-runner branch from f920be1 to e819571 Compare April 8, 2025 09:29
Tool: gitpod/catfood.gitpod.cloud
@geropl geropl force-pushed the gpl/refactor-checks-runner branch from e819571 to 225cb7b Compare April 8, 2025 09:32
@geropl
Copy link
Member Author

geropl commented Apr 8, 2025

Build fix, and has CI workflow now.

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.

2 participants