-
Notifications
You must be signed in to change notification settings - Fork 581
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
feat: Setup CI to run tests that require external resources #191
feat: Setup CI to run tests that require external resources #191
Conversation
This looks good to me. The jaeger-operator tests need to use minikube as they're testing a Kubernetes operator and thus need to be run in the context of a cluster. I think the approach you've taken here is fine for our needs. |
Thats great! The workflow status isn't getting updated. I think that it might be the result of some circleci settings Update:I believe that the pending workflow status is the result of the existing ci workflow being marked as required. This PR renames the old |
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.
Overall looks good, I like the approach. Minor cleanup on the bash script is needed.
Do you think it would be possible in the future to only have this run when the gocql or mongo instrumentation contain changes?
Thanks! EDIT |
@reggiemcdonald if you think implementing that kind of selectivity will be a large amount of work I'm in favor of merging this and having that work be a subsequent PR. I'll let you be the one to decide on how you want to split it up. |
I think I came up with a reasonable solution: Essentially, the makefile targets run a git diff against master and greps for folder names (e.g. gocql). I chose this because it's unknown how many commits a PR may have. So I chose to diff against master and run the integration tests if the module was modified when compared to master. This ensures that integration tests are run for each commit in a given PR that has a modification to the given module (as supposed to just the single commit that modified the module). Let me know if you like this change. Happy to revert the change or modify the approach 🙂 |
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.
LGTM. Thank you for the contribution!
My pleasure! You'll need to change the required ci check from integration to the other workflows since I dont have access to the repos circleci admin page. Instructions are here |
@lizthegrey it looks like I don't have access to the needed "branches" section of this repos settings. Is this something you could help with? Giving me access or updating the check that is? |
Affirm, I can flip this around. |
* Provide conformance tests for tracers The test harness may be used to ensure that a given tracer behaves according to the expectations set by the API. * Add `ToMatchError` matcher * Use DeepEqual to compare unknown types in matchers Unlike basic `==`/`!=`, `reflect.DeepEqual` can compare arbitrary types (e.g., `[]string` to `[]string`) * Use struct instead of string for test context key
PR to update CI for tests that use external resources
This is tested and working.
I would love to get some feedback on this approach as I'm quite new to setting up circleci.
Are there downsides to not using minikube as in the jaeger-operator repo?
Background
The current CI configuration cannot run tests that rely on any external resources such as databases. In last week's SIG, I was referred to the jaeger-operator for guidance on how to approach the CI changes. The jaeger-operator repo runs the integration tests using minikube and an ubuntu VM under multiple github workflows.
Implementation
This method borrows the idea of using workflows, however, it does not use kubernetes and minikube. Instead, each integration test (one for mongo, one for gocql) is run by a job in a new integration workflow in circleci. The jobs are run using a Makefile target that creates the docker containers needed to run the test (therefore not using any clusters).
.
Changes
.circleci/config.yml
updated to use workflows.circleci/config.yml
for the integration tests that use a matrix of Makefile targets to run the testsAdditional tests can be added by:
Makefile
to add a new target.circleci/config.yml
to include the new target in thetarget
matrixFixes: #160
\cc @nlehrer @danherr