Index data by package name
Rather than indexing by repository name, use the package name as the main key since it is the common concept that ties GitLab, OBS and upstream sources.
This simplifies some parts of the code as all the information is available from a single object instead of being spread across multiple data sources.
Error reporting is also largely simplified by having a single errors:
array on each package and have each error to be an object rather than a
single string: iterating over every error is thus much simpler and the
information about the error itself is now explicit rather than implicit
based on its surrounding context (for instance, whether it was located
on a branch, on the git project, or on the OBS package entry).
The YAML structure went from:
obs:
packages:
aalib:
entries:
apertis:v2020:target:
name: aalib
errors:
- "ooops"
projects:
pkg/target/aalib:
branches:
debian/buster:
name: debian/buster
errors:
- "eeeww"
errors:
- "aaargh"
sources:
debian/buster:
packages:
aalib: [...]
to:
packages:
aalib:
obs:
entries:
apertis:v2020:target: {...}
git:
branches:
debian/buster: {...}
upstreams:
debian/buster: [...]
errors:
- msg: "aaargh"
- msg: "eeeww"
branch: debian/buster
- msg: "ooops"
projects: [ "apertis:v2020:target" ]
Check the rendered version here: https://em.pages.apertis.org/dashboard/
You can also compare https://em.pages.apertis.org/dashboard/data.yaml against the current https://infrastructure.pages.apertis.org/dashboard/data.yaml