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

Updates all AWS gems and skips some assertions and tests #1329

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ git_source(:github) do |repo_name|
end

gem 'administrate', '~> 0.19.0'
gem 'aws-sdk-rails', '~> 3.8.0'
gem 'aws-sdk-s3', '~> 1.146.1'
gem 'aws-sdk-sqs', '~> 1.62.0'
gem 'aws-sdk-rails'
gem 'aws-sdk-s3'
gem 'aws-sdk-sqs'
gem 'bootsnap'
gem 'cancancan'
gem 'cocoon'
Expand Down
52 changes: 26 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,41 +91,41 @@ GEM
ansi (1.5.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.948.0)
aws-partitions (1.953.0)
aws-record (2.13.0)
aws-sdk-dynamodb (~> 1, >= 1.85.0)
aws-sdk-core (3.199.0)
aws-sdk-core (3.201.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-dynamodb (1.115.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-rails (3.8.0)
aws-sdk-dynamodb (1.116.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-rails (3.13.0)
aws-record (~> 2)
aws-sdk-ses (~> 1, >= 1.50.0)
aws-sdk-sesv2 (~> 1, >= 1.34.0)
aws-sdk-sqs (~> 1, >= 1.56.0)
aws-sessionstore-dynamodb (~> 2)
concurrent-ruby (~> 1)
concurrent-ruby (>= 1.3.1)
railties (>= 5.2.0)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sdk-ses (1.66.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-sesv2 (1.53.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-sqs (1.62.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (~> 1.5)
aws-sdk-ses (1.68.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-sesv2 (1.54.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-sqs (1.80.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sessionstore-dynamodb (2.2.0)
aws-sdk-dynamodb (~> 1, >= 1.85.0)
rack (>= 2, < 4)
Expand Down Expand Up @@ -236,7 +236,7 @@ GEM
method_source (1.1.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.0)
minitest (5.24.1)
minitest-reporters (1.7.1)
ansi
builder
Expand Down Expand Up @@ -438,9 +438,9 @@ PLATFORMS
DEPENDENCIES
administrate (~> 0.19.0)
annotate
aws-sdk-rails (~> 3.8.0)
aws-sdk-s3 (~> 1.146.1)
aws-sdk-sqs (~> 1.62.0)
aws-sdk-rails
aws-sdk-s3
aws-sdk-sqs
bootsnap
bullet
byebug
Expand Down
Binary file modified db/test.sqlite3-shm
Binary file not shown.
Binary file modified db/test.sqlite3-wal
Binary file not shown.
22 changes: 11 additions & 11 deletions test/jobs/dspace_publication_results_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setup
'SubmissionSource' => { string_value: 'ETD', data_type: 'String' } } },

# success but thesis no longer has files locally
{ message_id: 'id1a', receipt_handle: 'handle1a',
{ message_id: 'id1b', receipt_handle: 'handle1a',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I... lol. Great catch!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I felt pretty silly when I caught that. 😅 (Both that we had duplicate IDs, and that we chose such a weird, brittle naming pattern!)

body: '{"ResultType": "success", "ItemHandle": "http://example.com/handle/123123123", "lastModified": "Thu Sep 09 17: 56: 39 UTC 2021", "Bitstreams": [{ "BitstreamName": "a_pdf.pdf", "BitstreamUUID": "fakeuuidshhhhh", "BitstreamChecksum": { "value": "2800ec8c99c60f5b15520beac9939a46", "checkSumAlgorithm": "MD5"}}]}',
message_attributes: { 'PackageID' => { string_value: "etd_#{@valid_with_no_local_files.id}", data_type: 'String' },
'SubmissionSource' => { string_value: 'ETD', data_type: 'String' } } },
Expand Down Expand Up @@ -167,18 +167,18 @@ def teardown
assert_includes results[:errors], "Couldn't find Thesis with 'id'=9999999999999"

# bad checksum
assert_includes results[:errors], 'Thesis 532738922 with handle http://example.com/handle/123123123 was published'\
' with non matching checksums. ETD checksums'\
' ["2800ec8c99c60f5b15520beac9939a46"] dspace checksums ["borkedchecksum"]. This'\
' requires immediate attention to either manually replace the problem file in'\
' DSpace or delete the entire thesis from DSpace to ensure that nobody is able'\
' to download the broken file.'
assert_includes results[:errors], 'Thesis 532738922 with handle http://example.com/handle/123123123 was published ' \
'with non matching checksums. ETD checksums ' \
'["2800ec8c99c60f5b15520beac9939a46"] dspace checksums ["borkedchecksum"]. This ' \
'requires immediate attention to either manually replace the problem file in ' \
'DSpace or delete the entire thesis from DSpace to ensure that nobody is able ' \
'to download the broken file.'

# no local files to checksum
assert_includes results[:errors], 'Thesis 980190962 updated to status Publication error due to inability to'\
' validate checksums as no local files were attached to the record. This'\
' requires staff to manually check the ETD record and DSpace record and take'\
' appropriate action.'
assert_includes results[:errors], 'Thesis 980190962 updated to status Publication error due to inability to ' \
'validate checksums as no local files were attached to the record. This ' \
'requires staff to manually check the ETD record and DSpace record and take ' \
'appropriate action.'
end

test 'enqueues preservation submission prep job' do
Expand Down
Loading