Multilib processing fails when a build contains two platforms
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Locate the query by searching for the shown BuildTask subquery, then inspect how multilib processing selects tasks for each platform. Reproduce the case using build 47501 or an equivalent build with two platforms; done means the subquery returns one matching task and multilib processing no longer raises CardinalityViolationError.
Written by the indexing model from the issue text.
Description
As uncovered in this build, 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.
- Dominant language
- No language data
- Stars
- 32
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AlmaLinux/build-system
-
albs-sign-file, albs-sign-node: support fetching GPG key passphrases from Google Secret Manager Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
AlmaLinux/build-system#549 · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
AlmaLinux/build-system#548 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
AlmaLinux/build-system#546 · 1 assignee ·
-
Investigate intermittent RPM sign failures — gpg-agent passphrase cache appears to expire mid-run Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
AlmaLinux/build-system#542 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
AlmaLinux/build-system#527 · 1 comment ·
All issues in AlmaLinux/build-system
Similar issues
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100