pushmi_pullyu 2.1.1 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4380518d529c79ac7972e3ab29dee3524082df9e66a3f0f1e3eefbb5c08855d
4
- data.tar.gz: c43b7f5a944ceb4fafa298ebbb7ec47725a8bbff04a8b04ea51874b6bacc2ba6
3
+ metadata.gz: 178780e39d4759d4510533ec9e8d73d48f1caafb2903e8b76059d1f63d831418
4
+ data.tar.gz: 31d7cef11a46cfbee7167f6492f09f721a8f9586624f6793da5b294faab0ae9d
5
5
  SHA512:
6
- metadata.gz: 0c7e9b00f0e8a6727393da41e9060dff06a6b8aba0baf9f7ed84bbc89e17e0988e1858a8c0bd925983ccda379e249374af0c738be976ec21708a3cf6be35b20e
7
- data.tar.gz: 6ed33393e60e371ea74b9eba143ff3ce3f6ddac81954ddf944d68f3d75087f2adc777ac4f8a8db4037c20131201ec0f1325a90d465b3cd06be6fa04a878a728d
6
+ metadata.gz: 924be7d5609673e1d8ca83f3c320a5d6866e12b6baa04795bfd7b4906e25ee57a7180c9c473c404a55f0ba20aa17da213e81fc4ed401d1a76d256e0775efb3e6
7
+ data.tar.gz: 2e9978ce931d0b07e7c5efe51f656e49749765691a56285fa2c223292715a6224197fafd08477f02515c04462d9c23cee61a84dfb70327b5ddb010d4bdf5519d
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ PushmiPullyu is a Ruby application, whose primary job is to manage the flow of c
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7
7
  and releases in PushmiPullyu adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [2.1.3]
10
+ - Refresh authentication token after it expires [#311](https://github.com/ualbertalib/pushmi_pullyu/issues/311)
11
+
12
+ ## [2.1.2]
13
+ - Simplify get entity code [#280](https://github.com/ualbertalib/pushmi_pullyu/issues/280)
14
+
9
15
  ## [2.1.1]
10
16
  - Increase clarity of log files [#433](https://github.com/ualbertalib/pushmi_pullyu/issues/433)
11
17
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pushmi_pullyu (2.1.1)
4
+ pushmi_pullyu (2.1.3)
5
5
  activesupport (>= 5, < 8)
6
6
  bagit (~> 0.4)
7
7
  connection_pool (~> 2.2)
data/docker-compose.yml CHANGED
@@ -6,6 +6,8 @@ services:
6
6
  # swift auth -v -U test:tester -K testing -A http://localhost:8080/auth/v1.0
7
7
  # swift auth
8
8
  # swift post ERA
9
- image: openstackswift/saio
9
+ # image: openstackswift/saio
10
+ # The previously used image was getting connection problems
11
+ image: openstackswift/saio:change_846891_latest
10
12
  ports:
11
13
  - '8080:8080'
@@ -199,13 +199,14 @@ class PushmiPullyu::CLI
199
199
  def run_preservation_cycle
200
200
  begin
201
201
  entity = queue.wait_next_item
202
- PushmiPullyu::Logging.log_preservation_attempt(entity,
203
- queue.get_entity_ingestion_attempt(entity))
204
- return unless entity && entity[:type].present? && entity[:uuid].present?
205
202
  rescue StandardError => e
206
203
  log_exception(e)
207
204
  end
208
205
 
206
+ return unless entity && entity[:type].present? && entity[:uuid].present?
207
+
208
+ PushmiPullyu::Logging.log_preservation_attempt(entity,
209
+ queue.get_entity_ingestion_attempt(entity))
209
210
  # add additional information about the error context to errors that occur while processing this item.
210
211
  Rollbar.scoped(entity_uuid: entity[:uuid]) do
211
212
  # Download AIP from Jupiter, bag and tar AIP directory and cleanup after
@@ -225,7 +226,7 @@ class PushmiPullyu::CLI
225
226
  queue.add_entity_in_timeframe(entity)
226
227
  PushmiPullyu::Logging.log_preservation_fail_and_retry(entity, queue.get_entity_ingestion_attempt(entity), e)
227
228
  rescue PushmiPullyu::PreservationQueue::MaxDepositAttemptsReached => e
228
- PushmiPullyu::Logging.log_preservation_failure(entity, queue.get_entity_ingestion_attempt(entity), e)
229
+ PushmiPullyu::Logging.log_preservation_failure(entity, PushmiPullyu.options[:ingestion_attempts], e)
229
230
  log_exception(e)
230
231
  end
231
232
 
@@ -1,10 +1,7 @@
1
1
  require 'digest/md5'
2
2
  require 'openstack'
3
-
4
3
  class PushmiPullyu::SwiftDepositer
5
4
 
6
- attr_reader :swift_connection
7
-
8
5
  def initialize(connection)
9
6
  # Generic authentication parameters
10
7
  swift_connection_parameters = {
@@ -13,7 +10,11 @@ class PushmiPullyu::SwiftDepositer
13
10
  auth_url: connection[:auth_url],
14
11
  project_name: connection[:project_name],
15
12
  auth_method: 'password',
16
- service_type: 'object-store'
13
+ service_type: 'object-store',
14
+ # The retry_auth value should be true by default. It is currently set
15
+ # to nil which causes the connection to die without giving more error
16
+ # details.
17
+ retry_auth: true
17
18
  }
18
19
 
19
20
  if connection[:auth_version] == 'v3'
@@ -28,10 +29,8 @@ class PushmiPullyu::SwiftDepositer
28
29
 
29
30
  def deposit_file(file_name, swift_container)
30
31
  file_base_name = File.basename(file_name, '.*')
31
-
32
32
  checksum = Digest::MD5.file(file_name).hexdigest
33
-
34
- era_container = swift_connection.container(swift_container)
33
+ era_container = @swift_connection.container(swift_container)
35
34
 
36
35
  # Add swift metadata with in accordance to AIP spec:
37
36
  # https://docs.google.com/document/d/154BqhDPAdGW-I9enrqLpBYbhkF9exX9lV3kMaijuwPg/edit#
@@ -1,3 +1,3 @@
1
1
  module PushmiPullyu
2
- VERSION = '2.1.1'.freeze
2
+ VERSION = '2.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushmi_pullyu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Murnaghan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-06-05 00:00:00.000000000 Z
12
+ date: 2024-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport