#695 blacklist tags for kojira
Merged 4 years ago by mikem. Opened 4 years ago by tkopecek.
tkopecek/koji issue694  into  master

file modified
+11 -1
@@ -532,6 +532,14 @@ 

          #find out which tags require repos

          tags = {}

          for target in self.session.getBuildTargets():

+             ignore = False

+             for pat in self.options.ignore_tags.split():

+                 if fnmatch.fnmatch(target['build_tag'], pat):

+                     ignore = True

+                     break

+             if ignore:

+                 self.logger.debug("Ignoring repo %s" % target['build_tag'])

+                 continue

              tag_id = target['build_tag']

              tags[tag_id] = target['build_tag_name']

          #index repos by tag
@@ -728,6 +736,7 @@ 

      defaults = {'with_src': False,

                  'debuginfo_tags': '',

                  'source_tags': '',

+                 'ignore_tags': '',

                  'verbose': False,

                  'debug': False,

                  'ignore_stray_repos': False,
@@ -765,7 +774,8 @@ 

                      'max_delete_processes', 'max_repo_tasks_maven',

                      'delete_batch_size', 'dist_repo_lifetime')

          str_opts = ('topdir', 'server', 'user', 'password', 'logfile', 'principal', 'keytab', 'krbservice',

-                     'cert', 'ca', 'serverca', 'debuginfo_tags', 'source_tags')  # FIXME: remove ca here

+                     'cert', 'ca', 'serverca', 'debuginfo_tags',

+                     'source_tags', 'ignore_tags')  # FIXME: remove ca here

          bool_opts = ('with_src','verbose','debug','ignore_stray_repos', 'offline_retry',

                       'krb_rdns', 'krb_canon_host', 'use_old_ssl', 'no_ssl_verify')

          for name in config.options(section):

file modified
+3
@@ -48,3 +48,6 @@ 

  

  ;turn on debugging statements in the log

  ;debug = false

+ 

+ ; ignored repositories according to glob. Multiple masks separated by space.

+ ; ignore_tags =

:thumbsup: Looks good to me!

rebased onto 4a5d70081fdf371f6d0cb35505a63b0f8abb284a

4 years ago

I've moved test to earlier place.

This is not the right place to check. You're filtering active repo data from the hub -- kojira will still make repos for the ignored tags, and then ignore that they exist and make more. Instead, you should filter up updateRepos where the code decides which tags need repos.

rebased onto 7d037d9

4 years ago

Conflicts with #797

I've made adjustments here: https://github.com/mikem23/koji-playground/commits/pagure/pr/695

If that looks ok, I can merge from there

Works for me :thumbsup:

Commit 50c28bb fixes this pull-request

Pull-Request has been merged by mikem

4 years ago