Bug #3159
closed
The database management displays an error when no database archive has ever been made
Added by Matthieu CERDA almost 12 years ago.
Updated almost 12 years ago.
Category:
Web - Maintenance
Description
While accessing the database management on a production Rudder machine (2.4.0rc2), I get this error:
Archived reports
Oldest archived report: There's been an error with the database, could not fetch the value
Newest archived report: There's been an error with the database, could not fetch the value
I am pretty sure that this "There's been an error with the database, could not fetch the value" should be "never" instead.
Note: The rudderarchivedsysevents table is here, but empty.
- Status changed from New to 8
- Assignee changed from François ARMAND to Vincent MEMBRÉ
Matthieu, you are right, and the problem lies in the signature of some method which does not into account that case:
def getOldestReports() : Box[Reports]
def getOldestArchivedReports() : Box[Reports]
def getNewestReports() : Box[Reports]
def getNewestArchivedReports() : Box[Reports]
All these methods should have a return type: Box[Option[Reports]], Full[None] meaning "there was no error, but we don't have any reports yet".
Is it not better to use a Box[Reports] and to match the Empty Case with "there was no error, but we don't have any reports yet" and the failure case with "There's been an error with the database, could not fetch the value" ?
- Status changed from 8 to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
- Status changed from Pending release to Released
Also available in: Atom
PDF