AlmaLinux / AlmaLinux/build-system

Multilib processing fails when a build contains two platforms

Đang mở
#512 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug build-node good first issue
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
32
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

As uncovered in [this build](https://build.almalinux.org/build/47501), multilib processing is failing due to the following error:

```
asyncpg.exceptions.CardinalityViolationError: more than one row returned by a subquery used as an expression
```

The query in question is:

```
subquery = (
select(models.BuildTask.id)
.where(
sqlalchemy.and_(
models.BuildTask.build_id == build_task.build_id,
models.BuildTask.index == build_task.index,
models.BuildTask.arch == "i686",
)
)
.scalar_subquery()
)
```

Since the build contains 2 platforms (and multilib applies to both), the subquery is returning 2 ids, one for Alma 8 and another one for Alma 9, while we expect to find exactly one.

I imagine that fixing the problem should be as simple as adding the condition ` models.BuildTask.platform_id == build_task.platform_id` to the subquery, to ensure that we limit the results to the i686 packages of the same platform we are processing at that time.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.