Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-4014

Setting tag expiration through the API does not show in the UI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Minor
    • None
    • quay-v3.7.2
    • quay
    • False
    • None
    • False
    • Quay Enterprise
    • 0

    Description

      When a tag expiration is set through the API via the {{ PUT v1/repository/

      {NAMESPACE}

      /

      {REPOSITORY}

      /tag/

      {TAG-NAME}

      }}, it is not shown in the UI regardless of the number of refreshes.

      Example:

      # curl -X PUT -H "Authorization: Bearer fU2EGh..." -H "Content-type: application/json" -d '{"manifest_digest":"sha256:69d5b6eaa08fab7c9ab155246da4a176d7fbf7360680ff7a7663dc24ab005b1c", "expiration": 1656671163}' https://quay.skynet/api/v1/repository/ibazulic/label-test/tag/latest
      "Updated"
      

      Logs show that the tag expiration has been updated:

      gunicorn-web stdout | 2022-06-28 10:26:53,100 [226] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`repository_id`, `t1`.`digest`, `t1`.`media_type_id`, `t1`.`manifest_bytes`, `t1`.`config_media_type`, `t1`.`layers_compressed_size` FROM `manifest` AS `t1` INNER JOIN `tag` AS `t2` ON (`t2`.`manifest_id` = `t1`.`id`) WHERE ((((`t1`.`repository_id` = %s) AND (`t1`.`digest` = %s)) AND ((`t2`.`lifetime_end_ms` IS %s) OR (`t2`.`lifetime_end_ms` > %s))) AND (`t2`.`hidden` = %s)) LIMIT %s OFFSET %s', [3, 'sha256:0368163e648ee0d4b7ff0e03c68ba4edae0462ae20c1183c9830cc33d552daee', None, 1656412013099, False, 1, 0])
      gunicorn-web stdout | 2022-06-28 10:26:53,100 [226] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`name`, `t1`.`repository_id`, `t1`.`manifest_id`, `t1`.`lifetime_start_ms`, `t1`.`lifetime_end_ms`, `t1`.`hidden`, `t1`.`reversion`, `t1`.`tag_kind_id`, `t1`.`linked_tag_id` FROM `tag` AS `t1` WHERE ((`t1`.`manifest_id` = %s) AND ((`t1`.`lifetime_end_ms` IS %s) OR (`t1`.`lifetime_end_ms` >= %s))) LIMIT %s OFFSET %s', [2, None, 1656412313100, 1, 0])
      gunicorn-web stdout | 2022-06-28 10:26:53,101 [226] [DEBUG] [peewee] ("SELECT `t1`.`id`, `t1`.`uuid`, `t1`.`key`, `t1`.`value`, `t1`.`media_type_id`, `t1`.`source_type_id`, `t2`.`id`, `t2`.`name` FROM `label` AS `t1` INNER JOIN `mediatype` AS `t2` ON (`t1`.`media_type_id` = `t2`.`id`) INNER JOIN `labelsourcetype` AS `t3` ON (`t1`.`source_type_id` = `t3`.`id`) INNER JOIN `manifestlabel` AS `t4` ON (`t4`.`label_id` = `t1`.`id`) WHERE ((`t4`.`manifest_id` = %s) AND (`t1`.`key` LIKE %s ESCAPE '!'))", [2, 'quay%'])
      gunicorn-web stdout | 2022-06-28 10:26:53,102 [226] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`repository_id`, `t1`.`digest`, `t1`.`media_type_id`, `t1`.`manifest_bytes`, `t1`.`config_media_type`, `t1`.`layers_compressed_size`, `t2`.`id`, `t2`.`name` FROM `manifest` AS `t1` INNER JOIN `mediatype` AS `t2` ON (`t1`.`media_type_id` = `t2`.`id`) WHERE (`t1`.`id` = %s) LIMIT %s OFFSET %s', [2, 1, 0])
      gunicorn-web stdout | 2022-06-28 10:26:53,104 [226] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`name`, `t1`.`repository_id`, `t1`.`manifest_id`, `t1`.`lifetime_start_ms`, `t1`.`lifetime_end_ms`, `t1`.`hidden`, `t1`.`reversion`, `t1`.`tag_kind_id`, `t1`.`linked_tag_id`, `t2`.`id`, `t2`.`repository_id`, `t2`.`digest`, `t2`.`media_type_id`, `t2`.`manifest_bytes`, `t2`.`config_media_type`, `t2`.`layers_compressed_size` FROM `tag` AS `t1` INNER JOIN `manifest` AS `t2` ON (`t1`.`manifest_id` = `t2`.`id`) WHERE ((((`t1`.`repository_id` = %s) AND (`t1`.`name` = %s)) AND ((`t1`.`lifetime_end_ms` IS %s) OR (`t1`.`lifetime_end_ms` > %s))) AND (`t1`.`hidden` = %s)) LIMIT %s OFFSET %s', [3, 'latest', None, 1656412013103, False, 1, 0])
      gunicorn-web stdout | 2022-06-28 10:26:53,105 [226] [DEBUG] [peewee] ('UPDATE `tag` SET `lifetime_end_ms` = %s WHERE ((`tag`.`id` = %s) AND (`tag`.`lifetime_end_ms` = %s))', [1656412013103, 4, 1657880763091])
      gunicorn-web stdout | 2022-06-28 10:26:53,106 [226] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`repository_id`, `t1`.`tag_id`, `t1`.`repository_tag_id`, `t2`.`id`, `t2`.`name`, `t2`.`image_id`, `t2`.`repository_id`, `t2`.`lifetime_start_ts`, `t2`.`lifetime_end_ts`, `t2`.`hidden`, `t2`.`reversion` FROM `tagtorepositorytag` AS `t1` INNER JOIN `repositorytag` AS `t2` ON (`t1`.`repository_tag_id` = `t2`.`id`) WHERE (`t1`.`tag_id` = %s) LIMIT %s OFFSET %s', [4, 1, 0])
      gunicorn-web stdout | 2022-06-28 10:26:53,106 [226] [DEBUG] [peewee] ('INSERT INTO `tag` (`name`, `repository_id`, `manifest_id`, `lifetime_start_ms`, `lifetime_end_ms`, `hidden`, `reversion`, `tag_kind_id`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)', ['latest', 3, 2, 1656412013103, None, False, False, 1])
      

      and the same has been written in the logentry3 table. However, the UI is not showing this change (see screenshots).

      Please advise!

      Attachments

        1. firefox_ZpwVWnAfVS.png
          firefox_ZpwVWnAfVS.png
          13 kB
        2. firefox_uSNppNdegQ.png
          firefox_uSNppNdegQ.png
          22 kB
        3. firefox_aRmPYd3UXJ.png
          firefox_aRmPYd3UXJ.png
          13 kB

        Activity

          People

            Unassigned Unassigned
            rhn-support-ibazulic Ivan Bazulic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: