Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19256

build.created field is updated when a build is promoted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: 3 - High
    • Resolution: Unresolved
    • Affects Version/s: 6.7.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Severity:
      High

      Description

      I recently noticed that the build.created field of a build is not reflecting the timestamp of the build creation time. It is instead reflecting the timestamp of the last modification of that build.

      I have an example here where several builds where created a while back for job named "pare-sandbox_master". I took a sample for build #22 of this job, that was the subject of several promotions over time.

      Below is the AQL query I am using to fetch information related to this particular build:

      $ cat ql1.json
      builds.find(
         {
            "name": {"$eq":"pare-sandbox_master"},
            "number": "22"
         }
      )
      .include("*", "promotion")
      

      And below is the result obtained from the above query:

      $ curl -ns -X POST https://..../artifactory/api/search/aql -T ql1.json | jq
      {
      "results": [
      {
      "build.created": "2019-05-22T16:10:05.217-04:00",
      "build.created_by": "pare",
      "build.name": "pare-sandbox_master",
      "build.number": "22",
      "build.promotions": [
      {
      "build.promotion.created": "2019-05-22T15:02:57.149-04:00",
      "build.promotion.created_by": "pare",
      "build.promotion.repo": "ql1-local",
      "build.promotion.status": "QL1"
      },
      {
      "build.promotion.created": "2019-05-22T15:08:24.031-04:00",
      "build.promotion.created_by": "pare",
      "build.promotion.repo": "ql2-local",
      "build.promotion.status": "QL2"
      },
      {
      "build.promotion.created": "2019-05-22T15:41:55.289-04:00",
      "build.promotion.created_by": "pare",
      "build.promotion.repo": "ql1-local",
      "build.promotion.status": "QL1"
      },
      {
      "build.promotion.created": "2019-05-22T15:40:10.673-04:00",
      "build.promotion.created_by": "pare",
      "build.promotion.repo": "ql1-local",
      "build.promotion.status": "QL1"
      },
      {
      "build.promotion.comment": "Promoted by Pipeline on 2019-03-28T10:45:16.785",
      "build.promotion.created": "2019-03-28T10:45:16.821-04:00",
      "build.promotion.created_by": "build-dev",
      "build.promotion.repo": "internal-snapshots",
      "build.promotion.status": "Internal Release"
      },
      {
      "build.promotion.created": "2019-05-22T16:10:05.187-04:00",
      "build.promotion.created_by": "pare",
      "build.promotion.repo": "ql1-local",
      "build.promotion.status": "QL1",
      "build.promotion.user": "pare"
      }
      ],
      "build.url": "https://jenkins.kaloom.io/job/pare-sandbox/job/master/22/"
      }
      ],
      "range": {
      "start_pos": 0,
      "end_pos": 1,
      "total": 1
      }
      }
      

      If you look carefully at the AQL output, you will notice that the build.created value corresponds to the timestamp of the latest promotion.

      Also, you will notice that this build was first promoted to "Internal Release" status on 2019-03-28T10:45:16.821-04:00, which logically means that the build was created at least before that.

      Is it fair to assume that the build.created value of this build should be some time around 2019-03-28T10:45:16.821-04:00 instead?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              prenaud76 Patrick Renaud
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-19256 -
                  SYNCHRONIZED
                  • Last Sync Date: