Skip to content

Commit

Permalink
Merge pull request #2275 from sul-dlss/zip-part-size-inconsistency-to…
Browse files Browse the repository at this point in the history
…-hb-and-event-svc_etc

Report ZIP_PARTS_SIZE_INCONSISTENCY to HB and event service, and other smallt touchups
  • Loading branch information
justinlittman authored Oct 23, 2023
2 parents 73fdf73 + 3620f06 commit 507fc4d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions app/jobs/validate_moab_job.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
15 changes: 7 additions & 8 deletions app/services/audit_reporters/audit_workflow_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion app/services/audit_reporters/event_service_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion app/services/audit_reporters/honeybadger_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/services/audit/checksum_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 507fc4d

Please sign in to comment.