Project

General

Profile

Bug #11408

Archives API list returns date with wrong format

Added by Janos Mattyasovszky 3 months ago. Updated about 2 months ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Target version (plugin):
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
First impressions of Rudder
Effort required:
Priority:
99

Description

The API seems to use some bad strftime in the "date" field, but this is definetly not correct this way:

# curl -s http://localhost:8080/rudder/api/archives/list/full | jq
{
  "groupArchives": [
    {
      "id": "2017-09-21_09-34-23.159",
      "date": "2017-09-264 at 09:34:23",
      "commiter": "rudder",
      "gitCommit": "e4d08429e853cca9f6c767cb877c3a7b78a70788" 
    },
    {
      "id": "2017-07-04_11-34-56.483",
      "date": "2017-07-185 at 11:34:56",
      "commiter": "rudder",
      "gitCommit": "19faa35150c2cf29271822e6d082127727acedc1" 
    },
    {
      "id": "2017-05-05_10-31-33.222",
      "date": "2017-05-125 at 10:31:33",
      "commiter": "rudder",
      "gitCommit": "d7e82d408f720033db345f72f96917bd10e4c157" 
    },
    {
      "id": "2017-04-05_17-30-39.835",
      "date": "2017-04-95 at 17:30:39",
      "commiter": "rudder",
      "gitCommit": "2a05103c08d623542ab5c1e6e6d540feaf144020" 
    }
  ]
}

Found in rudder-server-root-4.1.5.release-1.SLES.11

Associated revisions

Revision 138a70d9
Added by François ARMAND 3 months ago

Fixes #11408: Archives API list returns badly formatted date

History

#1 Updated by Janos Mattyasovszky 3 months ago

The problem is probably YYYY-MM-DD in the code at:

https://github.com/Normation/rudder/blob/a205f247d0185d3b68ec1ba3aeddae1911c79baf/rudder-web/src/main/scala/com/normation/rudder/web/rest/RestArchiving.scala#L175

                        val datetime = "%s at %s".format(date.toString("YYYY-MM-DD"), date.toString("HH:mm:ss"))

That should probably be "-dd".

#2 Updated by François ARMAND 3 months ago

  • Assignee set to François ARMAND
  • Target version set to 3.1.24

#3 Updated by François ARMAND 3 months ago

  • Status changed from New to In progress

#4 Updated by François ARMAND 3 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1743

#5 Updated by Vincent MEMBRÉ 3 months ago

  • Subject changed from Archives API list returns badly formatted date to Archives API list returns date with wrong format

#6 Updated by François ARMAND 3 months ago

  • Status changed from Pending technical review to Pending release

#7 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released
  • Priority changed from 100 to 99

This bug has been fixed in Rudder 3.1.24, 4.1.8 and 4.2.1 which were released today.

Also available in: Atom PDF