Skip to content

pants export-codegen fails with "Error copying bytes" when run across entire repo #21771

Open
@kdowney-talos

Description

@kdowney-talos

Discussed in #21713

This particular repo has a number of modules, but only one has code to generate: a repo with Protobuf files. However, if I widen it and run pants export-codegen :: for every module, I get what looks like a race condition related to copying a CSV file. I isolated it to just one module, serenity.risk -- it fails even if I just do pants export-codegen serenity.risk::

(1) It's unclear to me why this file would be in scope for code generation
(2) Regardless, the error itself seems like a red herring, an error changing file permissions

I tried further narrowing to sub-directories, etc., and it does seem to be this particular file.

The only notable thing about this file is its size, more than 500K:

-rw-r--r--  1 serenitydev serenitydev 574136 May 13  2024  DAR_prices_data.csv

Additional information:

  • Observed with pants 2.23.0 and 2.25.0.dev1
  • Running on Ubuntu jammy image
  • Inside Docker container, running in Docker Desktop 4.37 on MacOS 15.1.1
(.venv) serenitydev@adb319d55c1a:/workspaces/pms$ pants export-codegen ::
16:11:29.08 [INFO] Writing generated files to dist/codegen
16:11:29.09 [ERROR] 1 Exception encountered:

Engine traceback:
  in `export-codegen` goal

IntrinsicError: Error copying bytes from /home/serenitydev/.cache/pants/lmdb_store/immutable/files/2d/2d522219da490246fd3842165d3ebb7362314e218a510c16daeb09bc8d5fc5a6 to /workspaces/pms/dist/codegen/serenity.risk/experiments/dar-wilshire/DAR_prices_data.csv: Permission denied (os error 13)

Output of uname -a:

Linux c774de47c447 6.10.14-linuxkit #1 SMP Fri Nov 29 17:22:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Severity: very low, I can easily work around this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions