Uh oh!
There was an error while loading. Please reload this page.
Dump importer_yielder in favor of IMPORTER_REGISTRY and drop Etags - #600
Conversation
457c91f to
4a24a14Compare4a24a14 to
7175362Compare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks! I have a few suggestions and ... Could you add tests?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
89cdfee to
058b9a8CompareIMPORTER_REGISTRY is neater and does not do any magical string -> object conversion. The registry looks more in sync with improvers. Fixes: aboutcode-org#501 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
058b9a8 to
0c4905eCompareThe name DataSource and Importer were majorly used interchangeably although they represent the same concept. Also, the importers now require a mandatory ``spdx_license_expression`` to run Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Same for improvers IMPROVER_REGISTRY -> IMPROVERS_REGISTRY Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
We can use @classmethod and @Property together in python 3.9. Not so in 3.8 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
0c4905e to
c62f81fCompare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks... see a few final nits for your consideration.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| class GitDataSource(DataSource): | ||
| CONFIG_CLASS = GitDataSourceConfiguration | ||
| # TODO: Needs rewrite |
There was a problem hiding this comment.
May be an issue to track may work better?
Uh oh!
There was an error while loading. Please reload this page.
| assert advisory_datas == ADVISORY_DATAS | ||
| def test_ImportRunner_existing_package_and_new_vulnerability(db): |
There was a problem hiding this comment.
Could this test be kept somehow? to valid that we never will allow twice the same set of imported data?
There was a problem hiding this comment.
| assert vuln_refs[0].url == "https://example.com/with/more/info/CVE-2020-13371337" | ||
| def test_ImportRunner_new_package_version_affected_by_existing_vulnerability(db): |
There was a problem hiding this comment.
IMHO this may be need to be kept
| assert impacted_package.vulnerability.vulnerability_id == "CVE-2020-13371337" | ||
| # def test_ImportRunner_fixed_package_version_is_added(db): |
There was a problem hiding this comment.
Could this test have been of value? and need to be kept?
| # assert resolved_package.vulnerability.vulnerability_id == "CVE-2020-13371337" | ||
| def test_ImportRunner_updated_vulnerability(db): |
There was a problem hiding this comment.
IMHO this may be need to be kept, moved to improvers?
There was a problem hiding this comment.
All of these will be moved to improvers. Importers cannot test relationships. It will be a part of a new PR. Tracked in: #612
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com> Co-authored-by: Philippe Ombredanne <pombredanne@gmail.com>
61023e6 to
45cdaf5Compare
The name
DataSourceandImporterare majorly used interchangeably. This needs to be fixed in a different PR.