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

Gerrit Windows job fails due to command is tool long (> 8k) #176

Closed
meteorcloudy opened this issue Jan 29, 2018 · 15 comments
Closed

Gerrit Windows job fails due to command is tool long (> 8k) #176

meteorcloudy opened this issue Jan 29, 2018 · 15 comments
Assignees
Labels

Comments

@meteorcloudy
Copy link
Member

Windows has a command line length limit of 8K.
We do a bazel query to get all tests targets, then pass them to a single bazel test command, when the targets are too many, the job will fail.
See https://ci.bazel.build/blue/organizations/jenkins/gerrit/detail/gerrit/2274/pipeline

This happened before for bazel-tests: bazelbuild/bazel#3742

@meteorcloudy
Copy link
Member Author

//cc @iirina @laszlocsomor @philwo Does anyone know why do we have to do a bazel query before bazel test?

def filteredTests = bazelCommand(makeTestQuery(tests), false, true)

Looks like it suppose to filter unnecessary tests by test_filter_tags, but from the CI output, it just fetchs all tests specified by tests.

@philwo
Copy link
Member

philwo commented Jan 29, 2018

@meteorcloudy Not sure - I once heard that the reason was that we want to have the list of targets in the log. But I find that to be not very useful, because it is often just a huge wall of text anyway. I never used that.

Maybe remove it and see what happens? 😃

@laszlocsomor
Copy link
Contributor

@meteorcloudy : Yes, Damien told me some months ago that the reason for the queries is that in some files we use test patterns which we need to expand. But I'm with Philipp, let's remove it and see if anything breaks.

@meteorcloudy
Copy link
Member Author

Thanks for the feedback! I'll try to remove it.

@meteorcloudy
Copy link
Member Author

https://github.com/bazelbuild/bazel/blob/master/scripts/ci/bazel-tests.json#L63
This will probably break if we remove bazel query

@philwo
Copy link
Member

philwo commented Jan 30, 2018

@meteorcloudy Can we rewrite that somehow? Just give a list of hard-coded known-good targets? This expression is basically unmaintainable (and probably unmaintained ;)) anyway this way.

@aehlig Any idea on how to simplify the "tests that can be run on FreeBSD CI" expression?

@meteorcloudy
Copy link
Member Author

I found a "hacky" way to solve this without removing bazel query...
After getting a list of test targets, we can write test <test target> into a bazelrc file for each of the tests. Then we can workaround the command line limit by sort of using a "parameter file".

What do you think?

@meteorcloudy
Copy link
Member Author

Can we rewrite that somehow? Just give a list of hard-coded known-good targets? This expression is basically unmaintainable (and probably unmaintained ;)) anyway this way

I agree, it's best we can remove this complex test patterns.

@philwo
Copy link
Member

philwo commented Jan 30, 2018

After getting a list of test targets, we can write test <test target> into a bazelrc file

WTF, that works? 🤣

@laszlocsomor
Copy link
Contributor

Ough. That's gross. I like it.

@meteorcloudy
Copy link
Member Author

@philwo Yes... 😂

@meteorcloudy
Copy link
Member Author

So how should we proceed?
Simplify the test expression or use this nice dirty hack? @aehlig

@philwo
Copy link
Member

philwo commented Feb 1, 2018

Would favor getting rid of the "bazel query" step and simplify the test expression.

@philwo
Copy link
Member

philwo commented Feb 8, 2018

The new CI will (probably) no longer use "bazel query" to filter test targets, so we'll have to change the test configs to use simpler target specifications.

@philwo
Copy link
Member

philwo commented May 28, 2019

Obsolete.

@philwo philwo closed this as completed May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants