launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #33020
Re: [Merge] ~ilkeremrekoc/launchpad:add-extra-attrs into launchpad:master
Answered below.
And of course! Will do.
Diff comments:
> diff --git a/lib/lp/bugs/scripts/soss/tests/sampledata/CVE-2011-5000 b/lib/lp/bugs/scripts/soss/tests/sampledata/CVE-2011-5000
> index 76ce151..97e27a9 100644
> --- a/lib/lp/bugs/scripts/soss/tests/sampledata/CVE-2011-5000
> +++ b/lib/lp/bugs/scripts/soss/tests/sampledata/CVE-2011-5000
> @@ -13,3 +13,5 @@ Packages:
> Status: ignored
> Note: ''
> Candidate: CVE-2011-5000
> +Extra_attrs:
It was written to be at the top level in the spec ^^.
> + Custom_attr_1_nvd_score_arrivial_time: '2012-09-09T25:21:39Z'
> diff --git a/lib/lp/bugs/scripts/soss/tests/test_sossimport.py b/lib/lp/bugs/scripts/soss/tests/test_sossimport.py
> index 675da82..d939dde 100644
> --- a/lib/lp/bugs/scripts/soss/tests/test_sossimport.py
> +++ b/lib/lp/bugs/scripts/soss/tests/test_sossimport.py
> @@ -69,6 +69,10 @@ class TestSOSSImporter(TestCaseWithFactory):
> pyyaml = self.source_package_name_set.getOrCreateByName("pyyaml")
> ray = self.source_package_name_set.getOrCreateByName("ray")
> vllm = self.source_package_name_set.getOrCreateByName("vllm")
> + extra_attry = {
Yes! Thanks!
> + "Custom_attr_1_nvd_score_arrivial_time": "2025-08-03T23:21:39Z",
> + "Custom_attr_2_assigned_to_someone_time": "2025-08-10T11:22:33Z",
> + }
>
> self.bugtask_reference = [
> (
> @@ -378,7 +400,10 @@ class TestSOSSImporter(TestCaseWithFactory):
> ),
> BugTaskStatus.DEFERRED,
> "test note",
> - {"repositories": ["test-repo"]},
> + {
> + "repositories": ["test-repo"],
> + "extra_attrs": self.bugtask_reference[2][3].get("extra_attrs"),
In the spec, the field is defined as a top level field and its data model counterpart was written to be bugtask.metadata, which meant it would be same for each bugtask. I also felt that it was weird, but assumed this was already discussed and known.
> + }, # extra_attrs remains the same as it is bound to the bug
> )
>
> soss_importer._create_or_update_bugtasks(bug, self.soss_record)
--
https://code.launchpad.net/~ilkeremrekoc/launchpad/+git/launchpad/+merge/493278
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilkeremrekoc/launchpad:add-extra-attrs into launchpad:master.
References