#1994 cli, frontend: api monitor page to contain pkg_version
Merged 2 years ago by praiskup. Opened 2 years ago by praiskup.
Unknown source api-monitor-pkg-version  into  main

file modified
+1
@@ -13,6 +13,7 @@

      "chroot",

      "build_id",

      "state",

+     "pkg_version",

  ]

  

  ADDITIONAL_FIELDS = [

@@ -1454,7 +1454,8 @@

              .join(models.Package)

              .options(

                  load_only("build_id", "status", "mock_chroot_id", "result_dir"),

-                 contains_eager("build").load_only("package_id", "copr_dir_id")

+                 contains_eager("build").load_only("package_id", "copr_dir_id",

+                                                   "pkg_version")

                      .contains_eager("package").load_only("name"),

              )

              .filter(models.BuildChroot.mock_chroot_id.in_(mock_chroot_ids))

@@ -40,6 +40,7 @@

              # anti-gc, this is a very small set of items

              anti_garbage_collector.add(bch.mock_chroot)

              anti_garbage_collector.add(bch.build.copr_dir)

+             chroot["pkg_version"] = bch.build.pkg_version

          yield {

              "name": package["name"],

              "chroots": chroots,

@@ -51,6 +51,7 @@

                              "build_id": 5,

                              "state": "succeeded",

                              "status": 1,

+                             "pkg_version": "1",

                      } | ({

                              "url_backend_log": (

                                  "http://copr-be-dev.cloud.fedoraproject.org/"
@@ -69,6 +70,7 @@

                          "build_id": 2,

                          "state": "waiting",

                          "status": 9,

+                         "pkg_version": None,

                      } | ({

                          "url_backend_log": None,

                          "url_build_log": None,
@@ -118,11 +120,13 @@

                          "build_id": 1,

                          "state": "succeeded",

                          "status": 1,

+                         "pkg_version": "1",

                      },

                      "fedora-rawhide-i386": {

                          "build_id": 1,

                          "state": "succeeded",

                          "status": 1,

+                         "pkg_version": "1",

                      },

                  },

              }]
@@ -162,6 +166,7 @@

                          'status': 9,

                          # we don't have build log here

                          'url_build_log': None,

+                         'pkg_version': None,

                      },

                      'fedora-18-x86_64': {

                          'build_id': 1,
@@ -169,6 +174,7 @@

                          'status': 9,

                          # we don't have build log here

                          'url_build_log': None,

+                         'pkg_version': None,

                      },

                  },

              }]

Slowdown on projects with 70k output BuildChroots is not not measurable
(on local box).

Fixes: #1993

Build succeeded.

rebased onto e2f7884

2 years ago

Build succeeded.

Pull-Request has been merged by praiskup

2 years ago