diff --git a/kcidb/io/schema/test_v3.py b/kcidb/io/schema/test_v3.py index 2482d4f4..9f1ac112 100644 --- a/kcidb/io/schema/test_v3.py +++ b/kcidb/io/schema/test_v3.py @@ -22,12 +22,12 @@ def test_origin(self): version=dict(major=VERSION.previous.major, minor=VERSION.previous.minor), revisions=[ - dict(id="origin1:git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e"), + dict(id="origin1:5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e"), ], builds=[ - dict(revision_id="origin1:git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + dict(revision_id="origin1:5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", id="origin2:1"), - dict(revision_id="origin1:git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + dict(revision_id="origin1:5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", id="origin3:2"), ], tests=[ @@ -41,14 +41,14 @@ def test_origin(self): version=dict(major=VERSION.major, minor=VERSION.minor), revisions=[ - dict(id="git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + dict(id="5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", origin="origin1") ], builds=[ - dict(revision_id="git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + dict(revision_id="5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", id="origin2:1", origin="origin2"), - dict(revision_id="git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + dict(revision_id="5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", id="origin3:2", origin="origin3"), ], diff --git a/kcidb/io/schema/v3.py b/kcidb/io/schema/v3.py index 8760e90d..325e221e 100644 --- a/kcidb/io/schema/v3.py +++ b/kcidb/io/schema/v3.py @@ -26,8 +26,7 @@ # A regular expression pattern matching strings containing revision IDs REVISION_ID_PATTERN = \ - f"{GIT_REPOSITORY_URL_PATTERN}" \ - f"@{GIT_REPOSITORY_COMMIT_HASH_PATTERN}" \ + f"{GIT_REPOSITORY_COMMIT_HASH_PATTERN}" \ f"(\\+{SHA256_PATTERN})?" # A regular expression pattern matching strings containing origin name @@ -96,29 +95,20 @@ "description": "Revision ID.\n" "\n" - "Must be a string containing the following, in order.\n" - "\n" - "The URL of the Git repository which contains the base code " - "of the revision. The shortest possible https:// URL, or, if " - "that's not available, the shortest possible git:// URL." - "\n" - "The '@' character.\n" - "\n" - "The full commit hash of the revision's base code in the Git " - "repository.\n" + "Must contain the full commit hash of the revision's base " + "code in the Git repository.\n" "\n" "If the revision had patches applied to the base code, " - "the '+' character, followed by a sha256 hash over " - "newline-terminated sha256 hashes of each applied patch, " - "in order. E.g. generated with this shell command: \"" + "the commit hash should be followed by the '+' character " + "and a sha256 hash over newline-terminated sha256 hashes of " + "each applied patch, in order. E.g. generated with this " + "shell command: \"" "sha256sum *.patch | cut -c-64 | sha256sum | cut -c-64" "\".\n", "pattern": f"^{REVISION_ID_PATTERN}$", "examples": [ - "https://git.kernel.org/pub/scm/linux/kernel/git/stable/" + - "linux-stable.git@aa73bcc376865c23e61dcebd467697b527901be8", - "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/" + - "linux.git@c0d73a868d9b411bd2d0c8e5ff9d98bfa8563cb1" + + "aa73bcc376865c23e61dcebd467697b527901be8", + "c0d73a868d9b411bd2d0c8e5ff9d98bfa8563cb1" + "+903638c087335b10293663c682b9aa0076f9f7be478a8e782" + "8bc22e12d301b42" ], diff --git a/kcidb/test_misc.py b/kcidb/test_misc.py index c14b862d..0824656d 100644 --- a/kcidb/test_misc.py +++ b/kcidb/test_misc.py @@ -40,7 +40,7 @@ def test_min(self): "misc": { "pipeline_id": 467715 }, - "id": "https://git.kernel.org/@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + "id": "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", "origin": "origin", "patch_mboxes": [], "valid": True, @@ -60,8 +60,8 @@ def test_min(self): notification_message) self.assertEqual(notification.id, "subscription:revisions:" - "aHR0cHM6Ly9naXQua2VybmVsLm9yZy9ANWUyOWQxNDQzYzQ2Yj" - "ZjYTcwYTRjOTQwYTY3ZThjMDlmMDVkY2I3ZQ==:aWQ=") + "NWUyOWQxNDQzYzQ2YjZjYTcwYTRjOTQwYTY3ZThjMDlmMDVkY2" + "I3ZQ==:aWQ=") message = notification.render() self.assertIsInstance(message, email.message.EmailMessage) self.assertIsNone(message['From']) diff --git a/kcidb/test_oo.py b/kcidb/test_oo.py index 20da505c..5f3d165f 100644 --- a/kcidb/test_oo.py +++ b/kcidb/test_oo.py @@ -12,16 +12,14 @@ IO_REVISION1 = { "id": - "https://git.kernel.org/pub/scm/linux/kernel/git/stable/" - "linux-stable.git@aa73bcc376865c23e61dcebd467697b527901be8", + "aa73bcc376865c23e61dcebd467697b527901be8", "origin": "origin", } IO_REVISION2 = { "id": - "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/" - "linux.git@c0d73a868d9b411bd2d0c8e5ff9d98bfa8563cb1" + "c0d73a868d9b411bd2d0c8e5ff9d98bfa8563cb1" "+903638c087335b10293663c682b9aa0076f9f7be478a8e782" "8bc22e12d301b42", "origin": @@ -30,8 +28,7 @@ IO_REVISION3 = { "id": - "https://git.kernel.org/pub/scm/linux/kernel/git/stable/" - "linux-stable.git@7f74c309d3e46088e6606183d15aba89539b650d", + "7f74c309d3e46088e6606183d15aba89539b650d", "origin": "origin", } @@ -78,7 +75,7 @@ def test_revision(self): "misc": { "pipeline_id": 467715 }, - "id": "git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + "id": "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", "origin": "redhat", "patch_mboxes": [], "valid": True, @@ -89,7 +86,7 @@ def test_revision(self): expected_oo_data = { "version": self.version, "revisions": { - "git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e": + "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e": Revision({}, { "contacts": [ "rdma-dev-team@redhat.com" @@ -101,7 +98,7 @@ def test_revision(self): "misc": { "pipeline_id": 467715 }, - "id": "git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + "id": "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", "origin": "redhat", "patch_mboxes": [], "valid": True, @@ -135,7 +132,7 @@ def test_build(self): "pipeline_id": 469720 }, "output_files": [], - "revision_id": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git@1254e88b4fc1470d152f494c3590bb6a33ab33eb", + "revision_id": "1254e88b4fc1470d152f494c3590bb6a33ab33eb", "start_time": "2020-03-03T17:52:02.370000+00:00", "valid": True }, @@ -161,7 +158,7 @@ def test_build(self): "pipeline_id": 469720 }, "output_files": [], - "revision_id": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git@1254e88b4fc1470d152f494c3590bb6a33ab33eb", + "revision_id": "1254e88b4fc1470d152f494c3590bb6a33ab33eb", "start_time": "2020-03-03T17:52:02.370000+00:00", "valid": True, "revision_": None, diff --git a/kcidb/test_subscriptions.py b/kcidb/test_subscriptions.py index e0d17fc4..ed1b1dc0 100644 --- a/kcidb/test_subscriptions.py +++ b/kcidb/test_subscriptions.py @@ -40,7 +40,7 @@ def test_min(self): "misc": { "pipeline_id": 467715 }, - "id": "https://git.kernel.org/@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + "id": "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", "origin": "non_test", "patch_mboxes": [], "valid": True, @@ -56,7 +56,7 @@ def test_min(self): "misc": { "pipeline_id": 467715 }, - "id": "https://git.kernel.org/@1254e88b4fc1470d152f494c3590bb6a33ab33eb", + "id": "1254e88b4fc1470d152f494c3590bb6a33ab33eb", "origin": "test", "patch_mboxes": [], "valid": True, @@ -78,7 +78,7 @@ def test_min(self): "pipeline_id": 469720 }, "output_files": [], - "revision_id": "https://git.kernel.org/@5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", + "revision_id": "5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e", "start_time": "2020-03-03T17:52:02.370000+00:00", "valid": True }, @@ -97,7 +97,7 @@ def test_min(self): "pipeline_id": 469720 }, "output_files": [], - "revision_id": "https://git.kernel.org/@1254e88b4fc1470d152f494c3590bb6a33ab33eb", + "revision_id": "1254e88b4fc1470d152f494c3590bb6a33ab33eb", "start_time": "2020-03-03T17:52:02.370000+00:00", "valid": True },