-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EPIC] We should use a ReportOOI entity per Report, or update a Report in-place and traverse the history API #3729
Comments
If I understand correctly, only if the result changes between the two |
Questions:
|
Im looking at this in a different Light I think: An aggregate report is the result of the underlying reports being combined. We currently have the relation the wrong way round I think.. 1: This means, multiple recipe's and reporting jobs might write into the same report-OOI at different intervals. This would mean we are making more 'snapshots' of the data at those points. |
Parent report: Aggregate Organisation Report flowchart TD
A[Report Recipe]
B[Scheduler]
C[Octopoes]
D[Rocky Worker]
E[Bytes holds Report Data]
F(DNS Report for mispo.es)
G(Findings Report for mispo.es)
H(DNS Report for minvws.nl)
I(Findings Report for minvws.nl)
J[Aggregate Data]
K[Aggregate Report]
A -- create recipe OOI --> C
A -- schedule --> B
B --> D
D --> C
C -- Report OOI --> F
C -- Report OOI --> G
C -- Report OOI --> H
C -- Report OOI --> I
F --> E
G --> E
H --> E
I --> E
E --> J
J --> K
We can maybe use ReportData which is already an OOI. ReportData is the evidence and what we are comparing.
What really is updating is the data it generates, which means that we can also have an edited Report data. We can compare ReportData's or we can aggregate report datas, or we can show them separately in the case of an Concat report. report data matches template is what we see in a report. So what if we keep track of the data and also keep updating the OOIs I would remove an aggregate OOI so parent reports does not really exists, it is a way of displaying the underlying reports. |
@Rieven If we do this, we still need a field in the ReportRecipe to know what kind of report should be created. |
We already have those fields, we have the report types and the input oois or live set. |
@Rieven Besides that, I think the problem with removing the parent Report OOI entirely would be opening the aggregate report (on the history page and scheduled reports page). Where would you link to when clicking on the generated report? |
Possible future improvement. Store the various report-export-formats in bytes at runtime of the job instead of storing only the json. This would avoid concatting / producing these rich output formats at runtime once the user clicks on the html/pdf links.
|
TODO
First steps
Subsequent issues
Follow up issues:
Notes:
input_oois
field. Hence it is not guaranteed in this case that a recipe will keep updating a single AssetReport.To be discussed
Given some new idea/input on reporting, and especially given the fact that we want to re-use ReportOOIs as per the conclusion at the bottom of this ticket, some practical issues have arisen from the current data model. The parent-report vs. subreport dynamic is a bit strange in the new scenario because the parent-child relation if no longer one-to-many, but many-to-many. This is because I could collect the same dns-report on example.org in multiple parent reports. Also, would we have to re-use parent OOIs as well? This only makes sense if the parent points to (a list of) child reports.
Questions arise:
input_oois: list[str]
. How do we re-use these in the case of multiple oois? Or should this beinput_ooi: str
now? Then we need to wrap a multi-report in a different wayNotes frontend meeting:
@Rieven:
@Donnype:
Let's collect the affected features/pages and other aspects to refine.
First suggestion, perhaps ignore the input_oois being part of the natural key since this will become very unreadable:
Per Report, we now create a
ReportOOI
:This means that every run of a recipe, we add a new object to XTDB (and Bytes) that has its own history, which shows it as a seperate row in the current table overview.
Another option is to update a
ReportOOI
in-place, reducing the list but meaning we should query the history API more often. The question is if we should change the implementation to performPros and Cons
Pros
Cons
(@Donnype: When I try to model for XTDB, I first ask myself if it makes sense to save an entity over time in a regular relational database, which in the case of a Report I have to answer with "Yes". Older versions of reports are too important to hide in a historic version.)
Conclusion after discussion on 25-10-2024
After a vote we concluded that we will re-use the Report OOI. We expect XTDB 2.0 to be able to resolve any use-cases that pop up and use the history API to traverse any other queries/use-cases. Both @dekkers and @underdarknl think using the history for new versions of a Report is a more adequate representation of the actual situation. (@Donnype thinks creating new objects is a more adequate representation that would also save us from potentially not being able to handle more intricate queries across reports.)
The text was updated successfully, but these errors were encountered: