#962 Support the modulemd buildopts.rpms.whitelist option
Merged a year ago by mprahl. Opened a year ago by mprahl.

file modified
+1 -1

@@ -38,7 +38,7 @@ 


          stage('Run Test Suite') {

              timeout(20) {

-                 onmyduffynode 'cd fm-orchestrator && docker run -v $PWD:/src:Z mbs/test'

+                 onmyduffynode 'docker run -v ~/fm-orchestrator:/src:Z mbs/test'




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

          self.module_build_tag = self._koji_create_tag(

              self.tag_name + "-build", self.arches, perm="admin")


-         self._koji_whitelist_packages(self.components)

+         self._koji_whitelist_packages(

+             self.mmd.props.buildopts.props.rpm_whitelist or self.components)


          # If we have just created the build tag in this buildroot_connect call, block all

          # the components in `blocked_packages` list. We want to do that just once, because

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

          assert weights == {"httpd": 1.5, "apr": 1.5}


      @pytest.mark.parametrize('blocklist', [False, True])

-     def test_buildroot_connect(self, blocklist):

+     @pytest.mark.parametrize('custom_whitelist', [False, True])

+     def test_buildroot_connect(self, custom_whitelist, blocklist):

          if blocklist:

              mmd = self.module.mmd()

              xmd = glib.from_variant_dict(mmd.get_xmd())

@@ -421,6 +422,13 @@ 


              self.module.modulemd = mmd.dumps()


+         if custom_whitelist:

+             mmd = self.module.mmd()

+             opts = mmd.get_buildopts()

+             opts.set_rpm_whitelist(['custom1', 'custom2'])

+             mmd.set_buildopts(opts)

+             self.module.modulemd = mmd.dumps()


          builder = FakeKojiModuleBuilder(

              owner=self.module.owner, module=self.module, config=conf, tag_name='module-foo',


@@ -431,8 +439,18 @@ 

          groups['srpm-build'] = set(["fedora-release"])



-         expected_calls = [mock.call('module-foo', 'nginx', u'Moe Szyslak'),

-                           mock.call('module-foo-build', 'nginx', u'Moe Szyslak')]

+         if custom_whitelist:

+             expected_calls = [

+                 mock.call('module-foo', 'custom1', 'Moe Szyslak'),

+                 mock.call('module-foo', 'custom2', 'Moe Szyslak'),

+                 mock.call('module-foo-build', 'custom1', 'Moe Szyslak'),

+                 mock.call('module-foo-build', 'custom2', 'Moe Szyslak')

+             ]

+         else:

+             expected_calls = [

+                 mock.call('module-foo', 'nginx', 'Moe Szyslak'),

+                 mock.call('module-foo-build', 'nginx', 'Moe Szyslak')

+             ]

          assert session.packageListAdd.mock_calls == expected_calls


          expected_calls = [mock.call('module-foo-build', 'build'),

Addresses FACTORY-2611

Nice! Straightforward patch.

:+1: to merge in whatever order you think you can Matt.

  • You could wait for the libmodulemd update to go stable so you can revert the Dockerfile change, but then we have to wait for the libmodulemd update before even starting the mbs update process.
  • Is there any way to get a jump on the mbs update process before libmodulemd goes stable so we don't have to serialize those two wait times?

@jwboyer is eager to see this one land to unblock some other folks. :)

FWIW - if we hardcode the rpm NVR url in the dockerfile, our test suite here could count towards a karma +1 on their latest libmodulemd bodhi update. ;)

rebased onto cc568003463f8d47d7506df4f2b053ed72907b27

a year ago

1 new commit added

  • Fix the Docker volume mount for running the tests using Jenkins
a year ago

@ralph thanks for the review. I updated the libmodulemd version and the tests still pass at:

I +1'd the Bodhi update. If we don't want to wait for Bodhi to push libmodulemd to stable, we could tag the libmodulemd build so that it goes into the epel7Server-infra repo. If we do that, we can also remove the hard-coded value in the Dockerfile in this PR since we use that repo as part of the tests.

(Once merged, no need to wait for any other PRs to land first. Let's get the release machine rolling for this one.)

It just got submitted to stable earlier today, so we'll have to wait until tomorrow for it to be synced to the mirrors.

rebased onto 74e4c99

a year ago

2 new commits added

  • Fix the Docker volume mount for running the tests using Jenkins
  • Support the modulemd buildopts.rpms.whitelist option
a year ago

Okay this now passing with the libmodulemd in stable at:

I'll merge this.

Commit 6e07595 fixes this pull-request

Pull-Request has been merged by mprahl

a year ago

Pull-Request has been merged by mprahl

a year ago