Actions
Bug #25713
openReportsExecution doesn't have timezone on all fields
Status:
Pending technical review
Priority:
N/A
Assignee:
Category:
Web - Compliance & node report
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
We have two columns in ReportsExecution that are timestamp without timezone.
Updated by François ARMAND 4 days ago
So, these two fields are not used much:
insertiondate
is mapped toAgentRunWithoutCompliance.insertionDate
which is never read. It's only modified when the report is insertedcompliancecomputationdate
is read but only to check if null or set.
ReportsExecutionRepositoryImpl.scala ... 79 s"""SELECT nodeid, date, nodeconfigid, insertionid, insertiondate FROM ReportsExecution where compliancecomputationdate is null""" ... 131 |( SELECT nodeid, max(date)) FROM ReportsExecution where compliancecomputationdate is not null group by nodeid)""".stripMargin) ... reportsSchema.sql ... CREATE INDEX reportsexecution_uncomputedrun_idx on ReportsExecution (compliancecomputationdate) where compliancecomputationdate IS NULL; ...
So we can alter the column type violently without changing behavior, not caring for existing data.
Updated by François ARMAND 3 days ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Clark ANDRIANASOLO
- Pull Request set to https://github.com/Normation/rudder/pull/5959
Actions