#2180 frontend: branch-fedora action should run createrepo for empty chroots too
Merged 2 years ago by praiskup. Opened 2 years ago by schlupov.
copr/ schlupov/copr branch_fedora_createrepo  into  main

@@ -94,6 +94,8 @@ 

  

          # no builds to fork in this copr

          if not len(fork_builds):

+             print("Createrepo for copr '{}', chroot '{}'".format(copr.full_name, mock_chroot.name))

+             actions_logic.ActionsLogic.send_createrepo(copr, chroots=[mock_chroot.name])

Nice and easy! Thanks.

              continue

  

          new_build_chroots = 0

@@ -129,30 +129,33 @@ 

          assert bch.status == StatusEnum("forked")

          assert bch.build.package == self.p3

  

-         assert self._get_actions() == ["rawhide_to_release"]

+         assert self._get_actions() == ["rawhide_to_release", "createrepo"]

  

          # re-run the command, this is no-op

          branch_fedora_function(19, False, 'f19')

-         assert self._get_actions() == ["rawhide_to_release"]

+         assert self._get_actions() == ["rawhide_to_release", "createrepo", "createrepo"]

  

          # re-run, and re-fork all the builds, generates new action

          branch_fedora_function(19, True, 'f19')

-         assert self._get_actions() == ["rawhide_to_release",

-                                        "rawhide_to_release"]

+         assert self._get_actions() == ["rawhide_to_release", "createrepo", "createrepo",

+                                        "rawhide_to_release", "createrepo"]

Can you please justify the actions being submitted? What project+chroot pair they are started for?

Actually, I can see that below it is dumped in the stdout.

  

          stdout, _ = capsys.readouterr()

          assert stdout == "\n".join([

              "Handling builds in copr 'user2/barcopr', chroot 'fedora-rawhide-i386'",

              "  Fresh new build chroots: 1, regenerate 0",

              "Handling builds in copr 'user1/foocopr', chroot 'fedora-rawhide-x86_64'",

+             "Createrepo for copr 'user1/foocopr', chroot 'fedora-19-x86_64'",

              "fedora-19-i386 - already exists.",

              "fedora-19-x86_64 - already exists.",

              "Handling builds in copr 'user2/barcopr', chroot 'fedora-rawhide-i386'",

              "Handling builds in copr 'user1/foocopr', chroot 'fedora-rawhide-x86_64'",

+             "Createrepo for copr 'user1/foocopr', chroot 'fedora-19-x86_64'",

              "fedora-19-i386 - already exists.",

              "fedora-19-x86_64 - already exists.",

              "Handling builds in copr 'user2/barcopr', chroot 'fedora-rawhide-i386'",

              "  Fresh new build chroots: 0, regenerate 1",

              "Handling builds in copr 'user1/foocopr', chroot 'fedora-rawhide-x86_64'",

+             "Createrepo for copr 'user1/foocopr', chroot 'fedora-19-x86_64'",

              ""

          ])

Build succeeded.

IMO we should do all the necessary additional logic inside the rawhide_to_release_function (including additional calls to send_createrepo).

We actually want the createrepo in the empty branched chroots, not the rawhide chroot (it already has the metadata generated).

rebased onto 8119ed0

2 years ago

Build succeeded.

Can you please justify the actions being submitted? What project+chroot pair they are started for?

Actually, I can see that below it is dumped in the stdout.

Commit 514454a fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago