#1722 frontend: allow disabling of appstream metadata
Merged 2 years ago by praiskup. Opened 3 years ago by schlupov.
copr/ schlupov/copr disabling_of_appstream_metadata  into  main

@@ -114,6 +114,7 @@ 

          projectname = data["projectname"]

          project_dirnames = data["project_dirnames"]

          chroots = data["chroots"]

+         appstream = data["appstream"]

  

          result = ActionResult.SUCCESS

  
@@ -130,7 +131,7 @@ 

                  except FileExistsError:

                      pass

  

-                 if not call_copr_repo(repo, logger=self.log):

+                 if not call_copr_repo(repo, appstream=appstream, logger=self.log):

                      result = ActionResult.FAILURE

  

          return result
@@ -228,7 +229,7 @@ 

      """

      # pylint: disable=abstract-method

      def _handle_delete_builds(self, ownername, projectname, project_dirname,

-                               chroot_builddirs, build_ids):

+                               chroot_builddirs, build_ids, appstream):

          """ call /bin/copr-repo --delete """

          devel = uses_devel_repo(self.front_url, ownername, projectname)

          result = ActionResult.SUCCESS
@@ -247,7 +248,7 @@ 

              # repodata temporarily pointing at non-existing files)!

              if chroot != "srpm-builds":

                  # In srpm-builds we don't create repodata at all

-                 if not call_copr_repo(chroot_path, delete=subdirs, devel=devel,

+                 if not call_copr_repo(chroot_path, delete=subdirs, devel=devel, appstream=appstream,

                                        logger=self.log):

                      result = ActionResult.FAILURE

  
@@ -341,13 +342,14 @@ 

          projectname = ext_data["projectname"]

          project_dirnames = ext_data["project_dirnames"]

          build_ids = ext_data["build_ids"]

+         appstream = ext_data["appstream"]

  

          result = ActionResult.SUCCESS

          for project_dirname, chroot_builddirs in project_dirnames.items():

              if ActionResult.FAILURE == \

                 self._handle_delete_builds(ownername, projectname,

                                            project_dirname, chroot_builddirs,

-                                           build_ids):

+                                           build_ids, appstream):

                  result = ActionResult.FAILURE

          return result

  
@@ -371,13 +373,14 @@ 

              projectname = ext_data["projectname"]

              project_dirname = ext_data["project_dirname"]

              chroot_builddirs = ext_data["chroot_builddirs"]

+             appstream = ext_data["appstream"]

          except KeyError:

              self.log.exception("Invalid action data")

              return ActionResult.FAILURE

  

          return self._handle_delete_builds(ownername, projectname,

                                            project_dirname, chroot_builddirs,

-                                           build_ids)

+                                           build_ids, appstream)

  

  

  class DeleteChroot(Delete):
@@ -414,6 +417,7 @@ 

  class RawhideToRelease(Action):

      def run(self):

          data = json.loads(self.data["data"])

+         appstream = data["appstream"]

          result = ActionResult.SUCCESS

          try:

              chrootdir = os.path.join(self.opts.destdir, data["ownername"], data["projectname"], data["dest_chroot"])
@@ -432,7 +436,7 @@ 

                      with open(os.path.join(destdir, "build.info"), "a") as f:

                          f.write("\nfrom_chroot={}".format(data["rawhide_chroot"]))

  

-             if not call_copr_repo(chrootdir, logger=self.log):

+             if not call_copr_repo(chrootdir, appstream=appstream, logger=self.log):

                  result = ActionResult.FAILURE

          except:

              result = ActionResult.FAILURE
@@ -449,6 +453,7 @@ 

              projectname = data["projectname"]

              chroots = data["chroots"]

              project_path = os.path.join(self.opts.destdir, ownername, projectname)

+             appstream = data["appstream"]

  

              mmd_yaml = base64.b64decode(data["modulemd_b64"]).decode("utf-8")

              mmd_yaml = modulemd_tools.yaml.upgrade(mmd_yaml, 2)
@@ -491,7 +496,7 @@ 

                      mmd_yaml = modulemd_tools.yaml.update(mmd_yaml, rpms_nevras=artifacts)

                      self.log.info("Module artifacts: %s", artifacts)

                      modulemd_tools.yaml.dump(mmd_yaml, destdir)

-                     if not call_copr_repo(destdir, logger=self.log):

+                     if not call_copr_repo(destdir, appstream=appstream, logger=self.log):

                          result = ActionResult.FAILURE

  

          except Exception:

@@ -611,6 +611,7 @@ 

          project_owner = self.job.project_owner

          project_name = self.job.project_name

          devel = self.job.uses_devel_repo

+         appstream = self.job.appstream

  

          base_url = "/".join([self.opts.results_baseurl, project_owner,

                               project_name, self.job.chroot])
@@ -620,7 +621,8 @@ 

                        base_url, not devel)

          if not call_copr_repo(self.job.chroot_dir, devel=devel,

                                add=[self.job.target_dir_name],

-                               logger=self.log):

+                               logger=self.log,

+                               appstream=appstream):

              raise BackendError("createrepo failed")

  

      def _get_srpm_build_details(self, job):

@@ -616,7 +616,7 @@ 

  

  

  def call_copr_repo(directory, rpms_to_remove=None, devel=False, add=None, delete=None, timeout=None,

-                    logger=None):

+                    logger=None, appstream=True):

      """

      Execute 'copr-repo' tool, and return True if the command succeeded.

      """
@@ -635,6 +635,8 @@ 

      cmd += opt_multiply('--add', add)

      cmd += opt_multiply('--delete', delete)

      cmd += opt_multiply('--rpms-to-remove', rpms_to_remove)

+     if not appstream:

+         cmd += ['--no-appstream-metadata']

      if devel:

          cmd += ['--devel']

  

@@ -67,6 +67,7 @@ 

          self.sandbox = None

  

          self.results = None

+         self.appstream = None

  

          # TODO: validate update data, user marshmallow

          for key, val in task_data.items():
@@ -79,6 +80,9 @@ 

          if str(self.task_id) == str(self.build_id):

              self.chroot = 'srpm-builds'

  

+         if task_data["appstream"]:

+             self.appstream = task_data["appstream"]

+ 

          self.destdir = os.path.normpath(os.path.join(

              worker_opts.destdir,

              task_data["project_owner"],

file modified
+6 -3
@@ -217,15 +217,18 @@ 

  

  

  def add_appdata(opts):

-     if opts.devel or not opts.appstream:

-         opts.log.info("appstream-builder skipped, /devel subdir or "

-                       "--no-appstream-metadata specified")

+     if opts.devel:

+         opts.log.info("appstream-builder skipped, /devel subdir")

          return

  

      if os.path.exists(os.path.join(opts.projectdir, ".disable-appstream")):

          opts.log.info("appstream-builder skipped, .disable-appstream file")

          return

  

+     if not opts.appstream:

+         opts.log.info("appstream-builder skipped")

+         return

+ 

      path = opts.directory

      origin = os.path.join(opts.ownername, opts.projectname)

  

file modified
+10 -1
@@ -39,6 +39,7 @@ 

              "src_pkg_name": self.pkgs_stripped[0],

              "ownername": "foo",

              "projectname": "bar",

+             "appstream": True,

              "project_dirname": "bar",

              "chroot_builddirs": {

                  "fedora20": ["00001-foo"],
@@ -158,7 +159,8 @@ 

                                  '00000002-pkg1': '00000009-pkg1', '00000005-pkg2': '00000010-pkg2'}

                          },

                          "user": "thrnciar",

-                         "copr": "source-copr"

+                         "copr": "source-copr",

+                         "appstream": True,

                      }),

                  "old_value": "thrnciar/source-copr",

                  "new_value": "thrnciar/destination-copr",
@@ -307,6 +309,7 @@ 

                  "data": json.dumps({

                      "ownername": "foo",

                      "project_dirnames": ["bar", "baz"],

+                     "appstream": True,

                  }),

              },

          )
@@ -458,6 +461,7 @@ 

                      "ownername": "@copr",

                      "projectname": "prunerepo",

                      "project_dirname": "prunerepo",

+                     "appstream": True,

                      "chroot_builddirs": {

                          "fedora-23-x86_64": [builddir],

                      },
@@ -553,6 +557,7 @@ 

                  "data": json.dumps({

                      "ownername": "foo",

                      "projectname": "bar",

+                     "appstream": True,

                      "project_dirname": "bar",

                      "chroot_builddirs": {

                          "fedora-20-x86_64": ["rubygem-log4r-1.1.10-2.fc21"],
@@ -622,6 +627,7 @@ 

                  "data": json.dumps({

                      "ownername": "foo",

                      "projectname": "bar",

+                     "appstream": True,

                      "chroots": ["fedora-20-x86_64", "fedora-21-x86_64"],

                      "project_dirname": "bar",

                      "chroot_builddirs": {
@@ -709,6 +715,7 @@ 

          ext_data = json.dumps({

              "ownername": "foo",

              "projectname": "bar",

+             "appstream": True,

              "project_dirnames": {

                  'bar': {

                      "fedora-20": ["01-foo", "02-foo"],
@@ -752,6 +759,7 @@ 

              "chroots": ["epel-6-i386", "fedora-20-x86_64"],

              "ownername": "foo",

              "projectname": "bar",

+             "appstream": True,

              "project_dirnames": ["bar"]

          })

          self.opts.destdir = tmp_dir
@@ -784,6 +792,7 @@ 

              "chroots": ["epel-6-i386", "fedora-20-x86_64"],

              "ownername": "foo",

              "projectname": "bar",

+             "appstream": True,

              "project_dirnames": ["bar"]

          })

          self.opts.destdir = tmp_dir

@@ -74,7 +74,8 @@ 

      "use_bootstrap_container": False,

      "uses_devel_repo": False,

      "with_opts": [],

-     "without_opts": []

+     "without_opts": [],

+     "appstream": True,

  }

  

  
@@ -95,7 +96,8 @@ 

      }),

      "source_type": 8,

      "submitter": "praiskup",

-     "task_id": "855954"

+     "task_id": "855954",

+     "appstream": True,

  }

  

  

@@ -0,0 +1,22 @@ 

+ """

+ add column appstream

+ 

+ Revision ID: 2318cc31444e

+ Revises: efec6b1aa9a2

+ Create Date: 2021-04-28 14:07:25.439393

+ """

+ 

+ import sqlalchemy as sa

+ from alembic import op

+ 

+ 

+ revision = '2318cc31444e'

+ down_revision = 'efec6b1aa9a2'

+ 

+ 

+ def upgrade():

+     op.add_column('copr', sa.Column('appstream', sa.Boolean(), server_default='1', nullable=False))

Is this going to set the "appstream" to True for the old projects? I think we can set this to True everywhere.

Answering myself: Yes, it sets appstream=True for all the existing projects, good.

+ 

+ 

+ def downgrade():

+     op.drop_column('copr', 'appstream')

@@ -597,6 +597,12 @@ 

              Failing fedora-review will not fail the build itself.""",

              default=False, false_values=FALSE_VALUES)

  

+     appstream = wtforms.BooleanField(

+             "Generate AppStream metadata",

+             description="""Generate AppStream metadata for this project.

+             Generating metadata slows down the builds in large Copr projects.""",

+             default=True, false_values=FALSE_VALUES)

+ 

      @property

      def errors(self):

          """

@@ -107,6 +107,7 @@ 

              "projectname": copr.name,

              "project_dirnames": dirnames,

              "chroots": chroots,

+             "appstream": copr.appstream,

          }

          action = models.Action(

              action_type=ActionTypeEnum("createrepo"),
@@ -165,7 +166,8 @@ 

              "projectname": build.copr_name,

              "project_dirname":

                  build.copr_dirname if build.copr_dir else build.copr_name,

-             "chroot_builddirs": cls.get_chroot_builddirs(build)

+             "chroot_builddirs": cls.get_chroot_builddirs(build),

+             "appstream": build.appstream,

          }

  

      @classmethod
@@ -279,6 +281,7 @@ 

          data_dict = {

              "ownername": copr.owner_name,

              "projectname": copr.name,

+             "appstream": copr.appstream,

          }

  

          action = models.Action(

@@ -219,7 +219,7 @@ 

      def add(cls, user, name, selected_chroots, repos=None, description=None,

              instructions=None, check_for_duplicates=False, group=None, persistent=False,

              auto_prune=True, bootstrap=None, follow_fedora_branching=False, isolation=None,

-             **kwargs):

+             appstream=True, **kwargs):

  

          if not flask.g.user.admin and flask.g.user != user:

              msg = ("You were authorized as '{0}' user without permissions to access "
@@ -246,6 +246,7 @@ 

                             bootstrap=bootstrap,

                             isolation=isolation,

                             follow_fedora_branching=follow_fedora_branching,

+                            appstream=appstream,

                             **kwargs)

  

  

@@ -337,6 +337,8 @@ 

      # optional tools to run after build

      fedora_review = db.Column(db.Boolean, default=False, nullable=False, server_default="0")

  

+     appstream = db.Column(db.Boolean, default=True, nullable=False, server_default="1")

+ 

  

  class _CoprPrivate(db.Model, helpers.Serializer):

      """
@@ -1471,6 +1473,10 @@ 

          """

          return {bc.name: bc.results_dict for bc in self.build_chroots}

  

+     def appstream(self):

+         """Whether appstream metadata should be generated for a build."""

+         return self.copr.appstream

+ 

  

  class DistGitBranch(db.Model, helpers.Serializer):

      """

@@ -148,6 +148,7 @@ 

          [form.multilib],

          [form.module_hotfixes],

          [form.fedora_review],

+         [form.appstream],

      ])}}

  

      {{ render_field(form.delete_after_days,

@@ -33,6 +33,7 @@ 

          "bootstrap": copr.bootstrap,

          "isolation": copr.isolation,

          "module_hotfixes": copr.module_hotfixes,

+         "appstream": copr.appstream,

      }

  

  
@@ -163,6 +164,7 @@ 

              fedora_review=form.fedora_review.data,

              follow_fedora_branching=form.follow_fedora_branching.data,

              runtime_dependencies=form.runtime_dependencies.data,

+             appstream=form.appstream.data,

          )

          db.session.commit()

      except (DuplicateException,

@@ -146,6 +146,7 @@ 

              "uses_devel_repo": task.build.copr.devel_mode,

              "isolation": task.build.isolation,

              "fedora_review": task.build.copr.fedora_review,

+             "appstream": bool(task.build.appstream),

          })

  

          copr_chroot = CoprChrootsLogic.get_by_name_safe(task.build.copr, task.mock_chroot.name)
@@ -207,6 +208,7 @@ 

              "submitter": task.submitter[0],

              "project_name": task.copr_name,

              "project_dirname": task.copr_dirname,

+             "appstream": bool(task.copr.appstream),

          })

  

      except Exception as err:

@@ -250,6 +250,7 @@ 

                  runtime_dependencies=form.runtime_dependencies.data.replace("\n", " "),

                  bootstrap=form.bootstrap.data,

                  isolation=form.isolation.data,

+                 appstream=form.appstream.data,

              )

  

              db.session.commit()
@@ -574,6 +575,7 @@ 

      copr.runtime_dependencies = form.runtime_dependencies.data.replace("\n", " ")

      copr.bootstrap = form.bootstrap.data

      copr.isolation = form.isolation.data

+     copr.appstream = form.appstream.data

      if flask.g.user.admin:

          copr.auto_prune = form.auto_prune.data

      else:

@@ -77,7 +77,7 @@ 

              "chroots": chroots,

          }

  

-         for config in ['bootstrap', 'isolation', 'contact', 'homepage']:

+         for config in ['bootstrap', 'isolation', 'contact', 'homepage', 'appstream']:

              if not config in kwargs:

                  continue

              data[config] = kwargs[config]
@@ -201,7 +201,7 @@ 

              "chroots": chroots,

          }

  

-         for config in ['bootstrap', 'isolation', 'contact', 'homepage']:

+         for config in ['bootstrap', 'isolation', 'contact', 'homepage', 'appstream']:

              if not config in kwargs:

                  continue

              data[config] = kwargs[config]

@@ -408,6 +408,7 @@ 

                               f_mock_chroots, f_builds,f_users_api, ):

  

          self.db.session.commit()

+         self.b1.appstream = True

          b_id = self.b1.id

          href = "/api_2/builds/{}".format(b_id)

          r = self.request_rest_api_with_auth(

@@ -69,7 +69,8 @@ 

          self.api3.new_project("test", ["fedora-rawhide-i386"],

                                bootstrap="default", isolation="simple",

                                contact="somebody@redhat.com",

-                               homepage="https://github.com/fedora-copr")

+                               homepage="https://github.com/fedora-copr",

+                               appstream=True)

          old_data = self._get_copr_id_data(1)

  

          # When new arguments are added to the Copr model, we should update this
@@ -93,7 +94,7 @@ 

              "test", delete_after_days=5, enable_net=True, devel_mode=True,

              repos=["http://example/repo/", "http://another/"],

              runtime_dependencies=["http://run1/repo/", "http://run2/"],

-             bootstrap_image="noop",

+             bootstrap_image="noop", appstream=True,

          )

          new_data = self._get_copr_id_data(1)

          delete_after = datetime.datetime.now() + datetime.timedelta(days=5)
@@ -138,6 +139,8 @@ 

          }, {

              "follow_fedora_branching": True,

          }, {

+         }, {

+             "appstream": True,

          }]

  

          for setup in easy_changes:

@@ -229,6 +229,7 @@ 

              expected_chroots_to_delete.add(bchroot.name)

  

          assert len(ActionsLogic.get_many().all()) == 0

+         self.b4.appstream = True

          BuildsLogic.delete_build(self.u1, self.b4)

          self.db.session.commit()

  
@@ -250,6 +251,7 @@ 

          self.db.session.commit()

  

          assert len(ActionsLogic.get_many().all()) == 0

+         self.b1.appstream = True

          BuildsLogic.delete_build(self.u1, self.b1)

          self.db.session.commit()

  
@@ -324,6 +326,7 @@ 

              expected_chroots_to_delete.add(bchroot.name)

  

          assert len(ActionsLogic.get_many().all()) == 0

+         self.b1.appstream = True

          BuildsLogic.delete_build(self.u1, self.b1)

          self.db.session.commit()

  
@@ -399,6 +402,7 @@ 

          # we can not delete not-yet finished builds!

          assert len(self.db.session.query(models.Build).all()) == 4

  

+         self.b3.appstream = True

          for bch in self.b3.build_chroots:

              bch.status = StatusEnum('succeeded')

              self.db.session.add(bch)

@@ -147,6 +147,7 @@ 

          self.db.session.commit()

  

          expected_chroot_builddirs = {'srpm-builds': [self.b_few_chroots.result_dir]}

+         self.b_few_chroots.appstream = True

          for chroot in self.b_few_chroots.build_chroots:

              expected_chroot_builddirs[chroot.name] = [chroot.result_dir]

  
@@ -176,6 +177,7 @@ 

          self.db.session.commit()

  

          b_id = self.b1.id

+         self.b1.appstream = True

          url = "/coprs/{0}/{1}/delete_build/{2}/".format(self.u1.name, self.c1.name, b_id)

  

          r = self.test_client.post(

@@ -1066,7 +1066,8 @@ 

          template = {

              "ownername": "user1",

              "projectname": "test",

-             "project_dirnames": ["test"]

+             "project_dirnames": ["test"],

+             "appstream": True,

          }

          def _expected(action, chroots):

              template["chroots"] = chroots

@@ -73,7 +73,7 @@ 

              auto_prune=True, use_bootstrap_container=None, devel_mode=False,

              delete_after_days=None, multilib=False, module_hotfixes=False,

              bootstrap=None, bootstrap_image=None, isolation=None,

-             fedora_review=None):

+             fedora_review=None, appstream=True):

          """

          Create a project

  
@@ -104,6 +104,7 @@ 

              Possible values are 'default', 'simple', 'nspawn'.

          :param bool fedora_review: Run fedora-review tool for packages

                                     in this project

+         :param bool appstream: Disable or enable generating the appstream metadata

          :return: Munch

          """

          endpoint = "/project/add/{ownername}"
@@ -130,6 +131,7 @@ 

              "multilib": multilib,

              "module_hotfixes": module_hotfixes,

              "fedora_review": fedora_review,

+             "appstream": appstream,

          }

  

          _compat_use_bootstrap_container(data, use_bootstrap_container)
@@ -144,7 +146,7 @@ 

               auto_prune=None, use_bootstrap_container=None, devel_mode=None,

               delete_after_days=None, multilib=None, module_hotfixes=None,

               bootstrap=None, bootstrap_image=None, isolation=None,

-              fedora_review=None):

+              fedora_review=None, appstream=None):

          """

          Edit a project

  
@@ -174,6 +176,7 @@ 

              This is a noop parameter and its value is ignored.

          :param bool fedora_review: Run fedora-review tool for packages

                                     in this project

+         :param bool appstream: Disable or enable generating the appstream metadata

          :return: Munch

          """

          endpoint = "/project/edit/{ownername}/{projectname}"
@@ -199,6 +202,7 @@ 

              "multilib": multilib,

              "module_hotfixes": module_hotfixes,

              "fedora_review": fedora_review,

+             "appstream": appstream,

          }

  

          _compat_use_bootstrap_container(data, use_bootstrap_container)

Metadata Update from @schlupov:
- Pull-request tagged with: needs-work

3 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 11b8c32554c1484307029d322e5744bee46a1342

3 years ago

Metadata Update from @schlupov:
- Pull-request untagged with: needs-work

3 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 095857ed75a521d794eb69117e4c546b75a8c3db

3 years ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

rebased onto 4e2b0afa327115804a3ba8ab8956c9f5a4f6ce19

3 years ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Metadata Update from @schlupov:
- Pull-request tagged with: needs-work

3 years ago

I'm thinking about this, and instead of passing additional argument here we should probably stop calling add_appdata when appstream is false.

Here is reversed logic, if not* appstream.

Here is probably the problem, the flag in DB is named disable_appstream_metadata while in our api it is just appstream. (missing negation)

missing description field here, should tell the user when the checkbox might be useful

rebased onto 80265296bf645b827371f8578208ef23ffc87cb9

2 years ago

Metadata Update from @schlupov:
- Pull-request untagged with: needs-work

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 0fc78f66005ef8a206b3f93f5cba444a88b972c4

2 years ago

Build succeeded.

rebased onto 9dfec3451fbc202a7132104c768e9f41409bba3b

2 years ago

Build succeeded.

Please take a look. I was trying to solve my problem with test_build_jobs_performance but it still does two more queries for info from copr_private :disappointed:

rebased onto 3cf27d3c25c80846cbb8aa806ffd6a74034e9b9c

2 years ago

Build succeeded.

rebased onto a3919f40c8474eb4e3692924397ac4732f1d46c8

2 years ago

Build succeeded.

Beaker tests are passing, the problems I had before were related to the fact that I didn't have the admin rights on the devel instance.

Can we please keep this "hack"? It shouldn't hurt us if we didn't generate appstream metadata if the file still exists ... I mean, I don't want to manually go through all the files on backend, and move the "flag" to the database.

Are you sure we want this? Here should be the absolute minimal set of information that is needed by backend build scheduler (not worker).

What about this?
Do not generate AppStream metadata for this project, this slows down builds for large Copr large projects.

send_delete_copr doesn't need this argument, we just remove the whole project directory in such action

Hm, I'm not sure for the send_fork_copr either..?

When it isn't there, tests for batches don't work because there is some extra select into the database and I understood that this is something we want to avoid.

rebased onto 10a88c2936fa4c7bc308d65d14d0d013d1f302de

2 years ago

Build succeeded.

You seem to do "appstream": bool(task.build.appstream), too early in get_build_record ... because at that point the info about appstream shouldn't be needed.

Nit, whitespace between data and [.

rebased onto 3f5a80eac44bdf9ea1756f9229271765314d9ced

2 years ago

Build succeeded.

rebased onto 92ce2f77a304e8ade755bd99b84a7416d4c018bf

2 years ago

Build succeeded.

I managed to remove appstream from the query in BuildsLogic. PTAL.

rebased onto c454fe3497060bbec929a1d380c1a15c4492838f

2 years ago

Build succeeded.

I'm reading this once more and we should probably just say "Generate AppStream ...", as we set default=True.

Having some better commit message would be good, but otherwise looks very good. Thank you for the progress here!

rebased onto e8253b35cc500bc071678e3d582fb9205cdae3f8

2 years ago

Build succeeded.

rebased onto 3c765a9

2 years ago

Build succeeded.

Is this going to set the "appstream" to True for the old projects? I think we can set this to True everywhere.

Answering myself: Yes, it sets appstream=True for all the existing projects, good.

Pull-Request has been merged by praiskup

2 years ago
Metadata
Changes Summary 23
+12 -7
file changed
backend/copr_backend/actions.py
+3 -1
file changed
backend/copr_backend/background_worker_build.py
+3 -1
file changed
backend/copr_backend/helpers.py
+4 -0
file changed
backend/copr_backend/job.py
+6 -3
file changed
backend/run/copr-repo
+10 -1
file changed
backend/tests/test_action.py
+4 -2
file changed
backend/tests/testlib/__init__.py
+22
file added
frontend/coprs_frontend/alembic/versions/2318cc31444e_add_column_appstream.py
+6 -0
file changed
frontend/coprs_frontend/coprs/forms.py
+4 -1
file changed
frontend/coprs_frontend/coprs/logic/actions_logic.py
+2 -1
file changed
frontend/coprs_frontend/coprs/logic/coprs_logic.py
+6 -0
file changed
frontend/coprs_frontend/coprs/models.py
+1 -0
file changed
frontend/coprs_frontend/coprs/templates/coprs/_coprs_forms.html
+2 -0
file changed
frontend/coprs_frontend/coprs/views/apiv3_ns/apiv3_projects.py
+2 -0
file changed
frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py
+2 -0
file changed
frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+2 -2
file changed
frontend/coprs_frontend/tests/request_test_api.py
+1 -0
file changed
frontend/coprs_frontend/tests/test_api/test_build_r.py
+5 -2
file changed
frontend/coprs_frontend/tests/test_apiv3/test_projects.py
+4 -0
file changed
frontend/coprs_frontend/tests/test_logic/test_builds_logic.py
+2 -0
file changed
frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
+2 -1
file changed
frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
+6 -2
file changed
python/copr/v3/proxies/project.py