-
Notifications
You must be signed in to change notification settings - Fork 0
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
Missing documentation on using BUILDKITE_SPLITTER_IDENTIFIER when running multiple split steps #55
Comments
Hi @TJC Thanks for reaching out! Please try setting I think what happens with providing same identifier is that the test plan is cached after first time making request to our test plan API. In you second step, even you provide exclude/include pattern the filter won't be applied due to caching. Let us know how you go with using a different identifier. We will also keep improving the documentation! |
Yes, as I noted in the description, our fix did seem to be setting BUILDKITE_SPLITTER_IDENTIFIER. The issue I'm raising is that this isn't really documented. |
Thanks for providing us the feedback 💚 |
Is the buildkite splitter identifier truncated to a certain length in your systems? I ask because when I tried using Switching back to my original method, things work as expected again. |
Hey @TJC! Thanks for this additional feedback, and this also helps contextualise the other issue that you raised. Just for background information, we cache the plan on unique combinations of Changing the value of Alternatively, you could set up a second Test Suite to run your integration tests. That way, the data for your regular unit tests and the data for your integration tests are collected in different Test Suites, with different suite api tokens. This is what we do on our pipeline, as there are actually differences between the rspec setup and teardown for the two suites, and having the isolated data gave us better test splitting results. Does this sound like a use case for you as well? This would also solve the uniqueness issue :) Sorry about our lack of documentation about this, we're still trying to figure out what other people's use cases are like, and what is sensible to recommend during the set up process! |
Ah, thanks for explaining that aspect of the Step Id -- now I check the logs, it does rather look like the |
Hi @TJC We just released a new version 0.4.0 of the test splitter. One of the update in this new release is to set the If As part of the release we also updated the documentation of the identifier. Please let us know if there's anything unclear about the docs 😊 |
I tested this out, but it didn't seem to work for us when I removed the setting of Perhaps I should check what exactly you mean by "as long as we make |
@TJC no action required to enable that in the tool. To clarify, the Can I confirm that these two environment variables are present when the |
Looking at the "Environment" tab of the Buildkite steps involved, I see that in both steps, those values are present. |
Thanks for confirming. Are you using the docker-compose plugin? If so, are the environment variables being passed through to the docker container? |
We are using the docker-compose plugin. Looks like we needed to set |
Good to hear! I’ll add another clarification to the README.md to explicitly call out the environment in the wording. I’ll close this issue now, much appreciated for your input @TJC! |
Thanks for your help; glad I could help improve the docs. |
My use case:
I'm attempting to achieve this with the first step using
BUILDKITE_SPLITTER_TEST_FILE_EXCLUDE_PATTERN
to exclude the integration tests, and the second step usingBUILDKITE_SPLITTER_TEST_FILE_PATTERN
to only include the integration tests.However in practice, the second step only picks up specs that should have been part of the first step!
ie. running
BUILDKITE_SPLITTER_TEST_FILE_PATTERN=spec/foo/**/*_spec.rb test-splitter
results in running tests fromspec/bar
which were definitely not part of that pattern.It looks like our fix was to set
BUILDKITE_SPLITTER_IDENTIFIER
to a different unique value per step, however I note that this doesn't seem to be documented yet. Currently the documentation reads as follows:The text was updated successfully, but these errors were encountered: