Bug #25713
closed
ReportsExecution doesn't have timezone on all fields
Added by François ARMAND about 1 month ago.
Updated 13 days ago.
Category:
Web - Compliance & node report
Description
We have two columns in ReportsExecution that are timestamp without timezone.
- Status changed from New to In progress
So, these two fields are not used much:
insertiondate
is mapped to AgentRunWithoutCompliance.insertionDate
which is never read. It's only modified when the report is inserted
compliancecomputationdate
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.
- 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
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.8 and 8.2.1 which were released today.
Also available in: Atom
PDF