From 3c9cebc6d0cd44044a0268a09a62079cd8cb2e5b Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Fri, 11 Nov 2022 16:14:14 -0800 Subject: [PATCH 1/4] report ZIP_PARTS_SIZE_INCONSISTENCY to DSA event service and to honeybadger --- app/services/audit_reporters/event_service_reporter.rb | 3 ++- app/services/audit_reporters/honeybadger_reporter.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/services/audit_reporters/event_service_reporter.rb b/app/services/audit_reporters/event_service_reporter.rb index a3b3d22a4..1c6eca592 100644 --- a/app/services/audit_reporters/event_service_reporter.rb +++ b/app/services/audit_reporters/event_service_reporter.rb @@ -31,7 +31,8 @@ def handled_merge_codes Audit::Results::ZIP_PART_NOT_FOUND, Audit::Results::ZIP_PARTS_COUNT_DIFFERS_FROM_ACTUAL, Audit::Results::ZIP_PARTS_COUNT_INCONSISTENCY, - Audit::Results::ZIP_PARTS_NOT_ALL_REPLICATED + Audit::Results::ZIP_PARTS_NOT_ALL_REPLICATED, + Audit::Results::ZIP_PARTS_SIZE_INCONSISTENCY ].freeze end diff --git a/app/services/audit_reporters/honeybadger_reporter.rb b/app/services/audit_reporters/honeybadger_reporter.rb index f8ce87406..489accbbb 100644 --- a/app/services/audit_reporters/honeybadger_reporter.rb +++ b/app/services/audit_reporters/honeybadger_reporter.rb @@ -14,7 +14,8 @@ def handled_single_codes Audit::Results::ZIP_PART_NOT_FOUND, Audit::Results::ZIP_PARTS_COUNT_DIFFERS_FROM_ACTUAL, Audit::Results::ZIP_PARTS_COUNT_INCONSISTENCY, - Audit::Results::ZIP_PARTS_NOT_ALL_REPLICATED + Audit::Results::ZIP_PARTS_NOT_ALL_REPLICATED, + Audit::Results::ZIP_PARTS_SIZE_INCONSISTENCY ].freeze end From 0a4ca175c2b3439a1a72ed25aa406a1a8b49d296 Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Tue, 29 Nov 2022 15:58:33 -0800 Subject: [PATCH 2/4] fix test description --- spec/services/audit/checksum_validator_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/services/audit/checksum_validator_spec.rb b/spec/services/audit/checksum_validator_spec.rb index c0e18f979..cdde2e586 100644 --- a/spec/services/audit/checksum_validator_spec.rb +++ b/spec/services/audit/checksum_validator_spec.rb @@ -486,7 +486,7 @@ before { allow(Audit::Results).to receive(:new).and_return(results) } - it 'adds a MANIFEST_NOT_IN_MOAB error' do + it 'adds a SIGNATURE_CATALOG_NOT_IN_MOAB error' do expect(results).to receive(:add_result).with( Audit::Results::SIGNATURE_CATALOG_NOT_IN_MOAB, signature_catalog_path: "#{object_dir}/v0002/manifests/signatureCatalog.xml" ) From 38785512ac54913e07083f624cc683905d7157e4 Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Tue, 29 Nov 2022 15:59:21 -0800 Subject: [PATCH 3/4] re-enable workflow reporting of replication audit status codes, fix namespacing --- .../audit_reporters/audit_workflow_reporter.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/services/audit_reporters/audit_workflow_reporter.rb b/app/services/audit_reporters/audit_workflow_reporter.rb index e9aca8b92..c912bb0fe 100644 --- a/app/services/audit_reporters/audit_workflow_reporter.rb +++ b/app/services/audit_reporters/audit_workflow_reporter.rb @@ -25,14 +25,13 @@ def handled_merge_codes Audit::Results::MOAB_NOT_FOUND, Audit::Results::SIGNATURE_CATALOG_NOT_IN_MOAB, Audit::Results::UNABLE_TO_CHECK_STATUS, - Audit::Results::UNEXPECTED_VERSION - # Temporary fix for workflow-service throwing exceptions - # because some error reports from MoabReplicationAudit are too long - # ZIP_PART_CHECKSUM_MISMATCH, - # ZIP_PART_NOT_FOUND, - # ZIP_PARTS_COUNT_DIFFERS_FROM_ACTUAL, - # ZIP_PARTS_COUNT_INCONSISTENCY, - # ZIP_PARTS_NOT_ALL_REPLICATED + Audit::Results::UNEXPECTED_VERSION, + Audit::Results::ZIP_PART_CHECKSUM_MISMATCH, + Audit::Results::ZIP_PART_NOT_FOUND, + Audit::Results::ZIP_PARTS_COUNT_DIFFERS_FROM_ACTUAL, + Audit::Results::ZIP_PARTS_COUNT_INCONSISTENCY, + Audit::Results::ZIP_PARTS_SIZE_INCONSISTENCY, + Audit::Results::ZIP_PARTS_NOT_ALL_REPLICATED ].freeze end From 3620f06ac2e40ea3b090ad1ab28105faa7def8d8 Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Thu, 19 Jan 2023 09:05:50 -0800 Subject: [PATCH 4/4] ValidateMoabJob: note about why it lives in pres cat --- app/jobs/validate_moab_job.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/jobs/validate_moab_job.rb b/app/jobs/validate_moab_job.rb index 47034652c..e67ee243b 100644 --- a/app/jobs/validate_moab_job.rb +++ b/app/jobs/validate_moab_job.rb @@ -1,9 +1,10 @@ # frozen_string_literal: true # Confirm checksums for one Moab object on storage (not in database) -# Called from ObjectsController, which is typically called by preservation-robots -# in validate-moab step of preservationIngestWF step +# @note Called from ObjectsController, which is typically called by preservation-robots +# in validate-moab step of preservationIngestWF # (https://github.com/sul-dlss/workflow-server-rails/blob/main/config/workflows/preservationIngestWF.xml#L18) - +# For explanation as to why, see comment in preservation_robots Robots::SdrRepo::PreservationIngest::ValidateMoab. class ValidateMoabJob < ApplicationJob queue_as :validate_moab