← Back to issue list

Can't build the same charm in parallel

View original Github issue

Metadata

Project
charmcraft
Number
#164
Type
issue
State
closed
Author
knkski
Labels
Created
Updated
Closed

Current evaluation

Closed as a duplicate of issue #103 after build directory handling was updated. The parallel build race condition was reportedly addressed, but the issue was ultimately closed due to lack of follow-up information from the reporter.

Suggested action:

No scores available.

Issue body

If I'm building one charm on the same machine in different processes, one of the builds will fail due to each charmcraft build process using the same build directory, and removing it after it's done. The traceback that I get: ```python Traceback (most recent call last): File "/snap/charmcraft/97/lib/charmcraft/main.py", line 191, in main dispatcher.run() File "/snap/charmcraft/97/lib/charmcraft/main.py", line 121, in run command.run(self.parsed_args) File "/snap/charmcraft/97/lib/charmcraft/commands/build.py", line 390, in run builder.run() File "/snap/charmcraft/97/lib/charmcraft/commands/build.py", line 105, in run shutil.rmtree(str(self.buildpath)) File "/usr/lib/python3.8/shutil.py", line 715, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.8/shutil.py", line 652, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.8/shutil.py", line 652, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.8/shutil.py", line 652, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.8/shutil.py", line 672, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.8/shutil.py", line 670, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'namedtype.py' ``` Since `charmcraft build` results in a `*.charm` file dropped in the current directory, instead of a directory that users need to interact with, it seems like we could just use `tempfile.TemporaryDirectory` instead of basing the build directory on the charm name.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed as a duplicate of issue #103 after build directory handling was updated. The parallel build race condition was reportedly addressed, but the issue was ultimately closed due to lack of follow-up information from the reporter.
qwen/qwen3.6-35b-a3b Closed due to lack of response. Maintainers noted parallel build conflicts were addressed in issue #103. Without further use case clarification, the report was abandoned.
qwen/qwen3.6-35b-a3b Closed as duplicate and abandoned due to lack of information. The parallel build conflict was reportedly resolved via behavioral changes in issue #103. No direct fix applied.
qwen3.6-35b-a3b-mtp-q6 Closed due to lack of information. The parallel build conflict was superseded by issue #103, which updated build directory handling. No fix applied to this report.
qwen3.6-35b-a3b-mtp-q6 Closed for lack of author response. Maintainers marked it a duplicate of issue #103, noting parallel build conflicts were addressed elsewhere. No direct fix applied in this thread.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#391 LXD issue when build multiple charms in parallel craft-providers open LXD race condition causing parallel charm build failures; reopened by maintainer after resurfacing in modern Charmcraft
70%