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

Postgres complains when the conversion of removed_tag_expiration_s to milliseconds is larger than an integer.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • -area/gc, quay
    • False
    • False
    • Quay
    • Undefined

      For example, 
      '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" INNER JOIN "repository" AS "t2" ON ("t1"."repository_id" = "t2"."id") INNER JOIN "user" AS "t3" ON ("t2"."namespace_user_id" = "t3"."id") WHERE ((("t1"."repository_id" = 1851) AND NOT ("t1"."lifetime_end_ms" IS None)) AND ("t1"."lifetime_end_ms" <= (1625841756272 - ("t3"."removed_tag_expiration_s" * 1000)))) LIMIT 10'
      will raise an integer too large exception because of 

      ("t1"."lifetime_end_ms" <= (1625841756272 - ("t3"."removed_tag_expiration_s" * 1000)))

      We should either add a check to make sure that the conversion to ms fits in an integer, or find a way for postgres to treat the result of the operation as a bigint. 

              Unassigned Unassigned
              sleesinc Kenny Lee Sin Cheong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: