Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate apache tomcat importer #1057

Merged
merged 15 commits into from
Jan 23, 2023
Merged

Conversation

johnmhoran
Copy link
Contributor

No description provided.

@johnmhoran johnmhoran force-pushed the 970-migrate-apache-tomcat-importer branch 2 times, most recently from 0305c53 to 0295783 Compare January 4, 2023 01:25
@johnmhoran johnmhoran force-pushed the 970-migrate-apache-tomcat-importer branch 3 times, most recently from e5a7314 to bf56f93 Compare January 10, 2023 22:57
@TG1999 TG1999 added this to the v32.0.0 milestone Jan 17, 2023
@TG1999
Copy link
Contributor

TG1999 commented Jan 20, 2023

@johnmhoran please provide importer and improver logs for this importer.

@johnmhoran
Copy link
Contributor Author

@TG1999 What are importer and improver logs? I don't think I did this for the archlinux, apache_httpd, apache_kafka or postgresql importers.

@TG1999
Copy link
Contributor

TG1999 commented Jan 20, 2023

@johnmhoran please run the importer you have migrated and also run the improver over the data you migrated, and show the logs that you got by running the importer and the improver.

@johnmhoran
Copy link
Contributor Author

Thanks @TG1999 . I'll do a rebase/--force first. Shall I paste the terminal results of running the importer/improver as a comment here?

@TG1999
Copy link
Contributor

TG1999 commented Jan 20, 2023

@johnmhoran you can attach a txt file in comments here

@johnmhoran
Copy link
Contributor Author

Excellent -- will do. 👍

References: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>


Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@johnmhoran johnmhoran force-pushed the 970-migrate-apache-tomcat-importer branch from 4f42d08 to dfd09d2 Compare January 20, 2023 18:58
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@johnmhoran
Copy link
Contributor Author

@TG1999 After running the import command I received the following error:

(venv) Fri Jan 20, 2023 11:34 AM  /home/jmh/dev/nexb/vulnerablecode jmh (970-migrate-apache-tomcat-importer)
$ ./manage.py import vulnerabilities.importers.apache_tomcat.ApacheTomcatImporter
Importing data using vulnerabilities.importers.apache_tomcat.ApacheTomcatImporter
Traceback (most recent call last):
  File "/home/jmh/dev/nexb/vulnerablecode/vulnerabilities/management/commands/import.py", line 60, in import_data
    ImportRunner(importer).run()
  File "/home/jmh/dev/nexb/vulnerablecode/vulnerabilities/import_runner.py", line 44, in run
    count = process_advisories(advisory_datas=advisory_datas, importer_name=importer_name)
  File "/home/jmh/dev/nexb/vulnerablecode/vulnerabilities/import_runner.py", line 57, in process_advisories
    data.summary = data.summary.replace("\x00", "\uFFFD")
AttributeError: 'generator' object has no attribute 'summary'
Failed to run importer vulnerabilities.importers.apache_tomcat.ApacheTomcatImporter. Continuing...
CommandError: 1 failed!: vulnerabilities.importers.apache_tomcat.ApacheTomcatImporter

(venv) Fri Jan 20, 2023 11:39 AM  /home/jmh/dev/nexb/vulnerablecode jmh (970-migrate-apache-tomcat-importer)
$

Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@johnmhoran
Copy link
Contributor Author

johnmhoran commented Jan 20, 2023

@TG1999 I'm attaching vcio-apache_tomcat-import-and-improve-2023-01-20.txt containing the terminal output from
running the import and improve steps. Please note that while both were successful, the import step output included this item:

'RC1' is not a valid SemverVersion InvalidVersion("'RC1' is not a valid <class 'univers.versions.SemverVersion'>")

(We're producing two sets of packages using (1) ApacheVersionRange with SemverVersion and (2) MavenVersionRange with MavenVersion, and the Apache Tomcat version syntax sometimes makes SemverVersion unhappy. We added a try/except to to_version_ranges_apache() with that understanding in mind.)

vcio-apache_tomcat-import-and-improve-2023-01-20.txt

Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Reference: #970

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@TG1999
Copy link
Contributor

TG1999 commented Jan 23, 2023

LGTM!

@TG1999 TG1999 merged commit a78d1c0 into main Jan 23, 2023
@TG1999 TG1999 mentioned this pull request Jan 24, 2023
@TG1999 TG1999 deleted the 970-migrate-apache-tomcat-importer branch February 10, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants