cold-soccer-63228
05/25/2022, 5:46 PMException: Snapshot failed: Failed to digest inputs: Throw { val: Failed to watch filesystem for `/builds/gitlab-group-name/gitlab-project-name/path/to/BUILD`: Error { kind: Io(Os { code: 28, kind: StorageFull, message: "No space left on device" }), paths: [] }
On Linux, this can be caused by a `max_user_watches` setting that is lower than the number of files and directories in your repository (yours is set to 12288). Please see <https://www.pantsbuild.org/docs/troubleshooting#no-space-left-on-device-error-while-watching-files> for more information., python_traceback: "Traceback (no traceback):\n <pants native internals>\nException: Failed to watch filesystem for `/builds/gitlab-group-name/gitlab-project-name/path/to/BUILD`: Error { kind: Io(Os { code: 28, kind: StorageFull, message: \"No space left on device\" }), paths: [] }\n\nOn Linux, this can be caused by a `max_user_watches` setting that is lower than the number of files and directories in your repository (yours is set to 12288). Please see <https://www.pantsbuild.org/docs/troubleshooting#no-space-left-on-device-error-while-watching-files> for more information.", engine_traceback: ["digest_file"] }
witty-crayon-22786
05/25/2022, 5:51 PMcold-soccer-63228
05/25/2022, 5:53 PMecho fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
(I'm not sure if there's a way to tell our Gitlab pods to run this every time they start up)witty-crayon-22786
05/25/2022, 5:53 PMpantsd
and file watching… but that will be much slower if you run multiple commands in CI, as each will need to warm up--no-pantsd --no-watch-filesystem
cold-soccer-63228
05/25/2022, 5:56 PM./pants --no-pantsd --no-watch-filesystem test <path-to-directory>::
, there should be no performance hit, right?witty-crayon-22786
05/25/2022, 5:56 PMcold-soccer-63228
05/25/2022, 5:57 PMwitty-crayon-22786
05/25/2022, 5:58 PMpants.toml
as:
[GLOBAL]
# TODO: We disable file watching because these machines have a
# low `fs.inotify.max_user_watches` value. If we start
# running multiple commands, we should fix this.
pantsd = false
watch_filesystem = false
cold-soccer-63228
05/25/2022, 5:59 PMpants.ci.toml
, and paste that above snippet in there, and it should magically work, right?witty-crayon-22786
05/25/2022, 6:00 PMpants
to actually look at that file, but yes… one way to do that is by setting PANTS_CONFIG_FILES=pants.ci.toml
, which will add pants.ci.toml
to the --config-files
valuepants.toml
and pants.ci.toml
will be loaded, in that order)cold-soccer-63228
05/25/2022, 6:03 PMPANTS_CONFIG_FILES=pants.ci.toml ./pants test <path-to-directory>:::
witty-crayon-22786
05/25/2022, 6:04 PM./pants --config-files=pants.ci.toml test <path-to-directory>::
in that case. the env var is only useful if you want to ensure that multiple commands are coveredcold-soccer-63228
05/25/2022, 6:10 PMplain-belgium-20952
09/22/2023, 4:07 PMwitty-crayon-22786
09/22/2023, 4:19 PMwatch_filesystem
is disabled and you’re still seeing it, can you file an issue with some -ldebug
output?plain-belgium-20952
09/22/2023, 6:00 PM