2d1a806 Allow using regexp in routing_rules

2 files Authored by jkaluza 5 months ago , Committed by lsedlar 5 months ago ,
    Allow using regexp in routing_rules
    
    There is a need to route different raw_config sources to different
    backends. For example, there might be different backend for CI
    and production raw_config composes.
    
    Currently, this is not possible, because compose tasks can be only
    routed according to complete `Compose.source` value, but for raw_config
    composes, this value would be in `raw_config_name#commit_hash` format.
    
    In this commit, `routing_rules` can contain regexps, so it is possible
    to use following configuration:
    
    ```
    "routing_rules": {
        "odcs.server.celery_tasks.generate_pungi_compose": {
            "production_queue": {
                "source_type": 3,
                "source": "^prod-fedora#.*",
            },
            "ci_queue": {
                "source_type": 3,
                "source": "^ci-fedora#.*",
            },
        },
    },
    ```
    
    Merges: https://pagure.io/odcs/pull-request/322