Project

General

Profile

Actions

Bug #25713

open

ReportsExecution doesn't have timezone on all fields

Added by François ARMAND 4 days ago. Updated 3 days ago.

Status:
Pending technical review
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
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.

Actions #1

Updated by François ARMAND 4 days ago

  • Status changed from New to In progress
Actions #2

Updated by François ARMAND 4 days ago

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.

Actions #3

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

Also available in: Atom PDF