Skip to content
Commit f8e87756 authored by Sven van Ashbrook's avatar Sven van Ashbrook Committed by Randy Döring
Browse files

Add a test to detect race condition with forked git repos

When installing packages from different directories of a forked
monorepo, a race condition may occur, where multiple git clients
are interacting in parallel with the same git repository.

Add a failing test to detect the race condition. Mark as xfail.
This test succeeds due to a problem with the poetry test framework.

Example pyproject.toml which triggers the problem:
```toml
[tool.poetry]
name = "some_other_repo"
version = "0.1.0"
description = ""
authors = ["Jonathan Rayner <jonathan.j.rayner@gmail.com>"]
packages = [{ include = "some_other_repo"}]

[tool.poetry.dependencies]
python = "^3.10 <3.13"

pkg_1 = {git = "git@github.com:JonathanRayner/some_monorepo.git", subdirectory = "pkg_1" }
pkg_2 = {git = "git@github.com:gustavgransbo/some_monorepo.git", subdirectory = "pkg_2", tag="v2"}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
```
Source: @gustavgransbo
https://github.com/orgs/python-poetry/discussions/9718#discussioncomment-10785589
parent 86222737
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment