Open sgoggins opened 3 years ago
This is what I see in your traceback:
npsycopg2.errors.NotNullViolation: null value in column "file_type_id" violates not-null constraint
DETAIL: Failing row contains
(113783, null, ce7484e98cf345f1a755d49827bda7878a72a9008ff8d5928e52c601663aa97e, null, 101, , ).
I don't know why, but this error started popping up because the database stopped accepting null values for the file_type_id. I don't know why it started happening, but thankfully we don't ever need the file_type_id for our use case, so I changed the schema to allow null values for that item.
Running the following command should fix the schema and get the database ready for a new set of scans:
dosocs2 dbinit -f /path/to/augur-spdx/dosocs2.conf
It will reset the spdx
schema of the targeted database, as the schema changes normally do
Please ensure that you have the correct database by reviewing the URI it provides for you at runtime.
@Nebrethar : I want to make sure Augur controls the schema definition. So, if I reverse engineer the change you made in augur-howison
are we good? How do I get the "mapping table" populated when it fails for some reason?
Just to be sure, I'm talking about the augur-spdx schema that is initialized when you install augur-spdx, or reinitialize the spdx schema.
I'm not sure what augur-howison
is. I'm pretty sure I didn't make any changes there 🤣 For some reason, I thought you were working with another database that had an empty spdx schema.
That dbinit
command is all you will need to adjust the schema.
@Nebrethar : Got another, similar error.
Same database as before, and it looks like it failed on the same repo. There seems to be an issue when it encounters a bitbucket repository.
It fails on more than BitBucket. Here is the full list of URL formats it fails on:
bitbucket.org/OSDT/
r.cs.purdue.edu/
github.com/
r.cs.purdue.edu/
source.usc.edu/svn/
git.eclipse.org/c/ptp/
sourceforge.net/projects/
git-wip-us.apache.org/repos/
github.com/cp2k/cp2k/
icl.cs.utk.edu/svn/scalapack-dev/scalapack/
charm.cs.illinois.edu/gerrit/
This leads me to believe that augur-spdx only works on standard format github.com/owner/repo
URLs. Though I can't quite remember why.