@@ -125,12 +125,9 @@ def spdx_validate(document):
125
125
validation_messages = validate_full_spdx_document (document )
126
126
print (f"SPDX validation took { time .process_time () - start } seconds" )
127
127
128
- # TODO is there a way to distinguish between something fatal and something
129
- # BD can deal with?
130
128
for validation_message in validation_messages :
131
- # Just printing these messages intead of exiting. Later when we try to import
132
- # the file to BD, let's plan to exit if it fails. Seeing lots of errors in the
133
- # sample data.
129
+ # Just printing these messages intead of exiting.
130
+ # Later when the file is imported, BD errors will be fatal.
134
131
logging .warning (validation_message .validation_message )
135
132
136
133
# Returns MIME type to provide to scan API
@@ -272,29 +269,6 @@ def poll_for_sbom_scan(sbom_name, projver):
272
269
# If we got this far, it's a fatal error.
273
270
sys .exit (1 )
274
271
275
- # Poll for BOM completion
276
- # TODO currently unused, may delete
277
- # Input: Name of SBOM document (not the filename, the name defined inside the json body)
278
- # Returns on success. Errors will result in fatal exit.
279
- def poll_for_bom_complete (proj_version_url ):
280
- max_retries = 30
281
- sleep_time = 10
282
-
283
- while (max_retries ):
284
- max_retries -= 1
285
- json_data = bd .get_json (proj_version_url + "/bom-status" )
286
- if json_data ['status' ] == "UP_TO_DATE" :
287
- return
288
- elif json_data ['status' ] == "FAILURE" :
289
- logging .error (f"BOM Scan Failed" )
290
- sys .exit (1 )
291
- elif json_data ['status' ] == "NOT_INCLUDED" :
292
- logging .error (f"BOM scan had no matches" )
293
- sys .exit (1 )
294
- else :
295
- print (f"Waiting for BOM scan success, currently: { json_data ['status' ]} " )
296
- time .sleep (sleep_time )
297
-
298
272
# Upload provided SBOM file to Black Duck
299
273
# Inputs:
300
274
# filename - Name of file to upload
0 commit comments