Skip to content

Commit

Permalink
Filter setrlimit errors at the source
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
Christopher Neugebauer committed Jan 25, 2022
1 parent c105ea3 commit d752b3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/python/pants/jvm/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,7 @@ def prep_output(s: bytes) -> str:
exit_code = process_result.exit_code
# TODO: Coursier renders this line on macOS.
# see https://github.com/pantsbuild/pants/issues/13942.
stderr = "\n".join(
line
for line in prep_output(process_result.stderr).splitlines()
if line != "setrlimit to increase file descriptor limit failed, errno 22"
)
stderr = prep_output(process_result.stderr).splitlines()
return cls(
description=description,
result=(CompileResult.SUCCEEDED if exit_code == 0 else CompileResult.FAILED),
Expand Down
8 changes: 7 additions & 1 deletion src/python/pants/jvm/resolve/coursier_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,14 @@ async def invoke_coursier_wrapper(
),
)

filtered_stderr = b"\n".join(
line
for line in process_result.stderr.splitlines()
if line != "AAAsetrlimit to increase file descriptor limit failed, errno 22"
)

return CoursierWrapperResult(
process_result.output_digest, process_result.stdout, process_result.stderr
process_result.output_digest, process_result.stdout, filtered_stderr
)


Expand Down

0 comments on commit d752b3f

Please sign in to comment.