Project

General

Profile

Actions

Bug #25713

closed

ReportsExecution doesn't have timezone on all fields

Added by François ARMAND 2 months ago. Updated about 1 month ago.

Status:
Released
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:
Checked
Regression:
No

Description

We have two columns in ReportsExecution that are timestamp without timezone.

Actions #1

Updated by François ARMAND 2 months ago

  • Status changed from New to In progress
Actions #2

Updated by François ARMAND 2 months 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 2 months 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 #4

Updated by Anonymous about 2 months ago

  • Status changed from Pending technical review to Pending release
Actions #5

Updated by Alexis Mousset about 1 month ago

  • Fix check changed from To do to Checked
Actions #6

Updated by Vincent MEMBRÉ about 1 month ago

  • 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.

Actions

Also available in: Atom PDF