When we submit new build X to some build system (Koji, MBS, ...) triggered by fedmsg event E, we will just add the Event to "events" table and build to "artifact_builds".
We will listen on message bus to find out whether the build X has finished successfully. If not, we will just update the build state in "artifact_builds" to failed.
If the build of X succeeds we will update the state to "done" and if there are other artifacts depending on this artifact, we will submit their builds to build system and create new rows in artifact_builds with event_id se to E and dep_of set to artifact X.
That way we can track what artifacts have been rebuilt as a result of particular event or particular artifact rebuid/update. We can also use this data to check for circular dependencies.
The schema is following:
How it could work:
That way we can track what artifacts have been rebuilt as a result of particular event or particular artifact rebuid/update. We can also use this data to check for circular dependencies.