Skip to content
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

Go zbchaos worker #191

Merged
merged 7 commits into from
Oct 13, 2022
Merged

Go zbchaos worker #191

merged 7 commits into from
Oct 13, 2022

Conversation

lenaschoenburg
Copy link
Member

This adds a new command zbchaos worker that starts a worker that listens to zbchaos jobs from testbench and executes them. To execute, we don't spawn a new process and instead use corba to directly call the command with the provider arguments.

go-chaos/go.sum Outdated Show resolved Hide resolved
@lenaschoenburg
Copy link
Member Author

I had a bunch of problems trying to keep go.sum up to date with go.mod so I upgraded to go 1.19 too which solved the issue for me 🤷

@ChrisKujawa
Copy link
Member

I use also g1.19 locally 👍

@lenaschoenburg
Copy link
Member Author

Then I'd say it's ready for review :)

Copy link
Member

@ChrisKujawa ChrisKujawa left a comment

Choose a reason for hiding this comment

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

Awesome thanks for taking the initative @oleschoenburg
Great work and idea with running the worker as own command. I first had in mind to have a separate application or something which executes the worker, but this might be even better 👍

Please see my comment regarding the env vars. Lets fix this first, before merging :)

Comment on lines 55 to 58
ClientID: os.Getenv("TESTBENCH_CLIENT_ID"),
ClientSecret: os.Getenv("TESTBENCH_CLIENT_SECRET"),
Audience: strings.TrimSuffix(os.Getenv("TESTBENCH_ADDRESS"), ":443"),
AuthorizationServerURL: os.Getenv("TESTBENCH_AUTHORIZATION_SERVER_URL"),
Copy link
Member

Choose a reason for hiding this comment

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

❌ Would be great if we could leave testbench out here. Can you check whether the go client already supports env vars for the cloud client? Maybe this is not event necessary.

The testbench env vars can then be injected into the docker image for example

go-chaos/cmd/worker.go Show resolved Hide resolved
go-chaos/go.mod Show resolved Hide resolved
Copy link
Member

@ChrisKujawa ChrisKujawa left a comment

Choose a reason for hiding this comment

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

Super Thanks 👍

@lenaschoenburg lenaschoenburg merged commit 314505f into main Oct 13, 2022
@lenaschoenburg lenaschoenburg deleted the os-zbchaos-worker branch October 13, 2022 12:27
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