#1097 Allow marking a project as module_hotfixes
Merged 4 years ago by frostyx. Opened 4 years ago by frostyx.
copr/ frostyx/copr module-hotfixes-bz1758470-2  into  master

@@ -0,0 +1,82 @@ 

+ #! /bin/bash

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/copr/Sanity/auto-prune

+ #   Description: Tests that --auto-prune works in cli.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 Red Hat, Inc.

+ #

+ #   This program is free software: you can redistribute it and/or

+ #   modify it under the terms of the GNU General Public License as

+ #   published by the Free Software Foundation, either version 2 of

+ #   the License, or (at your option) any later version.

+ #

+ #   This program is distributed in the hope that it will be

+ #   useful, but WITHOUT ANY WARRANTY; without even the implied

+ #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR

+ #   PURPOSE.  See the GNU General Public License for more details.

+ #

+ #   You should have received a copy of the GNU General Public License

+ #   along with this program. If not, see http://www.gnu.org/licenses/.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/bin/rhts-environment.sh || exit 1

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

+ source "$HERE/helpers"

+ 

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm "copr-cli"

+         rlAssertRpm "jq"

+         rlAssertExists ~/.config/copr

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         # Try to create a project

+         rlRun "copr-cli create --module-hotfixes off --chroot $CHROOT ${NAME_PREFIX}ModuleHotfixes"

+         rlAssertEquals "" `curl --silent "${FRONTEND_URL}/api_3/project?ownername=${OWNER}&projectname=${NAME_VAR}ModuleHotfixes" |jq ".module_hotfixes"` "false"

+ 

+         # Try to modify the module_hotfixes value

+         rlRun "copr-cli modify --module-hotfixes on ${NAME_PREFIX}ModuleHotfixes"

+         rlAssertEquals "" `curl --silent "${FRONTEND_URL}/api_3/project?ownername=${OWNER}&projectname=${NAME_VAR}ModuleHotfixes" |jq ".module_hotfixes"` "true"

+ 

+         # The module_hotfixes parameter should be set in the repofile

+         rlRun "curl --silent ${FRONTEND_URL}/coprs/${NAME_PREFIX}ModuleHotfixes/repo/fedora-${FEDORA_VERSION}/foo.repo |grep module_hotfixes=1"

I still miss the check that the generated end-user repofile contains the module hotfixes, otherwise looks fine to me.

Good catch, I've added it here.

+ 

+         # The copr-cli mock-config command should support it

+         rlRun "copr mock-config ${NAME_PREFIX}ModuleHotfixes ${CHROOT} |grep module_hotfixes=True"

+ 

+         # Build task should contain the module_hotfixes field

+         rlRun -s "copr-cli build ${NAME_PREFIX}ModuleHotfixes ${HELLO} --nowait"

+         rlRun "parse_build_id"

+         rlRun "copr watch-build $BUILD_ID"

+         rlAssertEquals "" `curl --silent ${FRONTEND_URL}/backend/get-build-task/${BUILD_ID}-${CHROOT} |jq ".repos[0].module_hotfixes"` "true"

+ 

+         # When there is a project foo with module_hotfixes set to False, but using a project bar with

+         # module_hotfixes set to True as an external repository, the bar should be used with that configuration

+         rlRun "copr-cli create --chroot $CHROOT ${NAME_PREFIX}NotModuleHotfixes"

+         rlRun "copr-cli modify ${NAME_PREFIX}NotModuleHotfixes --repo copr://${NAME_PREFIX}ModuleHotfixes"

+         rlRun -s "copr-cli build ${NAME_PREFIX}NotModuleHotfixes ${HELLO} --nowait"

+         rlRun "parse_build_id"

+         rlRun "copr watch-build $BUILD_ID"

+         rlAssertEquals "" `curl --silent ${FRONTEND_URL}/backend/get-build-task/${BUILD_ID}-${CHROOT} |jq ".repos |length"` 2

+         rlAssertEquals "" `curl --silent ${FRONTEND_URL}/backend/get-build-task/${BUILD_ID}-${CHROOT} |jq '.repos[0] |has("module_hotfixes")'` "false"

+         rlAssertEquals "" `curl --silent ${FRONTEND_URL}/backend/get-build-task/${BUILD_ID}-${CHROOT} |jq ".repos[1].module_hotfixes"` "true"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "copr-cli delete ${NAME_PREFIX}ModuleHotfixes"

+         rlRun "copr-cli delete ${NAME_PREFIX}NotModuleHotfixes"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -31,6 +31,9 @@ 

  {%- if repo.priority %}

  priority={{ repo.priority }}

  {%- endif %}

+ {%- if repo.module_hotfixes %}

+ module_hotfixes={{ repo.module_hotfixes }}

+ {%- endif %}

  gpgcheck=0

  enabled=1

  skip_if_unavailable=1

file modified
+8
@@ -359,6 +359,7 @@ 

              use_bootstrap_container=ON_OFF_MAP[args.use_bootstrap_container],

              delete_after_days=args.delete_after_days,

              multilib=ON_OFF_MAP[args.multilib],

+             module_hotfixes=ON_OFF_MAP[args.module_hotfixes],

          )

          print("New project was successfully created.")

  
@@ -381,6 +382,7 @@ 

              chroots=args.chroots,

              delete_after_days=args.delete_after_days,

              multilib=ON_OFF_MAP[args.multilib],

+             module_hotfixes=ON_OFF_MAP[args.module_hotfixes],

          )

  

      @requires_api_auth
@@ -818,6 +820,9 @@ 

                                 help="If mock bootstrap container is used to initialize the buildroot.")

      parser_create.add_argument("--delete-after-days", default=None, metavar='DAYS',

                                 help="Delete the project after the specfied period of time")

+     parser_create.add_argument("--module-hotfixes", choices=["on", "off"], default="off",

+                                help=("make packages from this project available "

+                                      "on along with packages from the active module streams."))

      parser_create.add_argument(

          "--multilib", choices=["on", "off"], default="off",

          help=("When users enable this copr repository on 64bit variant of "
@@ -854,6 +859,9 @@ 

                                 help=("Delete the project after the specfied "

                                       "period of time, empty or -1 disables, "

                                       "(default is \"don't change\")"))

+     parser_modify.add_argument("--module-hotfixes", choices=["on", "off"],

+                                help=("make packages from this project available "

+                                      "on along with packages from the active module streams."))

      parser_modify.add_argument(

          "--multilib", choices=["on", "off"],

          help=("When users enable this copr repository on 64bit variant of "

file modified
+2
@@ -360,6 +360,7 @@ 

          "use_bootstrap_container": None,

          "delete_after_days": None,

          "multilib": False,

+         "module_hotfixes": False,

      }

      assert stdout == "New project was successfully created.\n"

  
@@ -390,6 +391,7 @@ 

          "use_bootstrap_container": None,

          "delete_after_days": None,

          "multilib": True,

+         "module_hotfixes": False,

      }

      assert stdout == "New project was successfully created.\n"

  

@@ -0,0 +1,20 @@ 

+ """

+ Add module_hotfixes column for copr table

+ 

+ Revision ID: 4ed794df3bbb

+ Revises: 0dbdd06fb850

+ Create Date: 2019-11-07 10:01:24.496244

+ """

+ 

+ import sqlalchemy as sa

+ from alembic import op

+ 

+ 

+ revision = '4ed794df3bbb'

+ down_revision = '745250baedaf'

+ 

+ def upgrade():

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

+ 

+ def downgrade():

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

@@ -348,6 +348,13 @@ 

                      "Enable internet access during builds",

                      default=False, false_values=FALSE_VALUES)

  

+             module_hotfixes = wtforms.BooleanField(

+                     "This repository contains module hotfixes",

+                     description="""This will make packages from this project

+                     available on along with packages from the active module

+                     streams.""",

+                     default=False, false_values=FALSE_VALUES)

+ 

              @property

              def selected_chroots(self):

                  selected = []
@@ -1071,6 +1078,7 @@ 

      build_enable_net = wtforms.BooleanField(validators=[wtforms.validators.Optional()], false_values=FALSE_VALUES)

      enable_net = wtforms.BooleanField(validators=[wtforms.validators.Optional()], false_values=FALSE_VALUES)

      multilib = wtforms.BooleanField(validators=[wtforms.validators.Optional()], false_values=FALSE_VALUES)

+     module_hotfixes = wtforms.BooleanField(validators=[wtforms.validators.Optional()], false_values=FALSE_VALUES)

  

  

  class CoprForkFormFactory(object):

@@ -444,6 +444,18 @@ 

      return repo_url

  

  

+ def is_copr_repo(repo_url):

+     return copr_repo_fullname(repo_url) is not None

+ 

+ 

+ def copr_repo_fullname(repo_url):

+     parsed_url = urlparse(repo_url)

+     query = parse_qs(parsed_url.query)

+     if parsed_url.scheme != "copr":

+         return None

+     return parsed_url.netloc + parsed_url.path

+ 

+ 

  def pre_process_repo_url(chroot, repo_url):

      """

      Expands variables and sanitize repo url to be used for mock config
@@ -488,65 +500,6 @@ 

      return params

  

  

- def generate_build_config(copr, chroot_id):

-     """ Return dict with proper build config contents """

-     chroot = None

-     for i in copr.copr_chroots:

-         if i.mock_chroot.name == chroot_id:

-             chroot = i

-     if not chroot:

-         return {}

- 

-     packages = "" if not chroot.buildroot_pkgs else chroot.buildroot_pkgs

- 

-     repos = [{

-         "id": "copr_base",

-         "baseurl": copr.repo_url + "/{}/".format(chroot_id),

-         "name": "Copr repository",

-     }]

- 

-     if not copr.auto_createrepo:

-         repos.append({

-             "id": "copr_base_devel",

-             "baseurl": copr.repo_url + "/{}/devel/".format(chroot_id),

-             "name": "Copr buildroot",

-         })

- 

-     def get_additional_repo_views(repos_list):

-         repos = []

-         for repo in repos_list:

-             params = parse_repo_params(repo)

-             repo_view = {

-                 "id": generate_repo_name(repo),

-                 "baseurl": pre_process_repo_url(chroot_id, repo),

-                 "name": "Additional repo " + generate_repo_name(repo),

-             }

-             repo_view.update(params)

-             repos.append(repo_view)

-         return repos

- 

-     repos.extend(get_additional_repo_views(copr.repos_list))

-     repos.extend(get_additional_repo_views(chroot.repos_list))

- 

-     return {

-         'project_id': copr.repo_id,

-         'additional_packages': packages.split(),

-         'repos': repos,

-         'chroot': chroot_id,

-         'use_bootstrap_container': copr.use_bootstrap_container,

-         'with_opts': chroot.with_opts.split(),

-         'without_opts': chroot.without_opts.split(),

-     }

- 

- 

- def generate_additional_repos(copr_chroot):

-     base_repo = "copr://{}".format(copr_chroot.copr.full_name)

-     repos = [base_repo] + copr_chroot.repos_list + copr_chroot.copr.repos_list

-     if not copr_chroot.copr.auto_createrepo:

-         repos.append("copr://{}/devel".format(copr_chroot.copr.full_name))

-     return repos

- 

- 

  def trim_git_url(url):

      if not url:

          return None

@@ -150,6 +150,11 @@ 

          return ComplexLogic.get_copr_safe(owner_name, copr_name, **kwargs)

  

      @staticmethod

+     def get_copr_by_repo_safe(repo_url):

+         owner, copr = helpers.copr_repo_fullname(repo_url).split("/")

+         return ComplexLogic.get_copr_by_owner_safe(owner, copr)

+ 

+     @staticmethod

      def get_copr_dir_safe(ownername, copr_dirname, **kwargs):

          try:

              return CoprDirsLogic.get_by_ownername(ownername, copr_dirname).one()
@@ -323,3 +328,75 @@ 

              if not name in exclude:

                  arguments[name] = getattr(from_object, name)

          return clazz(**arguments)

+ 

+ 

+ class BuildConfigLogic(object):

+ 

+     @classmethod

+     def generate_build_config(cls, copr, chroot_id):

+         """ Return dict with proper build config contents """

+         chroot = None

+         for i in copr.copr_chroots:

+             if i.mock_chroot.name == chroot_id:

+                 chroot = i

+         if not chroot:

+             return {}

+ 

+         packages = "" if not chroot.buildroot_pkgs else chroot.buildroot_pkgs

+ 

+         repos = [{

+             "id": "copr_base",

+             "baseurl": copr.repo_url + "/{}/".format(chroot_id),

+             "name": "Copr repository",

+         }]

+ 

+         if copr.module_hotfixes:

+             repos[0]["module_hotfixes"] = True

+ 

+         if not copr.auto_createrepo:

+             repos.append({

+                 "id": "copr_base_devel",

+                 "baseurl": copr.repo_url + "/{}/devel/".format(chroot_id),

+                 "name": "Copr buildroot",

+             })

+ 

+ 

+         repos.extend(cls.get_additional_repo_views(copr.repos_list, chroot_id))

+         repos.extend(cls.get_additional_repo_views(chroot.repos_list, chroot_id))

+ 

+         return {

+             'project_id': copr.repo_id,

+             'additional_packages': packages.split(),

+             'repos': repos,

+             'chroot': chroot_id,

+             'use_bootstrap_container': copr.use_bootstrap_container,

+             'with_opts': chroot.with_opts.split(),

+             'without_opts': chroot.without_opts.split(),

+         }

+ 

+     @classmethod

+     def get_additional_repo_views(cls, repos_list, chroot_id):

+         repos = []

+         for repo in repos_list:

+             params = helpers.parse_repo_params(repo)

+             repo_view = {

+                 "id": helpers.generate_repo_name(repo),

+                 "baseurl": helpers.pre_process_repo_url(chroot_id, repo),

+                 "name": "Additional repo " + helpers.generate_repo_name(repo),

+             }

+ 

+             copr = ComplexLogic.get_copr_by_repo_safe(repo)

+             if copr and copr.module_hotfixes:

+                 params["module_hotfixes"] = True

+ 

+             repo_view.update(params)

+             repos.append(repo_view)

+         return repos

+ 

+     @classmethod

+     def generate_additional_repos(cls, copr_chroot):

+         base_repo = "copr://{}".format(copr_chroot.copr.full_name)

+         repos = [base_repo] + copr_chroot.repos_list + copr_chroot.copr.repos_list

+         if not copr_chroot.copr.auto_createrepo:

+             repos.append("copr://{}/devel".format(copr_chroot.copr.full_name))

+         return repos

@@ -275,6 +275,7 @@ 

      delete_after = db.Column(db.DateTime, index=True, nullable=True)

  

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

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

  

  

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

@@ -145,6 +145,7 @@ 

          [form.use_bootstrap_container],

          [form.follow_fedora_branching],

          [form.multilib],

+         [form.module_hotfixes],

      ])}}

  

      {{ render_field(form.delete_after_days,

@@ -8,3 +8,6 @@ 

  repo_gpgcheck=0

  enabled=1

  enabled_metadata=1

+ {% if copr_dir.copr.module_hotfixes %}

+ module_hotfixes=1

+ {% endif %}

@@ -16,10 +16,10 @@ 

  from coprs import forms

  from coprs import helpers

  from coprs import models

- from coprs.helpers import fix_protocol_for_backend, generate_build_config

+ from coprs.helpers import fix_protocol_for_backend

  from coprs.logic.api_logic import MonitorWrapper

  from coprs.logic.builds_logic import BuildsLogic

- from coprs.logic.complex_logic import ComplexLogic

+ from coprs.logic.complex_logic import ComplexLogic, BuildConfigLogic

  from coprs.logic.packages_logic import PackagesLogic

  from coprs.logic.modules_logic import ModuleProvider, ModuleBuildFacade

  
@@ -1077,7 +1077,7 @@ 

      """

      output = {

          "output": "ok",

-         "build_config": generate_build_config(copr, chroot),

+         "build_config": BuildConfigLogic.generate_build_config(copr, chroot),

      }

  

      if not output['build_config']:

@@ -1,10 +1,10 @@ 

  import flask

  from . import query_params, pagination, Paginator, GET

  from coprs.views.apiv3_ns import apiv3_ns

- from coprs.helpers import generate_build_config, generate_additional_repos

  from coprs import models

  from coprs.logic.builds_logic import BuildChrootsLogic

  from coprs.logic.coprs_logic import CoprChrootsLogic

+ from coprs.logic.complex_logic import BuildConfigLogic

  

  

  def to_dict(build_chroot):
@@ -17,11 +17,11 @@ 

  

  

  def build_config(build_chroot):

-     config = generate_build_config(build_chroot.build.copr, build_chroot.name)

+     config = BuildConfigLogic.generate_build_config(build_chroot.build.copr, build_chroot.name)

      copr_chroot = CoprChrootsLogic.get_by_name_safe(build_chroot.build.copr, build_chroot.name)

      return {

          "repos": config.get("repos"),

-         "additional_repos": generate_additional_repos(copr_chroot),

+         "additional_repos": BuildConfigLogic.generate_additional_repos(copr_chroot),

          "additional_packages": config.get("additional_packages"),

          "use_bootstrap_container": config.get("use_bootstrap_container"),

          "with_opts": config.get("with_opts"),

@@ -1,10 +1,9 @@ 

  import flask

  from . import query_params, get_copr, file_upload, GET, PUT

  from .json2form import get_form_compatible_data

- from coprs.helpers import generate_additional_repos, generate_build_config

  from coprs.views.misc import api_login_required

  from coprs.views.apiv3_ns import apiv3_ns

- from coprs.logic.complex_logic import ComplexLogic

+ from coprs.logic.complex_logic import ComplexLogic, BuildConfigLogic

  from coprs.exceptions import ObjectNotFound, BadRequest

  from coprs import db, forms

  from coprs.logic.coprs_logic import CoprChrootsLogic
@@ -25,11 +24,11 @@ 

  

  

  def to_build_config_dict(project_chroot):

-     config = generate_build_config(project_chroot.copr, project_chroot.name)

+     config = BuildConfigLogic.generate_build_config(project_chroot.copr, project_chroot.name)

      return {

          "chroot": project_chroot.name,

          "repos": config["repos"],

-         "additional_repos": generate_additional_repos(project_chroot),

+         "additional_repos": BuildConfigLogic.generate_additional_repos(project_chroot),

          "additional_packages": (project_chroot.buildroot_pkgs or "").split(),

          "use_bootstrap_container": project_chroot.copr.use_bootstrap_container,

          "enable_net": project_chroot.copr.enable_net,

@@ -29,6 +29,7 @@ 

          "additional_repos": copr.repos_list,

          "enable_net": copr.build_enable_net,

          "use_bootstrap_container": copr.use_bootstrap_container,

+         "module_hotfixes": copr.module_hotfixes,

      }

  

  
@@ -128,6 +129,7 @@ 

              disable_createrepo=form.disable_createrepo.data,

              delete_after_days=form.delete_after_days.data,

              multilib=form.multilib.data,

+             module_hotfixes=form.module_hotfixes.data,

          )

          db.session.commit()

      except (DuplicateException,

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

  from coprs import exceptions

  from coprs.logic import actions_logic

  from coprs.logic.builds_logic import BuildsLogic

- from coprs.logic.complex_logic import ComplexLogic

+ from coprs.logic.complex_logic import ComplexLogic, BuildConfigLogic

  from coprs.logic.packages_logic import PackagesLogic

  from coprs.logic.coprs_logic import MockChrootsLogic

  from coprs.exceptions import MalformedArgumentException
@@ -119,7 +119,7 @@ 

          if short:

              return build_record

  

-         build_config = helpers.generate_build_config(task.build.copr, task.mock_chroot.name)

+         build_config = BuildConfigLogic.generate_build_config(task.build.copr, task.mock_chroot.name)

          build_record["repos"] = build_config.get("repos")

          build_record["buildroot_pkgs"] = build_config.get("additional_packages")

          build_record["use_bootstrap_container"] = build_config.get("use_bootstrap_container")

@@ -471,6 +471,7 @@ 

      copr.follow_fedora_branching = form.follow_fedora_branching.data

      copr.delete_after_days = form.delete_after_days.data

      copr.multilib = form.multilib.data

+     copr.module_hotfixes = form.module_hotfixes.data

      if flask.g.user.admin:

          copr.auto_prune = form.auto_prune.data

      else:

@@ -60,7 +60,7 @@ 

      def add(self, ownername, projectname, chroots, description=None, instructions=None, homepage=None,

              contact=None, additional_repos=None, unlisted_on_hp=False, enable_net=True, persistent=False,

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

-             delete_after_days=None, multilib=False):

+             delete_after_days=None, multilib=False, module_hotfixes=False):

          """

          Create a project

  
@@ -79,6 +79,8 @@ 

          :param bool use_bootstrap_container: if mock bootstrap container is used to initialize the buildroot

          :param bool devel_mode: if createrepo should run automatically

          :param int delete_after_days: delete the project after the specfied period of time

+         :param bool module_hotfixes: make packages from this project available

+                                      on along with packages from the active module streams.

          :return: Munch

          """

          endpoint = "/project/add/{ownername}"
@@ -101,6 +103,7 @@ 

              "devel_mode": devel_mode,

              "delete_after_days": delete_after_days,

              "multilib": multilib,

+             "module_hotfixes": module_hotfixes,

          }

          request = Request(endpoint, api_base_url=self.api_base_url, method=POST,

                            params=params, data=data, auth=self.auth)
@@ -110,7 +113,7 @@ 

      def edit(self, ownername, projectname, chroots=None, description=None, instructions=None, homepage=None,

               contact=None, additional_repos=None, unlisted_on_hp=None, enable_net=None,

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

-              delete_after_days=None, multilib=None):

+              delete_after_days=None, multilib=None, module_hotfixes=None):

          """

          Edit a project

  
@@ -128,6 +131,8 @@ 

          :param bool use_bootstrap_container: if mock bootstrap container is used to initialize the buildroot

          :param bool devel_mode: if createrepo should run automatically

          :param int delete_after_days: delete the project after the specfied period of time

+         :param bool module_hotfixes: make packages from this project available

+                                      on along with packages from the active module streams.

          :return: Munch

          """

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

              "devel_mode": devel_mode,

              "delete_after_days": delete_after_days,

              "multilib": multilib,

+             "module_hotfixes": module_hotfixes,

          }

          request = Request(endpoint, api_base_url=self.api_base_url, method=POST,

                            params=params, data=data, auth=self.auth)

file modified
+6
@@ -36,9 +36,15 @@ 

  metadata_expire=0

  cost=1

  best=1

+ 

  {%- if "priority" in repo %}

  priority={{ repo["priority"] }}

  {%- endif %}

+ 

+ {%- if "module_hotfixes" in repo %}

+ module_hotfixes={{ repo["module_hotfixes"] }}

+ {% endif -%}

+ 

  {% endfor %}

  """

  {% endif %}

Fix BZ 1758470

For this change, I needed to move generate_build_config to logic. I would recommend reviewing commit by commit.

Thanks!

  • please add some test for rpmbuild/frontend that the knob works
  • can we have the cli option? (the current implementation sucks, we need to make adding new options easier...)
  • before we'll sync the template, would you please fix also the copr mock-config (I can take a look later)

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

4 years ago

rebased onto 444659b679c2b29d42516f4fbeb9e07d4856cb59

4 years ago

APIv3 support and copr-cli mock-config support done, tests still missing.

5 new commits added

  • beaker-tests-sanity: add tests for module_hotfixes setting
  • frontend, cli, python: add APIv3 support for module_hotfixes
  • cli: module_hotfixes support for copr mock-config command
  • frontend, rpmbuild: allow marking a project as module_hotfixes
  • frontend: move `generate_build_config' from helpers to complex_logic
4 years ago

I've added also a beaker test, PTAL.

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

4 years ago

@schlupov asked how it looks like, so I am attaching a screenshot

Module hotfixes setting

I still miss the check that the generated end-user repofile contains the module hotfixes, otherwise looks fine to me.

5 new commits added

  • beaker-tests-sanity: add tests for module_hotfixes setting
  • frontend, cli, python: add APIv3 support for module_hotfixes
  • cli: module_hotfixes support for copr mock-config command
  • frontend, rpmbuild: allow marking a project as module_hotfixes
  • frontend: move `generate_build_config' from helpers to complex_logic
4 years ago

I still miss the check that the generated end-user repofile contains the module hotfixes, otherwise looks fine to me.

Good catch, I've added it here.

I've rebased just to squash the commit with the new test to the previous one. You don't have to review all over again.

+1, I wish we could have green beaker CI before merging such stuff...

Needs a rebase to make ./build_aux/check-alembic-revisions pass again.

rebased onto 150a2ab

4 years ago

I've fixed the migration hash, the ./frontend/build_aux/check-alembic-revisions works fine now and I've rebased the branch from master, so now I can probably merge via UI.

Pull-Request has been merged by frostyx

4 years ago

make packages from this project available on along with packages from the active module streams

This sentence, used in several places in this pull request, is not grammatically correct. Seems like it's missing a word in the portion that I marked in bold. Not sure what it means.

You are right @kenyon, the description doesn't make much sense.
Do you think this one is better?
https://github.com/fedora-copr/copr/pull/2443

Metadata