Project

General

Profile

Actions

Bug #11408

closed

Archives API list returns date with wrong format

Added by Janos Mattyasovszky about 7 years ago. Updated about 7 years ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
First impressions of Rudder
Effort required:
Priority:
99
Name check:
Fix check:
Regression:

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

Actions #1

Updated by Janos Mattyasovszky about 7 years 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".

Actions #2

Updated by François ARMAND about 7 years ago

  • Assignee set to François ARMAND
  • Target version set to 3.1.24
Actions #3

Updated by François ARMAND about 7 years ago

  • Status changed from New to In progress
Actions #4

Updated by François ARMAND about 7 years 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
Actions #5

Updated by Vincent MEMBRÉ about 7 years ago

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

Updated by François ARMAND about 7 years ago

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

Updated by Vincent MEMBRÉ about 7 years 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.

Actions

Also available in: Atom PDF