Skip to content

[BUG] Collecting multiple products in one mantra collect is unstable #73

Description

@mhatzl

Describe the bug you've found, and why you think it is a bug

If more than one product are defined and both are collected in one mantra collect call, then collecting might fail if requirements are linked between products in a way that an earlier product (lower line number) in the config file depends on a requirement from a later product (higher line number).

This is because each product is currently collected in a separate transaction.
With relations between products, referencing data from later products leads to foreign key constraints and fails the collection.

To Reproduce

Steps to reproduce the behavior:

  1. Create two product entries in the mantra config file
  2. Create requirements definitions that create a reference between the two products by parent-child relationship
  3. Execute mantra collect

Version/Branch used

v0.8.x

Additional context

Collection should be split into

  1. Gather all data from products
  2. Aggregate all collected data over all products (Note: Requirement states must be resolved across product boundaries to correctly handle indirect states)

The database schema should be adapted to treat the collection nr as primary key, to automatically get a history.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-on-assigneeIssue/PR author or reviewer is awaiting response from assignee

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions