-
Notifications
You must be signed in to change notification settings - Fork 4
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
Go zbchaos worker #191
Conversation
4bef857
to
5a6645b
Compare
5a6645b
to
f188971
Compare
f188971
to
2d0abf2
Compare
489a888
to
bf245ce
Compare
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 🤷 |
I use also g1.19 locally 👍 |
Then I'd say it's ready for review :) |
There was a problem hiding this 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 :)
go-chaos/cmd/worker.go
Outdated
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"), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super Thanks 👍
This adds a new command
zbchaos worker
that starts a worker that listens tozbchaos
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.