├── tests ├── __init__.py ├── conftest.py ├── test_schemas.py └── samples.py ├── .cico.pipeline ├── bugzilla2fedmsg_schema ├── __init__.py ├── utils.py └── schema.py ├── MANIFEST.in ├── .github ├── renovate.json └── workflows │ └── main.yml ├── .gitignore ├── README.md ├── CHANGELOG.md ├── tox.ini ├── pyproject.toml └── LICENSE /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.cico.pipeline: -------------------------------------------------------------------------------- 1 | fedoraInfraTox { } 2 | -------------------------------------------------------------------------------- /bugzilla2fedmsg_schema/__init__.py: -------------------------------------------------------------------------------- 1 | from .schema import MessageV1, MessageV1BZ4 2 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.md 2 | include LICENSE 3 | include tox.ini 4 | graft tests 5 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["local>fedora-infra/shared:renovate-config"] 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.egg-info 3 | *.egg* 4 | fedora-messaging.toml 5 | dist 6 | build 7 | *.crt 8 | *.key 9 | *.gpg 10 | .tox 11 | .coverage 12 | htmlcov 13 | coverage.xml 14 | venv 15 | .venv 16 | .vagrant 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fedora Messaging schemas for bugzilla2fedmsg 2 | 3 | This repo contains the Fedora Messaging schemas for 4 | [bugzilla2fedmsg](https://github.com/fedora-infra/bugzilla2fedmsg), usable by 5 | bugzilla2fedmsg itself and all the apps that consume these messages. 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | 4 | 5 | ## Version 1.1.0 6 | 7 | - Bugzilla2Fedmsg now does the FAS conversion [56d4abd](https://github.com/fedora-infra/bugzilla2fedmsg-schema/commit/56d4abd7df5e135515819c491168aa86ba0f593d>) 8 | - Update dependencies 9 | 10 | 11 | ## Version 1.0.0 12 | 13 | - Initial release split off the main bugzilla2fedmsg package. 14 | -------------------------------------------------------------------------------- /bugzilla2fedmsg_schema/utils.py: -------------------------------------------------------------------------------- 1 | """This contains utils to parse the message.""" 2 | 3 | 4 | def comma_join(fields, oxford=True): 5 | """Join together words.""" 6 | 7 | def fmt(field): 8 | return f"'{field}'" 9 | 10 | if not fields: 11 | # unfortunately this happens: we get 'modify' messages with no 12 | # 'changes', so we don't know what changed 13 | return "something unknown" 14 | elif len(fields) == 1: 15 | return fmt(fields[0]) 16 | elif len(fields) == 2: 17 | return " and ".join([fmt(f) for f in fields]) 18 | else: 19 | result = ", ".join([fmt(f) for f in fields[:-1]]) 20 | if oxford: 21 | result += "," 22 | result += f" and {fmt(fields[-1])}" 23 | return result 24 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = lint,format,py39,py310,py311,py312,diff-cover 3 | minversion = 3.10.0 4 | isolated_build = true 5 | # If the user is missing an interpreter, don't fail 6 | skip_missing_interpreters = True 7 | 8 | [testenv] 9 | skip_install = true 10 | allowlist_externals = 11 | poetry 12 | commands_pre = 13 | poetry install --all-extras 14 | commands = 15 | poetry run pytest --cov --cov-report term-missing --cov-report xml --cov-report html {posargs:tests} 16 | # When running in OpenShift you don't have a username, so expanduser 17 | # won't work. If you are running your tests in CentOS CI, this line is 18 | # important so the tests can pass there, otherwise tox will fail to find 19 | # a home directory when looking for configuration files. 20 | passenv = HOME 21 | 22 | [testenv:diff-cover] 23 | commands = 24 | poetry run diff-cover coverage.xml --compare-branch=origin/main --fail-under=100 25 | 26 | [testenv:lint] 27 | commands = 28 | poetry run ruff check {posargs:.} 29 | 30 | [testenv:format] 31 | commands = 32 | poetry run black --check {posargs:.} 33 | 34 | 35 | [flake8] 36 | max-line-length = 100 37 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | """Test fixtures for bugzilla2fedmsg.relay. 2 | 3 | Authors: Adam Williamson 4 | 5 | """ 6 | 7 | import pytest 8 | 9 | from .samples import ( 10 | ATTACHMENT_CREATE_MESSAGE_BZ4, 11 | ATTACHMENT_CREATE_MESSAGE_NOBZ4, 12 | ATTACHMENT_MODIFY_MESSAGE_BZ4, 13 | ATTACHMENT_MODIFY_MESSAGE_NO_BZ4, 14 | BUG_CREATE_MESSAGE_BZ4, 15 | BUG_CREATE_MESSAGE_NO_BZ4, 16 | BUG_MODIFY_FOUR_CHANGES_MESSAGE_BZ4, 17 | BUG_MODIFY_FOUR_CHANGES_MESSAGE_NO_BZ4, 18 | BUG_MODIFY_MESSAGE_BZ4, 19 | BUG_MODIFY_MESSAGE_NO_BZ4, 20 | BUG_MODIFY_TWO_CHANGES_MESSAGE_BZ4, 21 | BUG_MODIFY_TWO_CHANGES_MESSAGE_NO_BZ4, 22 | COMMENT_CREATE_MESSAGE_BZ4, 23 | COMMENT_CREATE_MESSAGE_NO_BZ4, 24 | ) 25 | 26 | 27 | @pytest.fixture(params=[BUG_CREATE_MESSAGE_NO_BZ4, BUG_CREATE_MESSAGE_BZ4]) 28 | def bug_create_message(request): 29 | return request.param 30 | 31 | 32 | @pytest.fixture(params=[BUG_MODIFY_MESSAGE_NO_BZ4, BUG_MODIFY_MESSAGE_BZ4]) 33 | def bug_modify_message(request): 34 | return request.param 35 | 36 | 37 | @pytest.fixture( 38 | params=[BUG_MODIFY_FOUR_CHANGES_MESSAGE_NO_BZ4, BUG_MODIFY_FOUR_CHANGES_MESSAGE_BZ4] 39 | ) 40 | def bug_modify_four_changes_message(request): 41 | return request.param 42 | 43 | 44 | @pytest.fixture(params=[BUG_MODIFY_TWO_CHANGES_MESSAGE_NO_BZ4, BUG_MODIFY_TWO_CHANGES_MESSAGE_BZ4]) 45 | def bug_modify_two_changes_message(request): 46 | return request.param 47 | 48 | 49 | @pytest.fixture(params=[COMMENT_CREATE_MESSAGE_NO_BZ4, COMMENT_CREATE_MESSAGE_BZ4]) 50 | def comment_create_message(request): 51 | return request.param 52 | 53 | 54 | @pytest.fixture(params=[ATTACHMENT_CREATE_MESSAGE_NOBZ4, ATTACHMENT_CREATE_MESSAGE_BZ4]) 55 | def attachment_create_message(request): 56 | return request.param 57 | 58 | 59 | @pytest.fixture(params=[ATTACHMENT_MODIFY_MESSAGE_NO_BZ4, ATTACHMENT_MODIFY_MESSAGE_BZ4]) 60 | def attachment_modify_message(request): 61 | return request.param 62 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "bugzilla2fedmsg-schema" 3 | version = "1.1.0" 4 | description = "Fedora Messaging schemas for bugzilla2fedmsg" 5 | authors = ["Fedora Infrastructure "] 6 | license = "LGPL-2.1-or-later" 7 | readme = "README.md" 8 | homepage = "https://github.com/fedora-infra/bugzilla2fedmsg-schema" 9 | repository = "https://github.com/fedora-infra/bugzilla2fedmsg-schema.git" 10 | packages = [{include = "bugzilla2fedmsg_schema"}] 11 | keywords = ["fedora-messaging"] 12 | classifiers = [ 13 | "Development Status :: 5 - Production/Stable", 14 | "Intended Audience :: System Administrators", 15 | "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", 16 | "Programming Language :: Python :: 3", 17 | "Programming Language :: Python :: 3.9", 18 | "Programming Language :: Python :: 3.10", 19 | "Programming Language :: Python :: 3.11", 20 | "Programming Language :: Python :: 3.12", 21 | "Operating System :: POSIX :: Linux", 22 | "Topic :: Communications", 23 | "Topic :: Software Development :: Libraries :: Python Modules", 24 | ] 25 | include = [ 26 | { path = "tox.ini", format = "sdist" }, 27 | { path = "tests", format = "sdist" }, 28 | ] 29 | 30 | [tool.poetry.dependencies] 31 | python = "^3.9.0" 32 | fedora-messaging = "^3.2.0" 33 | 34 | [tool.poetry.group.dev.dependencies] 35 | pytest = ">=7.0.0" 36 | pytest-cov = ">=4.0.0" 37 | black = ">=23.10.0" 38 | ruff = ">=0.1.1" 39 | coverage = {extras = ["toml"], version = ">=7.0.0"} 40 | diff-cover = "^8.0.0 || ^9.0.0 || ^10.0.0" 41 | 42 | [tool.poetry.plugins."fedora.messages"] 43 | "bugzilla2fedmsg.messageV1bz4" = "bugzilla2fedmsg_schema.schema:MessageV1BZ4" 44 | "bugzilla2fedmsg.messageV1" = "bugzilla2fedmsg_schema.schema:MessageV1" 45 | 46 | [build-system] 47 | requires = ["poetry-core"] 48 | build-backend = "poetry.core.masonry.api" 49 | 50 | [tool.black] 51 | line-length = 100 52 | 53 | [tool.ruff] 54 | line-length = 100 55 | 56 | [tool.ruff.lint] 57 | select = ["E", "F", "W", "I", "UP", "S", "B", "RUF"] 58 | ignore = ["RUF012"] 59 | 60 | [tool.ruff.lint.per-file-ignores] 61 | "tests/*" = ["S101", "E501"] 62 | "bugzilla2fedmsg_schema/__init__.py" = ["F401"] 63 | 64 | [tool.coverage.run] 65 | # Track what conditional branches are covered. 66 | branch = true 67 | source = [ 68 | "bugzilla2fedmsg_schema", 69 | ] 70 | 71 | [tool.coverage.report] 72 | # Fail if the coverage is not 85% 73 | fail_under = 85 74 | # Display results with up 1/100th of a percent accuracy. 75 | precision = 2 76 | exclude_lines = [ 77 | "pragma: no cover", 78 | 79 | # Don't complain if tests don't hit defensive assertion code 80 | "raise AssertionError", 81 | "raise NotImplementedError", 82 | 83 | "if __name__ == .__main__.:", 84 | ] 85 | omit = [ 86 | "tests/*", 87 | ] 88 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | pull_request: 4 | 5 | name: Tests & Release 6 | 7 | jobs: 8 | tests-misc: 9 | name: Misc tests 10 | runs-on: ubuntu-latest 11 | container: fedorapython/fedora-python-tox:latest 12 | steps: 13 | - uses: actions/checkout@v6 14 | - name: Install dependencies 15 | run: | 16 | dnf install -y git tox libffi-devel 17 | pip install poetry>=1.2 18 | - name: Mark the working directory as safe for Git 19 | run: git config --global --add safe.directory $PWD 20 | - name: Run tests 21 | run: tox -e ${{ matrix.tox_env }} 22 | strategy: 23 | matrix: 24 | tox_env: 25 | - lint 26 | - format 27 | 28 | tests-unit: 29 | name: Unit tests 30 | runs-on: ubuntu-latest 31 | container: fedorapython/fedora-python-tox:latest 32 | steps: 33 | - uses: actions/checkout@v6 34 | with: 35 | # Needed for diff-cover 36 | fetch-depth: 0 37 | - name: Install dependencies 38 | run: | 39 | dnf install -y git tox libffi-devel 40 | pip install poetry>=1.2 41 | - name: Mark the working directory as safe for Git 42 | run: git config --global --add safe.directory $PWD 43 | - name: Run tests 44 | run: tox -e ${{ matrix.tox_env }},diff-cover 45 | strategy: 46 | matrix: 47 | tox_env: 48 | - py39 49 | - py310 50 | - py311 51 | - py312 52 | 53 | # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ 54 | build: 55 | name: Build distribution 📦 56 | runs-on: ubuntu-latest 57 | needs: 58 | - tests-unit 59 | - tests-misc 60 | steps: 61 | - uses: actions/checkout@v6 62 | - name: Set up Python 63 | uses: actions/setup-python@v6 64 | with: 65 | python-version: "3.x" 66 | - name: Install pypa/build 67 | run: python3 -m pip install build --user 68 | - name: Build a binary wheel and a source tarball 69 | run: python3 -m build 70 | - name: Store the distribution packages 71 | uses: actions/upload-artifact@v6 72 | with: 73 | name: python-package-distributions 74 | path: dist/ 75 | 76 | publish-to-pypi: 77 | name: Publish to PyPI 🚀 78 | if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc') # only publish to PyPI on final tag pushes 79 | needs: 80 | - build 81 | runs-on: ubuntu-latest 82 | environment: 83 | name: pypi 84 | url: https://pypi.org/p/bugzilla2fedmsg-schema 85 | permissions: 86 | id-token: write # IMPORTANT: mandatory for trusted publishing 87 | steps: 88 | - name: Download all the dists 89 | uses: actions/download-artifact@v7 90 | with: 91 | name: python-package-distributions 92 | path: dist/ 93 | - name: Publish distribution to PyPI 94 | uses: pypa/gh-action-pypi-publish@release/v1 95 | 96 | github-release: 97 | name: Create a GitHub Release 📢 98 | needs: 99 | - publish-to-pypi 100 | runs-on: ubuntu-latest 101 | 102 | permissions: 103 | contents: write # IMPORTANT: mandatory for making GitHub Releases 104 | id-token: write # IMPORTANT: mandatory for sigstore 105 | 106 | steps: 107 | - name: Download all the dists 108 | uses: actions/download-artifact@v7 109 | with: 110 | name: python-package-distributions 111 | path: dist/ 112 | - name: Sign the dists with Sigstore 113 | uses: sigstore/gh-action-sigstore-python@v3.2.0 114 | with: 115 | inputs: >- 116 | ./dist/*.tar.gz 117 | ./dist/*.whl 118 | - name: Release 119 | uses: softprops/action-gh-release@v2 120 | with: 121 | draft: true 122 | files: dist/* 123 | fail_on_unmatched_files: true 124 | generate_release_notes: true 125 | -------------------------------------------------------------------------------- /tests/test_schemas.py: -------------------------------------------------------------------------------- 1 | """Tests for bugzilla2fedmsg_schemas. 2 | 3 | Authors: Adam Williamson 4 | 5 | """ 6 | 7 | from jsonschema.exceptions import ValidationError 8 | 9 | from bugzilla2fedmsg_schema import MessageV1BZ4 10 | 11 | 12 | class TestSchemas: 13 | def test_bug_create_schema(self, bug_create_message): 14 | """Check bug.create message schema bits.""" 15 | message = bug_create_message 16 | message.validate() 17 | assert message.assigned_to_email == "lvrabec@redhat.com" 18 | assert message.component_name == "selinux-policy" 19 | assert message.product_name == "Fedora" 20 | assert ( 21 | message.summary 22 | == "dgunchev filed a new bug RHBZ#1701391 'SELinux is preventing touch from 'write'...'" 23 | ) 24 | assert ( 25 | str(message) 26 | == "dgunchev filed a new bug RHBZ#1701391 'SELinux is preventing touch from 'write'...'" 27 | ) 28 | assert message.url == "https://bugzilla.redhat.com/show_bug.cgi?id=1701391" 29 | assert ( 30 | message.app_icon 31 | == "https://bugzilla.redhat.com/extensions/RedHat/web/css/favicon.ico?v=0" 32 | ) 33 | assert message.agent_name == "dgunchev" 34 | assert message.app_name == "Bugzilla" 35 | # broken till we can do email2fas 36 | assert message.usernames == [] 37 | assert message.packages == ["selinux-policy"] 38 | assert ( 39 | message.agent_avatar 40 | == "https://seccdn.libravatar.org/avatar/d4bfc5ec5260361c930aad299c8e14fe03af45109ea88e880a191851b8c83e7f?s=64&d=retro" 41 | ) 42 | 43 | def test_bug_modify_schema(self, bug_modify_message): 44 | """Check bug.modify message schema bits.""" 45 | message = bug_modify_message 46 | # this should not raise an exception 47 | message.validate() 48 | assert ( 49 | message.summary 50 | == "churchyard updated 'cc' on RHBZ#1699203 'python-pyramid-1.10.4 is available'" 51 | ) 52 | assert message.usernames == ["churchyard", "upstream-release-monitoring", "adamw"] 53 | 54 | def test_bug_modify_four_changes_schema(self, bug_modify_four_changes_message): 55 | """Check bug.modify message schema bits when the message 56 | includes four changes (this exercises comma_join). 57 | """ 58 | message = bug_modify_four_changes_message 59 | # this should not raise an exception 60 | message.validate() 61 | assert ( 62 | message.summary 63 | == "zebob.m@gmail.com updated 'assigned_to', 'bug_status', 'cc', and 'flag.needinfo' on RHBZ#1702701 'Review Request: perl-Class-AutoClass - D...'" 64 | ) 65 | 66 | def test_bug_modify_two_changes_schema(self, bug_modify_two_changes_message): 67 | """Check bug.modify message schema bits when the message 68 | includes two changes (this exercises a slightly different 69 | comma_join path). 70 | """ 71 | message = bug_modify_two_changes_message 72 | # this should not raise an exception 73 | message.validate() 74 | assert ( 75 | message.summary 76 | == "zebob.m@gmail.com updated 'assigned_to' and 'bug_status' on RHBZ#1702701 'Review Request: perl-Class-AutoClass - D...'" 77 | ) 78 | 79 | def test_bug_modify_no_changes_schema(self, bug_modify_message): 80 | """Check bug.modify message schema bits when event is missing 81 | 'changes' - we often get messages like this, for some reason. 82 | """ 83 | message = bug_modify_message 84 | # wipe the 'changes' dict from the sample message, to simulate 85 | # one of these broken messages 86 | del message.body["event"]["changes"] 87 | # this should not raise an exception 88 | message.validate() 89 | assert ( 90 | message.summary 91 | == "churchyard updated something unknown on RHBZ#1699203 'python-pyramid-1.10.4 is available'" 92 | ) 93 | 94 | def test_comment_create_schema(self, comment_create_message): 95 | """Check comment.create message schema bits.""" 96 | message = comment_create_message 97 | # this should not raise an exception 98 | message.validate() 99 | assert ( 100 | message.summary 101 | == "smooge@redhat.com added comment on RHBZ#1691487 'openQA transient test failure as duplica...'" 102 | ) 103 | 104 | def test_attachment_create_schema(self, attachment_create_message): 105 | """Check attachment.create message schema bits.""" 106 | message = attachment_create_message 107 | # this should not raise an exception 108 | message.validate() 109 | assert ( 110 | message.summary 111 | == "peter@sonniger-tag.eu added attachment on RHBZ#1701353 '[abrt] gnome-software: gtk_widget_unpare...'" 112 | ) 113 | 114 | def test_attachment_modify_schema(self, attachment_modify_message): 115 | """Check attachment.modify message schema bits.""" 116 | message = attachment_modify_message 117 | # this should not raise an exception 118 | message.validate() 119 | assert ( 120 | message.summary 121 | == "joequant@gmail.com updated 'isobsolete' for attachment on RHBZ#1701766 'I2C_HID_QUIRK_NO_IRQ_AFTER_RESET caused ...'" 122 | ) 123 | 124 | def test_attachment_modify_no_changes_schema(self, attachment_modify_message): 125 | """Check attachment.modify message schema bits when event is 126 | missing 'changes' - unlike the bug.modify case I have not 127 | actually seen a message like this in the wild, but we do 128 | handle it just in case. 129 | """ 130 | message = attachment_modify_message 131 | # wipe the 'changes' dict from the sample message, to simulate 132 | # one of these broken messages 133 | del message.body["event"]["changes"] 134 | # this should not raise an exception 135 | message.validate() 136 | assert ( 137 | message.summary 138 | == "joequant@gmail.com updated something unknown for attachment on RHBZ#1701766 'I2C_HID_QUIRK_NO_IRQ_AFTER_RESET caused ...'" 139 | ) 140 | 141 | def test_component_not_package_schema(self, bug_create_message): 142 | """Check we filter out components that aren't packages.""" 143 | # adjust the component in the sample message to one we should 144 | # filter out 145 | message = bug_create_message 146 | if isinstance(message, MessageV1BZ4): 147 | message.body["bug"]["component"] = "distribution" 148 | else: 149 | message.body["bug"]["component"]["name"] = "distribution" 150 | # this should not raise an exception 151 | message.validate() 152 | assert message.packages == [] 153 | 154 | def test_bug_no_qa_contact(self, bug_create_message): 155 | """Check bug.create message schema bits when qa_contact is None.""" 156 | message = bug_create_message 157 | message.body["bug"]["qa_contact"] = None 158 | # this should not raise an exception 159 | try: 160 | message.validate() 161 | except ValidationError as e: 162 | raise AssertionError(e) from e 163 | assert message.bug["qa_contact"] is None 164 | -------------------------------------------------------------------------------- /bugzilla2fedmsg_schema/schema.py: -------------------------------------------------------------------------------- 1 | """fedora-messaging schema for bugzilla2fedmsg.""" 2 | 3 | import copy 4 | import typing 5 | 6 | from fedora_messaging import message 7 | from fedora_messaging.schema_utils import libravatar_url 8 | 9 | from .utils import comma_join 10 | 11 | 12 | class BaseMessage(message.Message): 13 | """ 14 | Base message class for all message versions and variants. 15 | """ 16 | 17 | def __str__(self): 18 | """We just use the summary for now.""" 19 | return self.summary 20 | 21 | @property 22 | def summary(self): 23 | """A summary of the message.""" 24 | user = self.agent_name or self._primary_email 25 | idx = self.bug["id"] 26 | title = self.bug["summary"] 27 | action = self.body["event"]["action"] 28 | target = self.body["event"]["target"] 29 | 30 | if len(title) > 40: 31 | title = title[:40] + "..." 32 | 33 | if target == "bug" and action == "create": 34 | tmpl = "{user} filed a new bug RHBZ#{idx} '{title}'" 35 | return tmpl.format(user=user, idx=idx, title=title) 36 | 37 | elif self.body["event"]["action"] == "create": 38 | tmpl = "{user} added {target} on RHBZ#{idx} '{title}'" 39 | return tmpl.format(user=user, target=target, idx=idx, title=title) 40 | 41 | # at this point 'action' must be "modify": we're modifying the 42 | # target 43 | fields = [d["field"] for d in self.body["event"].get("changes", [])] 44 | fields = comma_join(fields) 45 | if target == "bug": 46 | tmpl = "{user} updated {fields} on RHBZ#{idx} '{title}'" 47 | return tmpl.format(user=user, fields=fields, idx=idx, title=title) 48 | tmpl = "{user} updated {fields} for {target} on RHBZ#{idx} '{title}'" 49 | return tmpl.format(user=user, fields=fields, target=target, idx=idx, title=title) 50 | 51 | @property 52 | def url(self): 53 | """The URL for the bug. 54 | 55 | Returns: 56 | str: A relevant URL. 57 | """ 58 | return "https://bugzilla.redhat.com/show_bug.cgi?id={}".format(self.bug["id"]) 59 | 60 | @property 61 | def app_icon(self): 62 | """An URL to the icon of the application that generated the message.""" 63 | return "https://bugzilla.redhat.com/extensions/RedHat/web/css/favicon.ico?v=0" 64 | 65 | @property 66 | def usernames(self): 67 | """List of users affected by the action that generated this message.""" 68 | return self.body.get("usernames", []) 69 | 70 | @property 71 | def packages(self): 72 | """List of packages affected by the action that generated this message.""" 73 | compname = self.component_name 74 | # these are Bugzilla components that are not Fedora packages 75 | # add any more you can think of 76 | notpackages = [ 77 | "distribution", 78 | "LiveCD", 79 | "LiveCD - FEL", 80 | "LiveCD - Games", 81 | "LiveCD - KDE", 82 | "LiveCD - LXDE", 83 | "LiveCD - Xfce", 84 | "Package Review", 85 | ] 86 | if compname in notpackages: 87 | return [] 88 | return [compname] 89 | 90 | @property 91 | def agent_avatar(self): 92 | """URL to the avatar of the user who caused the action.""" 93 | return libravatar_url(self._primary_email) 94 | 95 | @property 96 | def _primary_email(self): 97 | """The email for the primary user associated with the action 98 | that generated this message. 99 | """ 100 | return self.body["event"]["user"]["login"] 101 | 102 | @property 103 | def agent_name(self): 104 | """Return the name of the user who reported the bug message""" 105 | return self.body.get("agent_name") 106 | 107 | @property 108 | def app_name(self): 109 | return "Bugzilla" 110 | 111 | 112 | class MessageV1(BaseMessage): 113 | """ 114 | A sub-class of a Fedora message that defines a message schema for messages 115 | published by Bugzilla. This schema is accurate for messages emitted since 116 | bugzilla2fedmsg commit 08b3e0c5 with Bugzilla 4 compatibility DISABLED. 117 | """ 118 | 119 | body_schema: typing.ClassVar = { 120 | "id": "http://fedoraproject.org/message-schema/bugzilla2fedmsg#", 121 | "$schema": "http://json-schema.org/draft-04/schema#", 122 | "description": "Schema for message sent by Bugzilla (v1, BZ4 compat disabled)", 123 | "type": "object", 124 | "properties": { 125 | "bug": { 126 | "description": "An object representing the relevant bug itself", 127 | "type": "object", 128 | "properties": { 129 | "alias": {"type": "array"}, 130 | "assigned_to": { 131 | "type": "object", 132 | "properties": { 133 | "id": {"type": "number"}, 134 | "login": {"type": "string"}, 135 | "real_name": {"type": "string"}, 136 | }, 137 | }, 138 | "classification": {"type": "string"}, 139 | "component": { 140 | "type": "object", 141 | "properties": { 142 | "id": {"type": "number"}, 143 | "name": {"type": "string"}, 144 | }, 145 | }, 146 | "creation_time": {"type": "number"}, 147 | "flags": {"type": "array"}, 148 | "id": {"type": "number"}, 149 | "is_private": {"type": "boolean"}, 150 | "keywords": {"type": "array"}, 151 | "last_change_time": {"type": "number"}, 152 | "operating_system": {"type": "string"}, 153 | "platform": {"type": "string"}, 154 | "priority": {"type": "string"}, 155 | "product": { 156 | "type": "object", 157 | "properties": { 158 | "id": {"type": "number"}, 159 | "name": {"type": "string"}, 160 | }, 161 | }, 162 | "qa_contact": { 163 | "anyOf": [ 164 | { 165 | "type": "object", 166 | "properties": { 167 | "id": {"type": "number"}, 168 | "login": {"type": "string"}, 169 | "real_name": {"type": "string"}, 170 | }, 171 | }, 172 | {"type:": "null"}, 173 | ], 174 | }, 175 | "reporter": { 176 | "type": "object", 177 | "properties": { 178 | "id": {"type": "number"}, 179 | "login": {"type": "string"}, 180 | "real_name": {"type": "string"}, 181 | }, 182 | }, 183 | "resolution": {"type": "string"}, 184 | "severity": {"type": "string"}, 185 | "status": { 186 | "type": "object", 187 | "properties": { 188 | "id": {"type": "number"}, 189 | "name": {"type": "string"}, 190 | }, 191 | }, 192 | "summary": {"type": "string"}, 193 | "url": {"type": "string"}, 194 | "version": { 195 | "type": "object", 196 | "properties": { 197 | "id": {"type": "number"}, 198 | "name": {"type": "string"}, 199 | }, 200 | }, 201 | "whiteboard": {"type": "string"}, 202 | }, 203 | "required": [ 204 | "alias", 205 | "assigned_to", 206 | "classification", 207 | "component", 208 | "creation_time", 209 | "flags", 210 | "id", 211 | "is_private", 212 | "keywords", 213 | "last_change_time", 214 | "operating_system", 215 | "platform", 216 | "priority", 217 | "product", 218 | "qa_contact", 219 | "reporter", 220 | "resolution", 221 | "severity", 222 | "status", 223 | "summary", 224 | "url", 225 | "version", 226 | "whiteboard", 227 | ], 228 | }, 229 | "event": { 230 | "description": "An object representing the event the message relates to", 231 | "type": "object", 232 | "properties": { 233 | "action": {"type": "string"}, 234 | "bug_id": {"type": "number"}, 235 | "changes": {"type": "array"}, 236 | "change_set": {"type": "string"}, 237 | "routing_key": {"type": "string"}, 238 | "rule_id": {"type": "number"}, 239 | "target": {"type": "string"}, 240 | "time": {"type": "number"}, 241 | "user": { 242 | "type": "object", 243 | "properties": { 244 | "id": {"type": "number"}, 245 | "login": {"type": "string"}, 246 | "real_name": {"type": "string"}, 247 | }, 248 | }, 249 | }, 250 | "required": [ 251 | "action", 252 | "bug_id", 253 | "change_set", 254 | "routing_key", 255 | "target", 256 | "time", 257 | "user", 258 | ], 259 | }, 260 | "comment": { 261 | "description": "An object representing a comment affected by the event", 262 | "type": "object", 263 | "properties": { 264 | "body": {"type": "string"}, 265 | "creation_time": {"type": "number"}, 266 | "id": {"type": "number"}, 267 | "is_private": {"type": "boolean"}, 268 | "number": {"type": "number"}, 269 | }, 270 | "required": ["body", "creation_time", "id", "is_private", "number"], 271 | }, 272 | "attachment": { 273 | "description": "An object representing an attachment affected by the event", 274 | "properties": { 275 | "content_type": {"type": "string"}, 276 | "creation_time": {"type": "number"}, 277 | "description": {"type": "string"}, 278 | "file_name": {"type": "string"}, 279 | "flags": {"type": "array"}, 280 | "id": {"type": "number"}, 281 | "is_obsolete": {"type": "boolean"}, 282 | "is_patch": {"type": "boolean"}, 283 | "is_private": {"type": "boolean"}, 284 | "last_change_time": {"type": "number"}, 285 | }, 286 | "required": [ 287 | "content_type", 288 | "creation_time", 289 | "description", 290 | "file_name", 291 | "flags", 292 | "id", 293 | "is_obsolete", 294 | "is_patch", 295 | "is_private", 296 | "last_change_time", 297 | ], 298 | }, 299 | }, 300 | "required": ["bug", "event"], 301 | } 302 | 303 | @property 304 | def bug(self): 305 | """The bug dictionary from the message.""" 306 | return self.body["bug"] 307 | 308 | @property 309 | def assigned_to_email(self): 310 | """The email address of the user to which the bug is assigned.""" 311 | return self.bug["assigned_to"]["login"] 312 | 313 | @property 314 | def component_name(self): 315 | """The name of the component against which the bug is filed.""" 316 | return self.bug["component"]["name"] 317 | 318 | @property 319 | def product_name(self): 320 | """The name of the product against which the bug is filed.""" 321 | return self.bug["product"]["name"] 322 | 323 | 324 | class MessageV1BZ4(MessageV1): 325 | """ 326 | A sub-class of a Fedora message that defines a message schema for messages 327 | published by Bugzilla. This schema is accurate for messages emitted since 328 | bugzilla2fedmsg commit 08b3e0c5 with Bugzilla 4 compatibility ENABLED. 329 | """ 330 | 331 | body_schema = copy.deepcopy(MessageV1.body_schema) 332 | bug = body_schema["properties"]["bug"] 333 | event = body_schema["properties"]["event"] 334 | comment = body_schema["properties"]["comment"] 335 | bug["properties"]["assigned_to"] = {"type": "string"} 336 | bug["properties"]["component"] = {"type": "string"} 337 | bug["properties"]["product"] = {"type": "string"} 338 | bug["properties"]["cc"] = {"type": "array"} 339 | bug["properties"]["creator"] = {"type": "string"} 340 | bug["properties"]["op_sys"] = {"type": "string"} 341 | bug["properties"]["weburl"] = {"type": "string"} 342 | bug["required"].extend(["cc", "weburl"]) 343 | event["properties"]["who"] = {"type": "string"} 344 | event["required"].append("who") 345 | comment["properties"]["author"] = {"type": "string"} 346 | comment["required"].append("author") 347 | 348 | @property 349 | def bug(self): 350 | """The bug dictionary from the message.""" 351 | return self.body["bug"] 352 | 353 | @property 354 | def assigned_to_email(self): 355 | """The email address of the user to which the bug is assigned.""" 356 | return self.bug["assigned_to"] 357 | 358 | @property 359 | def component_name(self): 360 | """The name of the component against which the bug is filed.""" 361 | return self.bug["component"] 362 | 363 | @property 364 | def product_name(self): 365 | """The name of the product against which the bug is filed.""" 366 | return self.bug["product"] 367 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 489 | 490 | Also add information on how to contact you by electronic and paper mail. 491 | 492 | You should also get your employer (if you work as a programmer) or your 493 | school, if any, to sign a "copyright disclaimer" for the library, if 494 | necessary. Here is a sample; alter the names: 495 | 496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 498 | 499 | , 1 April 1990 500 | Ty Coon, President of Vice 501 | 502 | That's all there is to it! 503 | -------------------------------------------------------------------------------- /tests/samples.py: -------------------------------------------------------------------------------- 1 | """Test fixtures for bugzilla2fedmsg.relay. 2 | 3 | Authors: Adam Williamson 4 | 5 | """ 6 | 7 | from bugzilla2fedmsg_schema import MessageV1, MessageV1BZ4 8 | 9 | BUG_CREATE_MESSAGE_NO_BZ4 = MessageV1( 10 | topic="bugzilla.bug.new", 11 | body={ 12 | "agent_name": "dgunchev", 13 | "bug": { 14 | "whiteboard": "abrt_hash:ca3702e55e5d4a4f3057d7a62ad195583a2b9a409990f275a36c87373bd77445;", 15 | "classification": "Fedora", 16 | "cf_story_points": "", 17 | "creation_time": 1555619221.0, 18 | "target_milestone": None, 19 | "keywords": [], 20 | "summary": "SELinux is preventing touch from 'write' accesses on the file /var/log/shorewall-init.log.", 21 | "cf_ovirt_team": "", 22 | "cf_release_notes": "", 23 | "cf_cloudforms_team": "", 24 | "cf_type": "", 25 | "cf_fixed_in": "", 26 | "cf_atomic": "", 27 | "id": 1701391, 28 | "priority": "unspecified", 29 | "platform": "x86_64", 30 | "version": {"id": 5586, "name": "29"}, 31 | "cf_regression_status": "", 32 | "cf_environment": "", 33 | "status": {"id": 1, "name": "NEW"}, 34 | "product": {"id": 49, "name": "Fedora"}, 35 | "qa_contact": { 36 | "login": "extras-qa@fedoraproject.org", 37 | "id": 171387, 38 | "real_name": "Fedora Extras Quality Assurance", 39 | }, 40 | "reporter": { 41 | "login": "dgunchev@gmail.com", 42 | "id": 156190, 43 | "real_name": "Doncho Gunchev", 44 | }, 45 | "component": {"id": 17100, "name": "selinux-policy"}, 46 | "cf_category": "", 47 | "cf_doc_type": "", 48 | "cf_documentation_action": "", 49 | "cf_clone_of": "", 50 | "is_private": False, 51 | "severity": "unspecified", 52 | "operating_system": "Unspecified", 53 | "url": "", 54 | "last_change_time": 1555619221.0, 55 | "cf_crm": "", 56 | "cf_last_closed": None, 57 | "alias": [], 58 | "flags": [], 59 | "assigned_to": { 60 | "login": "lvrabec@redhat.com", 61 | "id": 316673, 62 | "real_name": "Lukas Vrabec", 63 | }, 64 | "resolution": "", 65 | "cf_mount_type": "", 66 | }, 67 | "event": { 68 | "target": "bug", 69 | "change_set": "6792.1555619221.41171", 70 | "routing_key": "bug.create", 71 | "bug_id": 1701391, 72 | "user": { 73 | "login": "dgunchev@gmail.com", 74 | "id": 156190, 75 | "real_name": "Doncho Gunchev", 76 | }, 77 | "time": 1555619221.0, 78 | "action": "create", 79 | }, 80 | "headers": { 81 | "content-length": "1498", 82 | "expires": "1555705646848", 83 | "esbMessageType": "bugzillaNotification", 84 | "timestamp": "1555619246848", 85 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.create", 86 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.create", 87 | "correlation-id": "06ed3815-4596-49a0-a5a5-1d5b6b7bf01a", 88 | "priority": "4", 89 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 90 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 91 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.create", 92 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:8852", 93 | "esbSourceSystem": "bugzilla", 94 | }, 95 | }, 96 | ) 97 | 98 | BUG_CREATE_MESSAGE_BZ4 = MessageV1BZ4( 99 | topic="bugzilla.bug.new", 100 | body={ 101 | "agent_name": "dgunchev", 102 | "bug": { 103 | "whiteboard": "abrt_hash:ca3702e55e5d4a4f3057d7a62ad195583a2b9a409990f275a36c87373bd77445;", 104 | "classification": "Fedora", 105 | "cf_story_points": "", 106 | "creation_time": 1555619221.0, 107 | "target_milestone": None, 108 | "keywords": [], 109 | "summary": "SELinux is preventing touch from 'write' accesses on the file /var/log/shorewall-init.log.", 110 | "cf_ovirt_team": "", 111 | "cf_release_notes": "", 112 | "cf_cloudforms_team": "", 113 | "cf_type": "", 114 | "cf_fixed_in": "", 115 | "cf_atomic": "", 116 | "id": 1701391, 117 | "priority": "unspecified", 118 | "platform": "x86_64", 119 | "version": {"id": 5586, "name": "29"}, 120 | "cf_regression_status": "", 121 | "cf_environment": "", 122 | "status": {"id": 1, "name": "NEW"}, 123 | "product": "Fedora", 124 | "qa_contact": { 125 | "login": "extras-qa@fedoraproject.org", 126 | "id": 171387, 127 | "real_name": "Fedora Extras Quality Assurance", 128 | }, 129 | "reporter": { 130 | "login": "dgunchev@gmail.com", 131 | "id": 156190, 132 | "real_name": "Doncho Gunchev", 133 | }, 134 | "component": "selinux-policy", 135 | "cf_category": "", 136 | "cf_doc_type": "", 137 | "cf_documentation_action": "", 138 | "cf_clone_of": "", 139 | "is_private": False, 140 | "severity": "unspecified", 141 | "operating_system": "Unspecified", 142 | "url": "", 143 | "last_change_time": 1555619221.0, 144 | "cf_crm": "", 145 | "cf_last_closed": None, 146 | "alias": [], 147 | "flags": [], 148 | "assigned_to": "lvrabec@redhat.com", 149 | "resolution": "", 150 | "cf_mount_type": "", 151 | "cc": [], 152 | "creator": "dgunchev@gmail.com", 153 | "op_sys": "Unspecified", 154 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1701391", 155 | }, 156 | "event": { 157 | "target": "bug", 158 | "change_set": "6792.1555619221.41171", 159 | "routing_key": "bug.create", 160 | "bug_id": 1701391, 161 | "user": { 162 | "login": "dgunchev@gmail.com", 163 | "id": 156190, 164 | "real_name": "Doncho Gunchev", 165 | }, 166 | "time": 1555619221.0, 167 | "action": "create", 168 | "who": "dgunchev@gmail.com", 169 | "changes": [], 170 | }, 171 | "headers": { 172 | "content-length": "1498", 173 | "expires": "1555705646848", 174 | "esbMessageType": "bugzillaNotification", 175 | "timestamp": "1555619246848", 176 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.create", 177 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.create", 178 | "correlation-id": "06ed3815-4596-49a0-a5a5-1d5b6b7bf01a", 179 | "priority": "4", 180 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 181 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 182 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.create", 183 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:8852", 184 | "esbSourceSystem": "bugzilla", 185 | }, 186 | }, 187 | ) 188 | 189 | 190 | BUG_MODIFY_MESSAGE_NO_BZ4 = MessageV1( 191 | topic="bugzilla.bug.update", 192 | body={ 193 | "agent_name": "churchyard", 194 | "usernames": ["churchyard", "upstream-release-monitoring", "adamw"], 195 | "bug": { 196 | "whiteboard": "", 197 | "classification": "Fedora", 198 | "cf_story_points": "", 199 | "creation_time": 1555048183.0, 200 | "target_milestone": None, 201 | "keywords": ["FutureFeature", "Triaged"], 202 | "summary": "python-pyramid-1.10.4 is available", 203 | "cf_ovirt_team": "", 204 | "cf_release_notes": "", 205 | "cf_cloudforms_team": "", 206 | "cf_type": "", 207 | "cf_fixed_in": "", 208 | "cf_atomic": "", 209 | "id": 1699203, 210 | "priority": "unspecified", 211 | "platform": "Unspecified", 212 | "version": {"id": 495, "name": "rawhide"}, 213 | "cf_regression_status": "", 214 | "cf_environment": "", 215 | "status": {"id": 1, "name": "NEW"}, 216 | "product": {"id": 49, "name": "Fedora"}, 217 | "qa_contact": { 218 | "login": "extras-qa@fedoraproject.org", 219 | "id": 171387, 220 | "real_name": "Fedora Extras Quality Assurance", 221 | }, 222 | "reporter": { 223 | "login": "upstream-release-monitoring@fedoraproject.org", 224 | "id": 282165, 225 | "real_name": "Upstream Release Monitoring", 226 | }, 227 | "component": {"id": 102174, "name": "python-pyramid"}, 228 | "cf_category": "", 229 | "cf_doc_type": "Enhancement", 230 | "cf_documentation_action": "", 231 | "cf_clone_of": "", 232 | "is_private": False, 233 | "severity": "unspecified", 234 | "operating_system": "Unspecified", 235 | "url": "", 236 | "last_change_time": 1555528260.0, 237 | "cf_crm": "", 238 | "cf_last_closed": None, 239 | "alias": [], 240 | "flags": [], 241 | "assigned_to": { 242 | "login": "infra-sig@lists.fedoraproject.org", 243 | "id": 370504, 244 | "real_name": "Fedora Infrastructure SIG", 245 | }, 246 | "resolution": "", 247 | "cf_mount_type": "", 248 | }, 249 | "event": { 250 | "target": "bug", 251 | "change_set": "62607.1555607510.78558", 252 | "routing_key": "bug.modify", 253 | "bug_id": 1699203, 254 | "user": {"login": "mhroncok@redhat.com", "id": 310625, "real_name": "Miro Hrončok"}, 255 | "time": 1555607511.0, 256 | "action": "modify", 257 | "changes": [{"field": "cc", "removed": "", "added": "awilliam@redhat.com"}], 258 | }, 259 | "headers": { 260 | "content-length": "1556", 261 | "expires": "1555693935155", 262 | "esbMessageType": "bugzillaNotification", 263 | "timestamp": "1555607535155", 264 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 265 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 266 | "correlation-id": "b18f93bb-8a69-4651-8f6b-48a6c323a620", 267 | "priority": "4", 268 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 269 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 270 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 271 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:7266", 272 | "esbSourceSystem": "bugzilla", 273 | }, 274 | }, 275 | ) 276 | BUG_MODIFY_MESSAGE_BZ4 = MessageV1BZ4( 277 | topic="bugzilla.bug.update", 278 | body={ 279 | "agent_name": "churchyard", 280 | "usernames": ["churchyard", "upstream-release-monitoring", "adamw"], 281 | "bug": { 282 | "whiteboard": "", 283 | "classification": "Fedora", 284 | "cf_story_points": "", 285 | "creation_time": 1555048183.0, 286 | "target_milestone": None, 287 | "keywords": ["FutureFeature", "Triaged"], 288 | "summary": "python-pyramid-1.10.4 is available", 289 | "cf_ovirt_team": "", 290 | "cf_release_notes": "", 291 | "cf_cloudforms_team": "", 292 | "cf_type": "", 293 | "cf_fixed_in": "", 294 | "cf_atomic": "", 295 | "id": 1699203, 296 | "priority": "unspecified", 297 | "platform": "Unspecified", 298 | "version": {"id": 495, "name": "rawhide"}, 299 | "cf_regression_status": "", 300 | "cf_environment": "", 301 | "status": {"id": 1, "name": "NEW"}, 302 | "product": "Fedora", 303 | "qa_contact": { 304 | "login": "extras-qa@fedoraproject.org", 305 | "id": 171387, 306 | "real_name": "Fedora Extras Quality Assurance", 307 | }, 308 | "reporter": { 309 | "login": "upstream-release-monitoring@fedoraproject.org", 310 | "id": 282165, 311 | "real_name": "Upstream Release Monitoring", 312 | }, 313 | "component": "python-pyramid", 314 | "cf_category": "", 315 | "cf_doc_type": "Enhancement", 316 | "cf_documentation_action": "", 317 | "cf_clone_of": "", 318 | "is_private": False, 319 | "severity": "unspecified", 320 | "operating_system": "Unspecified", 321 | "url": "", 322 | "last_change_time": 1555528260.0, 323 | "cf_crm": "", 324 | "cf_last_closed": None, 325 | "alias": [], 326 | "flags": [], 327 | "assigned_to": "infra-sig@lists.fedoraproject.org", 328 | "resolution": "", 329 | "cf_mount_type": "", 330 | "cc": [], 331 | "creator": "upstream-release-monitoring@fedoraproject.org", 332 | "op_sys": "Unspecified", 333 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1699203", 334 | }, 335 | "event": { 336 | "target": "bug", 337 | "change_set": "62607.1555607510.78558", 338 | "routing_key": "bug.modify", 339 | "bug_id": 1699203, 340 | "user": {"login": "mhroncok@redhat.com", "id": 310625, "real_name": "Miro Hrončok"}, 341 | "time": 1555607511.0, 342 | "action": "modify", 343 | "changes": [ 344 | {"field": "cc", "removed": "", "added": "awilliam@redhat.com", "field_name": "cc"} 345 | ], 346 | "who": "mhroncok@redhat.com", 347 | }, 348 | "headers": { 349 | "content-length": "1556", 350 | "expires": "1555693935155", 351 | "esbMessageType": "bugzillaNotification", 352 | "timestamp": "1555607535155", 353 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 354 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 355 | "correlation-id": "b18f93bb-8a69-4651-8f6b-48a6c323a620", 356 | "priority": "4", 357 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 358 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 359 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 360 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:7266", 361 | "esbSourceSystem": "bugzilla", 362 | }, 363 | }, 364 | ) 365 | 366 | BUG_MODIFY_FOUR_CHANGES_MESSAGE_NO_BZ4 = MessageV1( 367 | topic="bugzilla.bug.update", 368 | body={ 369 | "bug": { 370 | "whiteboard": "", 371 | "classification": "Fedora", 372 | "cf_story_points": "", 373 | "creation_time": 1556114414.0, 374 | "target_milestone": None, 375 | "keywords": [], 376 | "summary": "Review Request: perl-Class-AutoClass - Define classes and objects for Perl", 377 | "cf_ovirt_team": "", 378 | "cf_release_notes": "", 379 | "cf_cloudforms_team": "", 380 | "cf_type": "", 381 | "cf_fixed_in": "", 382 | "cf_atomic": "", 383 | "id": 1702701, 384 | "priority": "medium", 385 | "platform": "All", 386 | "version": {"id": 495, "name": "rawhide"}, 387 | "cf_regression_status": "", 388 | "cf_environment": "", 389 | "status": {"id": 26, "name": "POST"}, 390 | "product": {"id": 49, "name": "Fedora"}, 391 | "qa_contact": { 392 | "login": "extras-qa@fedoraproject.org", 393 | "id": 171387, 394 | "real_name": "Fedora Extras Quality Assurance", 395 | }, 396 | "reporter": {"login": "ppisar@redhat.com", "id": 295770, "real_name": "Petr Pisar"}, 397 | "component": {"id": 18186, "name": "Package Review"}, 398 | "cf_category": "", 399 | "cf_doc_type": "If docs needed, set a value", 400 | "cf_documentation_action": "", 401 | "cf_clone_of": "", 402 | "is_private": False, 403 | "severity": "medium", 404 | "operating_system": "Linux", 405 | "url": "", 406 | "last_change_time": 1556114414.0, 407 | "cf_crm": "", 408 | "cf_last_closed": None, 409 | "alias": [], 410 | "flags": [{"id": 4029953, "value": "+", "name": "fedora-review"}], 411 | "assigned_to": { 412 | "login": "zebob.m@gmail.com", 413 | "id": 401767, 414 | "real_name": "Robert-André Mauchin", 415 | }, 416 | "resolution": "", 417 | "cf_mount_type": "", 418 | }, 419 | "event": { 420 | "target": "bug", 421 | "change_set": "113867.1556151814.59504", 422 | "routing_key": "bug.modify", 423 | "bug_id": 1702701, 424 | "user": { 425 | "login": "zebob.m@gmail.com", 426 | "id": 401767, 427 | "real_name": "Robert-André Mauchin", 428 | }, 429 | "time": 1556151815.0, 430 | "action": "modify", 431 | "changes": [ 432 | { 433 | "field": "assigned_to", 434 | "removed": "nobody@fedoraproject.org", 435 | "added": "zebob.m@gmail.com", 436 | }, 437 | {"field": "bug_status", "removed": "NEW", "added": "POST"}, 438 | {"field": "cc", "removed": "", "added": "zebob.m@gmail.com"}, 439 | {"field": "flag.needinfo", "removed": "", "added": "? (rob@boberts.com)"}, 440 | ], 441 | }, 442 | "headers": { 443 | "content-length": "1756", 444 | "expires": "1556238243956", 445 | "esbMessageType": "bugzillaNotification", 446 | "timestamp": "1556151843956", 447 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 448 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 449 | "correlation-id": "8b311d06-bd03-444f-aaec-ff2735b53424", 450 | "priority": "4", 451 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 452 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 453 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 454 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4467", 455 | "esbSourceSystem": "bugzilla", 456 | }, 457 | }, 458 | ) 459 | BUG_MODIFY_FOUR_CHANGES_MESSAGE_BZ4 = MessageV1BZ4( 460 | topic="bugzilla.bug.update", 461 | body={ 462 | "bug": { 463 | "whiteboard": "", 464 | "classification": "Fedora", 465 | "cf_story_points": "", 466 | "creation_time": 1556114414.0, 467 | "target_milestone": None, 468 | "keywords": [], 469 | "summary": "Review Request: perl-Class-AutoClass - Define classes and objects for Perl", 470 | "cf_ovirt_team": "", 471 | "cf_release_notes": "", 472 | "cf_cloudforms_team": "", 473 | "cf_type": "", 474 | "cf_fixed_in": "", 475 | "cf_atomic": "", 476 | "id": 1702701, 477 | "priority": "medium", 478 | "platform": "All", 479 | "version": {"id": 495, "name": "rawhide"}, 480 | "cf_regression_status": "", 481 | "cf_environment": "", 482 | "status": {"id": 26, "name": "POST"}, 483 | "product": "Fedora", 484 | "qa_contact": { 485 | "login": "extras-qa@fedoraproject.org", 486 | "id": 171387, 487 | "real_name": "Fedora Extras Quality Assurance", 488 | }, 489 | "reporter": {"login": "ppisar@redhat.com", "id": 295770, "real_name": "Petr Pisar"}, 490 | "component": "Package Review", 491 | "cf_category": "", 492 | "cf_doc_type": "If docs needed, set a value", 493 | "cf_documentation_action": "", 494 | "cf_clone_of": "", 495 | "is_private": False, 496 | "severity": "medium", 497 | "operating_system": "Linux", 498 | "url": "", 499 | "last_change_time": 1556114414.0, 500 | "cf_crm": "", 501 | "cf_last_closed": None, 502 | "alias": [], 503 | "flags": [{"id": 4029953, "value": "+", "name": "fedora-review"}], 504 | "assigned_to": "zebob.m@gmail.com", 505 | "resolution": "", 506 | "cf_mount_type": "", 507 | "cc": [], 508 | "creator": "ppisar@redhat.com", 509 | "op_sys": "Linux", 510 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1702701", 511 | }, 512 | "event": { 513 | "target": "bug", 514 | "change_set": "113867.1556151814.59504", 515 | "routing_key": "bug.modify", 516 | "bug_id": 1702701, 517 | "user": { 518 | "login": "zebob.m@gmail.com", 519 | "id": 401767, 520 | "real_name": "Robert-André Mauchin", 521 | }, 522 | "time": 1556151815.0, 523 | "action": "modify", 524 | "changes": [ 525 | { 526 | "field": "assigned_to", 527 | "removed": "nobody@fedoraproject.org", 528 | "added": "zebob.m@gmail.com", 529 | "field_name": "assigned_to", 530 | }, 531 | { 532 | "field": "bug_status", 533 | "removed": "NEW", 534 | "added": "POST", 535 | "field_name": "bug_status", 536 | }, 537 | {"field": "cc", "removed": "", "added": "zebob.m@gmail.com", "field_name": "cc"}, 538 | { 539 | "field": "flag.needinfo", 540 | "removed": "", 541 | "added": "? (rob@boberts.com)", 542 | "field_name": "flag.needinfo", 543 | }, 544 | ], 545 | "who": "zebob.m@gmail.com", 546 | }, 547 | "headers": { 548 | "content-length": "1756", 549 | "expires": "1556238243956", 550 | "esbMessageType": "bugzillaNotification", 551 | "timestamp": "1556151843956", 552 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 553 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 554 | "correlation-id": "8b311d06-bd03-444f-aaec-ff2735b53424", 555 | "priority": "4", 556 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 557 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 558 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 559 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4467", 560 | "esbSourceSystem": "bugzilla", 561 | }, 562 | }, 563 | ) 564 | 565 | 566 | BUG_MODIFY_TWO_CHANGES_MESSAGE_BZ4 = MessageV1( 567 | topic="bugzilla.bug.update", 568 | body={ 569 | "bug": { 570 | "whiteboard": "", 571 | "classification": "Fedora", 572 | "cf_story_points": "", 573 | "creation_time": 1556114414.0, 574 | "target_milestone": None, 575 | "keywords": [], 576 | "summary": "Review Request: perl-Class-AutoClass - Define classes and objects for Perl", 577 | "cf_ovirt_team": "", 578 | "cf_release_notes": "", 579 | "cf_cloudforms_team": "", 580 | "cf_type": "", 581 | "cf_fixed_in": "", 582 | "cf_atomic": "", 583 | "id": 1702701, 584 | "priority": "medium", 585 | "platform": "All", 586 | "version": {"id": 495, "name": "rawhide"}, 587 | "cf_regression_status": "", 588 | "cf_environment": "", 589 | "status": {"id": 26, "name": "POST"}, 590 | "product": {"id": 49, "name": "Fedora"}, 591 | "qa_contact": { 592 | "login": "extras-qa@fedoraproject.org", 593 | "id": 171387, 594 | "real_name": "Fedora Extras Quality Assurance", 595 | }, 596 | "reporter": {"login": "ppisar@redhat.com", "id": 295770, "real_name": "Petr Pisar"}, 597 | "component": {"id": 18186, "name": "Package Review"}, 598 | "cf_category": "", 599 | "cf_doc_type": "If docs needed, set a value", 600 | "cf_documentation_action": "", 601 | "cf_clone_of": "", 602 | "is_private": False, 603 | "severity": "medium", 604 | "operating_system": "Linux", 605 | "url": "", 606 | "last_change_time": 1556114414.0, 607 | "cf_crm": "", 608 | "cf_last_closed": None, 609 | "alias": [], 610 | "flags": [{"id": 4029953, "value": "+", "name": "fedora-review"}], 611 | "assigned_to": { 612 | "login": "zebob.m@gmail.com", 613 | "id": 401767, 614 | "real_name": "Robert-André Mauchin", 615 | }, 616 | "resolution": "", 617 | "cf_mount_type": "", 618 | }, 619 | "event": { 620 | "target": "bug", 621 | "change_set": "113867.1556151814.59504", 622 | "routing_key": "bug.modify", 623 | "bug_id": 1702701, 624 | "user": { 625 | "login": "zebob.m@gmail.com", 626 | "id": 401767, 627 | "real_name": "Robert-André Mauchin", 628 | }, 629 | "time": 1556151815.0, 630 | "action": "modify", 631 | "changes": [ 632 | { 633 | "field": "assigned_to", 634 | "removed": "nobody@fedoraproject.org", 635 | "added": "zebob.m@gmail.com", 636 | }, 637 | {"field": "bug_status", "removed": "NEW", "added": "POST"}, 638 | ], 639 | }, 640 | "headers": { 641 | "content-length": "1756", 642 | "expires": "1556238243956", 643 | "esbMessageType": "bugzillaNotification", 644 | "timestamp": "1556151843956", 645 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 646 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 647 | "correlation-id": "8b311d06-bd03-444f-aaec-ff2735b53424", 648 | "priority": "4", 649 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 650 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 651 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 652 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4467", 653 | "esbSourceSystem": "bugzilla", 654 | }, 655 | }, 656 | ) 657 | BUG_MODIFY_TWO_CHANGES_MESSAGE_NO_BZ4 = MessageV1BZ4( 658 | topic="bugzilla.bug.update", 659 | body={ 660 | "bug": { 661 | "whiteboard": "", 662 | "classification": "Fedora", 663 | "cf_story_points": "", 664 | "creation_time": 1556114414.0, 665 | "target_milestone": None, 666 | "keywords": [], 667 | "summary": "Review Request: perl-Class-AutoClass - Define classes and objects for Perl", 668 | "cf_ovirt_team": "", 669 | "cf_release_notes": "", 670 | "cf_cloudforms_team": "", 671 | "cf_type": "", 672 | "cf_fixed_in": "", 673 | "cf_atomic": "", 674 | "id": 1702701, 675 | "priority": "medium", 676 | "platform": "All", 677 | "version": {"id": 495, "name": "rawhide"}, 678 | "cf_regression_status": "", 679 | "cf_environment": "", 680 | "status": {"id": 26, "name": "POST"}, 681 | "product": "Fedora", 682 | "qa_contact": { 683 | "login": "extras-qa@fedoraproject.org", 684 | "id": 171387, 685 | "real_name": "Fedora Extras Quality Assurance", 686 | }, 687 | "reporter": {"login": "ppisar@redhat.com", "id": 295770, "real_name": "Petr Pisar"}, 688 | "component": "Package Review", 689 | "cf_category": "", 690 | "cf_doc_type": "If docs needed, set a value", 691 | "cf_documentation_action": "", 692 | "cf_clone_of": "", 693 | "is_private": False, 694 | "severity": "medium", 695 | "operating_system": "Linux", 696 | "url": "", 697 | "last_change_time": 1556114414.0, 698 | "cf_crm": "", 699 | "cf_last_closed": None, 700 | "alias": [], 701 | "flags": [{"id": 4029953, "value": "+", "name": "fedora-review"}], 702 | "assigned_to": "zebob.m@gmail.com", 703 | "resolution": "", 704 | "cf_mount_type": "", 705 | "cc": [], 706 | "creator": "ppisar@redhat.com", 707 | "op_sys": "Linux", 708 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1702701", 709 | }, 710 | "event": { 711 | "target": "bug", 712 | "change_set": "113867.1556151814.59504", 713 | "routing_key": "bug.modify", 714 | "bug_id": 1702701, 715 | "user": { 716 | "login": "zebob.m@gmail.com", 717 | "id": 401767, 718 | "real_name": "Robert-André Mauchin", 719 | }, 720 | "time": 1556151815.0, 721 | "action": "modify", 722 | "changes": [ 723 | { 724 | "field": "assigned_to", 725 | "removed": "nobody@fedoraproject.org", 726 | "added": "zebob.m@gmail.com", 727 | "field_name": "assigned_to", 728 | }, 729 | { 730 | "field": "bug_status", 731 | "removed": "NEW", 732 | "added": "POST", 733 | "field_name": "bug_status", 734 | }, 735 | ], 736 | "who": "zebob.m@gmail.com", 737 | }, 738 | "headers": { 739 | "content-length": "1756", 740 | "expires": "1556238243956", 741 | "esbMessageType": "bugzillaNotification", 742 | "timestamp": "1556151843956", 743 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 744 | "destination": "/topic/VirtualTopic.eng.bugzilla.bug.modify", 745 | "correlation-id": "8b311d06-bd03-444f-aaec-ff2735b53424", 746 | "priority": "4", 747 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 748 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 749 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.bug.modify", 750 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4467", 751 | "esbSourceSystem": "bugzilla", 752 | }, 753 | }, 754 | ) 755 | 756 | 757 | COMMENT_CREATE_MESSAGE_NO_BZ4 = MessageV1( 758 | topic="bugzilla.bug.update", 759 | body={ 760 | "bug": { 761 | "whiteboard": "", 762 | "classification": "Fedora", 763 | "cf_story_points": "", 764 | "creation_time": 1553190589.0, 765 | "target_milestone": None, 766 | "keywords": [], 767 | "summary": "openQA transient test failure as duplicated first character just after a snapshot", 768 | "cf_ovirt_team": "", 769 | "cf_release_notes": "", 770 | "cf_cloudforms_team": "", 771 | "cf_type": "Bug", 772 | "cf_fixed_in": "", 773 | "cf_atomic": "", 774 | "id": 1691487, 775 | "priority": "unspecified", 776 | "platform": "ppc64le", 777 | "version": {"id": 5713, "name": "30"}, 778 | "cf_regression_status": "", 779 | "cf_environment": "", 780 | "status": {"id": 1, "name": "NEW"}, 781 | "product": {"id": 49, "name": "Fedora"}, 782 | "qa_contact": { 783 | "login": "extras-qa@fedoraproject.org", 784 | "id": 171387, 785 | "real_name": "Fedora Extras Quality Assurance", 786 | }, 787 | "reporter": { 788 | "login": "normand@linux.vnet.ibm.com", 789 | "id": 364546, 790 | "real_name": "Michel Normand", 791 | }, 792 | "component": {"id": 145692, "name": "openqa"}, 793 | "cf_category": "", 794 | "cf_doc_type": "If docs needed, set a value", 795 | "cf_documentation_action": "", 796 | "cf_clone_of": "", 797 | "is_private": False, 798 | "severity": "unspecified", 799 | "operating_system": "Unspecified", 800 | "url": "", 801 | "last_change_time": 1555600902.0, 802 | "cf_crm": "", 803 | "cf_last_closed": None, 804 | "alias": [], 805 | "flags": [], 806 | "assigned_to": { 807 | "login": "awilliam@redhat.com", 808 | "id": 273090, 809 | "real_name": "Adam Williamson", 810 | }, 811 | "resolution": "", 812 | "cf_mount_type": "", 813 | }, 814 | "event": { 815 | "target": "comment", 816 | "change_set": "86288.1555602938.43406", 817 | "routing_key": "comment.create", 818 | "bug_id": 1691487, 819 | "user": {"login": "smooge@redhat.com", "id": 12, "real_name": "Stephen John Smoogen"}, 820 | "time": 1555602938.0, 821 | "action": "create", 822 | }, 823 | "headers": { 824 | "content-length": "1938", 825 | "expires": "1555689348470", 826 | "esbMessageType": "bugzillaNotification", 827 | "timestamp": "1555602948470", 828 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.comment.create", 829 | "destination": "/topic/VirtualTopic.eng.bugzilla.comment.create", 830 | "correlation-id": "93ab27cf-fada-4e6a-aef5-db7af28b2b71", 831 | "priority": "4", 832 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 833 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 834 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.comment.create", 835 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:6693", 836 | "esbSourceSystem": "bugzilla", 837 | }, 838 | "comment": { 839 | "body": "qa09 and qa14 have 8 560 GB SAS drives which are RAID-6 together. \n\nThe systems we get from IBM come through a special contract which in the past required the system to be sent back to add hardware to it. When we added drives it also caused problems because the system didn't match the contract when we returned it. I am checking with IBM on the wearabouts for the systems.", 840 | "creation_time": 1555602938.0, 841 | "number": 8, 842 | "id": 1691487, 843 | "is_private": False, 844 | }, 845 | }, 846 | ) 847 | COMMENT_CREATE_MESSAGE_BZ4 = MessageV1BZ4( 848 | topic="bugzilla.bug.update", 849 | body={ 850 | "bug": { 851 | "whiteboard": "", 852 | "classification": "Fedora", 853 | "cf_story_points": "", 854 | "creation_time": 1553190589.0, 855 | "target_milestone": None, 856 | "keywords": [], 857 | "summary": "openQA transient test failure as duplicated first character just after a snapshot", 858 | "cf_ovirt_team": "", 859 | "cf_release_notes": "", 860 | "cf_cloudforms_team": "", 861 | "cf_type": "Bug", 862 | "cf_fixed_in": "", 863 | "cf_atomic": "", 864 | "id": 1691487, 865 | "priority": "unspecified", 866 | "platform": "ppc64le", 867 | "version": {"id": 5713, "name": "30"}, 868 | "cf_regression_status": "", 869 | "cf_environment": "", 870 | "status": {"id": 1, "name": "NEW"}, 871 | "product": "Fedora", 872 | "qa_contact": { 873 | "login": "extras-qa@fedoraproject.org", 874 | "id": 171387, 875 | "real_name": "Fedora Extras Quality Assurance", 876 | }, 877 | "reporter": { 878 | "login": "normand@linux.vnet.ibm.com", 879 | "id": 364546, 880 | "real_name": "Michel Normand", 881 | }, 882 | "component": "openqa", 883 | "cf_category": "", 884 | "cf_doc_type": "If docs needed, set a value", 885 | "cf_documentation_action": "", 886 | "cf_clone_of": "", 887 | "is_private": False, 888 | "severity": "unspecified", 889 | "operating_system": "Unspecified", 890 | "url": "", 891 | "last_change_time": 1555600902.0, 892 | "cf_crm": "", 893 | "cf_last_closed": None, 894 | "alias": [], 895 | "flags": [], 896 | "assigned_to": "awilliam@redhat.com", 897 | "resolution": "", 898 | "cf_mount_type": "", 899 | "cc": [], 900 | "creator": "normand@linux.vnet.ibm.com", 901 | "op_sys": "Unspecified", 902 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1691487", 903 | }, 904 | "event": { 905 | "target": "comment", 906 | "change_set": "86288.1555602938.43406", 907 | "routing_key": "comment.create", 908 | "bug_id": 1691487, 909 | "user": {"login": "smooge@redhat.com", "id": 12, "real_name": "Stephen John Smoogen"}, 910 | "time": 1555602938.0, 911 | "action": "create", 912 | "who": "smooge@redhat.com", 913 | "changes": [], 914 | }, 915 | "headers": { 916 | "content-length": "1938", 917 | "expires": "1555689348470", 918 | "esbMessageType": "bugzillaNotification", 919 | "timestamp": "1555602948470", 920 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.comment.create", 921 | "destination": "/topic/VirtualTopic.eng.bugzilla.comment.create", 922 | "correlation-id": "93ab27cf-fada-4e6a-aef5-db7af28b2b71", 923 | "priority": "4", 924 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 925 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 926 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.comment.create", 927 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:6693", 928 | "esbSourceSystem": "bugzilla", 929 | }, 930 | "comment": { 931 | "body": "qa09 and qa14 have 8 560 GB SAS drives which are RAID-6 together. \n\nThe systems we get from IBM come through a special contract which in the past required the system to be sent back to add hardware to it. When we added drives it also caused problems because the system didn't match the contract when we returned it. I am checking with IBM on the wearabouts for the systems.", 932 | "creation_time": 1555602938.0, 933 | "number": 8, 934 | "id": 1691487, 935 | "is_private": False, 936 | "author": "smooge@redhat.com", 937 | }, 938 | }, 939 | ) 940 | 941 | 942 | ATTACHMENT_CREATE_MESSAGE_NOBZ4 = MessageV1( 943 | topic="bugzilla.bug.update", 944 | body={ 945 | "bug": { 946 | "whiteboard": "abrt_hash:9045fad863095a5d3f3b387af2b95f43b3482a1d;VARIANT_ID=workstation;", 947 | "classification": "Fedora", 948 | "cf_story_points": "", 949 | "creation_time": 1555610493.0, 950 | "target_milestone": None, 951 | "keywords": [], 952 | "summary": "[abrt] gnome-software: gtk_widget_unparent(): gnome-software killed by SIGSEGV", 953 | "cf_ovirt_team": "", 954 | "cf_release_notes": "", 955 | "cf_cloudforms_team": "", 956 | "cf_type": "", 957 | "cf_fixed_in": "", 958 | "cf_atomic": "", 959 | "id": 1701353, 960 | "priority": "unspecified", 961 | "platform": "x86_64", 962 | "version": {"id": 5713, "name": "30"}, 963 | "cf_regression_status": "", 964 | "cf_environment": "", 965 | "status": {"id": 1, "name": "NEW"}, 966 | "product": {"id": 49, "name": "Fedora"}, 967 | "qa_contact": { 968 | "login": "extras-qa@fedoraproject.org", 969 | "id": 171387, 970 | "real_name": "Fedora Extras Quality Assurance", 971 | }, 972 | "reporter": {"login": "peter@sonniger-tag.eu", "id": 361290, "real_name": "Peter"}, 973 | "component": {"id": 126541, "name": "gnome-software"}, 974 | "cf_category": "", 975 | "cf_doc_type": "If docs needed, set a value", 976 | "cf_documentation_action": "", 977 | "cf_clone_of": "", 978 | "is_private": False, 979 | "severity": "unspecified", 980 | "operating_system": "Unspecified", 981 | "url": "https://retrace.fedoraproject.org/faf/reports/bthash/f4ca1e58d66fb046d6d1d1b18a84dd779ad34624", 982 | "last_change_time": 1555610510.0, 983 | "cf_crm": "", 984 | "cf_last_closed": None, 985 | "alias": [], 986 | "flags": [], 987 | "assigned_to": { 988 | "login": "rhughes@redhat.com", 989 | "id": 213548, 990 | "real_name": "Richard Hughes", 991 | }, 992 | "resolution": "", 993 | "cf_mount_type": "", 994 | }, 995 | "event": { 996 | "target": "attachment", 997 | "change_set": "78355.1555610511.09385", 998 | "routing_key": "attachment.create", 999 | "bug_id": 1701353, 1000 | "user": {"login": "peter@sonniger-tag.eu", "id": 361290, "real_name": "Peter"}, 1001 | "time": 1555610511.0, 1002 | "action": "create", 1003 | }, 1004 | "headers": { 1005 | "content-length": "1883", 1006 | "expires": "1555696922855", 1007 | "esbMessageType": "bugzillaNotification", 1008 | "timestamp": "1555610522855", 1009 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.attachment.create", 1010 | "destination": "/topic/VirtualTopic.eng.bugzilla.attachment.create", 1011 | "correlation-id": "861b24d9-bada-472a-8017-a06bff301595", 1012 | "priority": "4", 1013 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1014 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1015 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.attachment.create", 1016 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:7668", 1017 | "esbSourceSystem": "bugzilla", 1018 | }, 1019 | "attachment": { 1020 | "description": "File: var_log_messages", 1021 | "file_name": "var_log_messages", 1022 | "is_patch": False, 1023 | "creation_time": 1555610511.0, 1024 | "id": 1556193, 1025 | "flags": [], 1026 | "last_change_time": 1555610511.0, 1027 | "content_type": "text/plain", 1028 | "is_obsolete": False, 1029 | "is_private": False, 1030 | }, 1031 | }, 1032 | ) 1033 | ATTACHMENT_CREATE_MESSAGE_BZ4 = MessageV1BZ4( 1034 | topic="bugzilla.bug.update", 1035 | body={ 1036 | "bug": { 1037 | "whiteboard": "abrt_hash:9045fad863095a5d3f3b387af2b95f43b3482a1d;VARIANT_ID=workstation;", 1038 | "classification": "Fedora", 1039 | "cf_story_points": "", 1040 | "creation_time": 1555610493.0, 1041 | "target_milestone": None, 1042 | "keywords": [], 1043 | "summary": "[abrt] gnome-software: gtk_widget_unparent(): gnome-software killed by SIGSEGV", 1044 | "cf_ovirt_team": "", 1045 | "cf_release_notes": "", 1046 | "cf_cloudforms_team": "", 1047 | "cf_type": "", 1048 | "cf_fixed_in": "", 1049 | "cf_atomic": "", 1050 | "id": 1701353, 1051 | "priority": "unspecified", 1052 | "platform": "x86_64", 1053 | "version": {"id": 5713, "name": "30"}, 1054 | "cf_regression_status": "", 1055 | "cf_environment": "", 1056 | "status": {"id": 1, "name": "NEW"}, 1057 | "product": "Fedora", 1058 | "qa_contact": { 1059 | "login": "extras-qa@fedoraproject.org", 1060 | "id": 171387, 1061 | "real_name": "Fedora Extras Quality Assurance", 1062 | }, 1063 | "reporter": {"login": "peter@sonniger-tag.eu", "id": 361290, "real_name": "Peter"}, 1064 | "component": "gnome-software", 1065 | "cf_category": "", 1066 | "cf_doc_type": "If docs needed, set a value", 1067 | "cf_documentation_action": "", 1068 | "cf_clone_of": "", 1069 | "is_private": False, 1070 | "severity": "unspecified", 1071 | "operating_system": "Unspecified", 1072 | "url": "https://retrace.fedoraproject.org/faf/reports/bthash/f4ca1e58d66fb046d6d1d1b18a84dd779ad34624", 1073 | "last_change_time": 1555610510.0, 1074 | "cf_crm": "", 1075 | "cf_last_closed": None, 1076 | "alias": [], 1077 | "flags": [], 1078 | "assigned_to": "rhughes@redhat.com", 1079 | "resolution": "", 1080 | "cf_mount_type": "", 1081 | "cc": [], 1082 | "creator": "peter@sonniger-tag.eu", 1083 | "op_sys": "Unspecified", 1084 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1701353", 1085 | }, 1086 | "event": { 1087 | "target": "attachment", 1088 | "change_set": "78355.1555610511.09385", 1089 | "routing_key": "attachment.create", 1090 | "bug_id": 1701353, 1091 | "user": {"login": "peter@sonniger-tag.eu", "id": 361290, "real_name": "Peter"}, 1092 | "time": 1555610511.0, 1093 | "action": "create", 1094 | "who": "peter@sonniger-tag.eu", 1095 | "changes": [], 1096 | }, 1097 | "headers": { 1098 | "content-length": "1883", 1099 | "expires": "1555696922855", 1100 | "esbMessageType": "bugzillaNotification", 1101 | "timestamp": "1555610522855", 1102 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.attachment.create", 1103 | "destination": "/topic/VirtualTopic.eng.bugzilla.attachment.create", 1104 | "correlation-id": "861b24d9-bada-472a-8017-a06bff301595", 1105 | "priority": "4", 1106 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1107 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1108 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.attachment.create", 1109 | "message-id": "ID:messaging-devops-broker02.web.prod.ext.phx2.redhat.com-42079-1555559691665-1:361:-1:1:7668", 1110 | "esbSourceSystem": "bugzilla", 1111 | }, 1112 | "attachment": { 1113 | "description": "File: var_log_messages", 1114 | "file_name": "var_log_messages", 1115 | "is_patch": False, 1116 | "creation_time": 1555610511.0, 1117 | "id": 1556193, 1118 | "flags": [], 1119 | "last_change_time": 1555610511.0, 1120 | "content_type": "text/plain", 1121 | "is_obsolete": False, 1122 | "is_private": False, 1123 | }, 1124 | }, 1125 | ) 1126 | 1127 | 1128 | ATTACHMENT_MODIFY_MESSAGE_NO_BZ4 = MessageV1( 1129 | topic="bugzilla.bug.update", 1130 | body={ 1131 | "bug": { 1132 | "whiteboard": "", 1133 | "classification": "Fedora", 1134 | "cf_story_points": "", 1135 | "creation_time": 1555868771.0, 1136 | "target_milestone": None, 1137 | "keywords": [], 1138 | "summary": "I2C_HID_QUIRK_NO_IRQ_AFTER_RESET caused teclast f7/ apollo_lake using i2c_hid.c driver to have stuck button down after period of time", 1139 | "cf_ovirt_team": "", 1140 | "cf_release_notes": "", 1141 | "cf_cloudforms_team": "", 1142 | "cf_type": "Bug", 1143 | "cf_fixed_in": "", 1144 | "cf_atomic": "", 1145 | "id": 1701766, 1146 | "priority": "unspecified", 1147 | "platform": "All", 1148 | "version": {"id": 495, "name": "rawhide"}, 1149 | "cf_regression_status": "", 1150 | "cf_environment": "", 1151 | "status": {"id": 1, "name": "NEW"}, 1152 | "product": {"id": 49, "name": "Fedora"}, 1153 | "qa_contact": { 1154 | "login": "extras-qa@fedoraproject.org", 1155 | "id": 171387, 1156 | "real_name": "Fedora Extras Quality Assurance", 1157 | }, 1158 | "reporter": {"login": "joequant@gmail.com", "id": 356480, "real_name": "Joseph Wang"}, 1159 | "component": {"id": 11769, "name": "kernel"}, 1160 | "cf_category": "", 1161 | "cf_doc_type": "If docs needed, set a value", 1162 | "cf_documentation_action": "", 1163 | "cf_clone_of": "", 1164 | "is_private": False, 1165 | "severity": "high", 1166 | "operating_system": "Linux", 1167 | "url": "", 1168 | "last_change_time": 1556149387.0, 1169 | "cf_crm": "", 1170 | "cf_last_closed": None, 1171 | "alias": [], 1172 | "flags": [], 1173 | "assigned_to": { 1174 | "login": "kernel-maint@redhat.com", 1175 | "id": 176318, 1176 | "real_name": "Kernel Maintainer List", 1177 | }, 1178 | "resolution": "", 1179 | "cf_mount_type": "", 1180 | }, 1181 | "event": { 1182 | "target": "attachment", 1183 | "change_set": "105535.1556149887.38751", 1184 | "routing_key": "attachment.modify", 1185 | "bug_id": 1701766, 1186 | "user": {"login": "joequant@gmail.com", "id": 356480, "real_name": "Joseph Wang"}, 1187 | "time": 1556149887.0, 1188 | "action": "modify", 1189 | "changes": [{"field": "isobsolete", "removed": "0", "added": "1"}], 1190 | }, 1191 | "headers": { 1192 | "content-length": "1861", 1193 | "expires": "1556236290607", 1194 | "esbMessageType": "bugzillaNotification", 1195 | "timestamp": "1556149890607", 1196 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.attachment.modify", 1197 | "destination": "/topic/VirtualTopic.eng.bugzilla.attachment.modify", 1198 | "correlation-id": "0e227da5-88fe-492a-b426-f1f9b11fab86", 1199 | "priority": "4", 1200 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1201 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1202 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.attachment.modify", 1203 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4401", 1204 | "esbSourceSystem": "bugzilla", 1205 | }, 1206 | "attachment": { 1207 | "description": "patch to turn off reset quirk for SP1064 touch pad", 1208 | "file_name": "kernel-diff.patch", 1209 | "is_patch": True, 1210 | "creation_time": 1556149017.0, 1211 | "id": 1558429, 1212 | "flags": [], 1213 | "last_change_time": 1556149017.0, 1214 | "content_type": "text/plain", 1215 | "is_obsolete": True, 1216 | "is_private": False, 1217 | }, 1218 | }, 1219 | ) 1220 | ATTACHMENT_MODIFY_MESSAGE_BZ4 = MessageV1BZ4( 1221 | topic="bugzilla.bug.update", 1222 | body={ 1223 | "bug": { 1224 | "whiteboard": "", 1225 | "classification": "Fedora", 1226 | "cf_story_points": "", 1227 | "creation_time": 1555868771.0, 1228 | "target_milestone": None, 1229 | "keywords": [], 1230 | "summary": "I2C_HID_QUIRK_NO_IRQ_AFTER_RESET caused teclast f7/ apollo_lake using i2c_hid.c driver to have stuck button down after period of time", 1231 | "cf_ovirt_team": "", 1232 | "cf_release_notes": "", 1233 | "cf_cloudforms_team": "", 1234 | "cf_type": "Bug", 1235 | "cf_fixed_in": "", 1236 | "cf_atomic": "", 1237 | "id": 1701766, 1238 | "priority": "unspecified", 1239 | "platform": "All", 1240 | "version": {"id": 495, "name": "rawhide"}, 1241 | "cf_regression_status": "", 1242 | "cf_environment": "", 1243 | "status": {"id": 1, "name": "NEW"}, 1244 | "product": "Fedora", 1245 | "qa_contact": { 1246 | "login": "extras-qa@fedoraproject.org", 1247 | "id": 171387, 1248 | "real_name": "Fedora Extras Quality Assurance", 1249 | }, 1250 | "reporter": {"login": "joequant@gmail.com", "id": 356480, "real_name": "Joseph Wang"}, 1251 | "component": "kernel", 1252 | "cf_category": "", 1253 | "cf_doc_type": "If docs needed, set a value", 1254 | "cf_documentation_action": "", 1255 | "cf_clone_of": "", 1256 | "is_private": False, 1257 | "severity": "high", 1258 | "operating_system": "Linux", 1259 | "url": "", 1260 | "last_change_time": 1556149387.0, 1261 | "cf_crm": "", 1262 | "cf_last_closed": None, 1263 | "alias": [], 1264 | "flags": [], 1265 | "assigned_to": "kernel-maint@redhat.com", 1266 | "resolution": "", 1267 | "cf_mount_type": "", 1268 | "cc": [], 1269 | "creator": "joequant@gmail.com", 1270 | "op_sys": "Linux", 1271 | "weburl": "https://bugzilla.redhat.com/show_bug.cgi?id=1701766", 1272 | }, 1273 | "event": { 1274 | "target": "attachment", 1275 | "change_set": "105535.1556149887.38751", 1276 | "routing_key": "attachment.modify", 1277 | "bug_id": 1701766, 1278 | "user": {"login": "joequant@gmail.com", "id": 356480, "real_name": "Joseph Wang"}, 1279 | "time": 1556149887.0, 1280 | "action": "modify", 1281 | "changes": [ 1282 | {"field": "isobsolete", "removed": "0", "added": "1", "field_name": "isobsolete"} 1283 | ], 1284 | "who": "joequant@gmail.com", 1285 | }, 1286 | "headers": { 1287 | "content-length": "1861", 1288 | "expires": "1556236290607", 1289 | "esbMessageType": "bugzillaNotification", 1290 | "timestamp": "1556149890607", 1291 | "original-destination": "/topic/VirtualTopic.eng.bugzilla.attachment.modify", 1292 | "destination": "/topic/VirtualTopic.eng.bugzilla.attachment.modify", 1293 | "correlation-id": "0e227da5-88fe-492a-b426-f1f9b11fab86", 1294 | "priority": "4", 1295 | "subscription": "/queue/Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1296 | "amq6100_destination": "queue://Consumer.client-datanommer.upshift-prod.VirtualTopic.eng.>", 1297 | "amq6100_originalDestination": "topic://VirtualTopic.eng.bugzilla.attachment.modify", 1298 | "message-id": "ID:messaging-devops-broker01.web.prod.ext.phx2.redhat.com-44024-1556115643434-1:509:-1:1:4401", 1299 | "esbSourceSystem": "bugzilla", 1300 | }, 1301 | "attachment": { 1302 | "description": "patch to turn off reset quirk for SP1064 touch pad", 1303 | "file_name": "kernel-diff.patch", 1304 | "is_patch": True, 1305 | "creation_time": 1556149017.0, 1306 | "id": 1558429, 1307 | "flags": [], 1308 | "last_change_time": 1556149017.0, 1309 | "content_type": "text/plain", 1310 | "is_obsolete": True, 1311 | "is_private": False, 1312 | }, 1313 | }, 1314 | ) 1315 | --------------------------------------------------------------------------------