From c1a2d1a34af34a36d2c1dbb6fdef49fa190d7110 Mon Sep 17 00:00:00 2001 From: John Ferlito Date: Sun, 8 Sep 2024 17:32:07 +1000 Subject: [PATCH] make the rocrate log tasks non noisy --- Gemfile.lock | 247 ++++++++++++++++++++--------------------- README.md | 27 ----- lib/tasks/rocrate.rake | 4 + 3 files changed, 126 insertions(+), 152 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6d9bd088..75bde8bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,29 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.2.0) - actionpack (= 7.2.0) - activesupport (= 7.2.0) + actioncable (7.2.1) + actionpack (= 7.2.1) + activesupport (= 7.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.0) - actionpack (= 7.2.0) - activejob (= 7.2.0) - activerecord (= 7.2.0) - activestorage (= 7.2.0) - activesupport (= 7.2.0) + actionmailbox (7.2.1) + actionpack (= 7.2.1) + activejob (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) mail (>= 2.8.0) - actionmailer (7.2.0) - actionpack (= 7.2.0) - actionview (= 7.2.0) - activejob (= 7.2.0) - activesupport (= 7.2.0) + actionmailer (7.2.1) + actionpack (= 7.2.1) + actionview (= 7.2.1) + activejob (= 7.2.1) + activesupport (= 7.2.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.0) - actionview (= 7.2.0) - activesupport (= 7.2.0) + actionpack (7.2.1) + actionview (= 7.2.1) + activesupport (= 7.2.1) nokogiri (>= 1.8.5) racc rack (>= 2.2.4, < 3.2) @@ -32,20 +32,20 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.0) - actionpack (= 7.2.0) - activerecord (= 7.2.0) - activestorage (= 7.2.0) - activesupport (= 7.2.0) + actiontext (7.2.1) + actionpack (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.0) - activesupport (= 7.2.0) + actionview (7.2.1) + activesupport (= 7.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activeadmin (3.2.3) + activeadmin (3.2.5) arbre (~> 1.2, >= 1.2.1) csv formtastic (>= 3.1) @@ -55,22 +55,22 @@ GEM kaminari (>= 1.2.1) railties (>= 6.1) ransack (>= 4.0) - activejob (7.2.0) - activesupport (= 7.2.0) + activejob (7.2.1) + activesupport (= 7.2.1) globalid (>= 0.3.6) - activemodel (7.2.0) - activesupport (= 7.2.0) - activerecord (7.2.0) - activemodel (= 7.2.0) - activesupport (= 7.2.0) + activemodel (7.2.1) + activesupport (= 7.2.1) + activerecord (7.2.1) + activemodel (= 7.2.1) + activesupport (= 7.2.1) timeout (>= 0.4.0) - activestorage (7.2.0) - actionpack (= 7.2.0) - activejob (= 7.2.0) - activerecord (= 7.2.0) - activesupport (= 7.2.0) + activestorage (7.2.1) + actionpack (= 7.2.1) + activejob (= 7.2.1) + activerecord (= 7.2.1) + activesupport (= 7.2.1) marcel (~> 1.0) - activesupport (7.2.0) + activesupport (7.2.1) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -83,25 +83,25 @@ GEM tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - annotaterb (4.10.2) + annotaterb (4.11.0) arbre (1.7.0) activesupport (>= 3.0.0) ruby2_keywords (>= 0.0.2) ast (2.4.2) aws-eventstream (1.3.0) - aws-partitions (1.963.0) - aws-record (2.13.1) + aws-partitions (1.971.0) + aws-record (2.13.2) aws-sdk-dynamodb (~> 1, >= 1.85.0) - aws-sdk-core (3.201.4) + aws-sdk-core (3.203.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.8) + aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-dynamodb (1.118.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-dynamodb (1.119.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-kms (1.88.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-kms (1.89.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) aws-sdk-rails (4.0.3) actionmailbox (>= 7.0.0) @@ -114,21 +114,21 @@ GEM aws-sessionstore-dynamodb (~> 2) concurrent-ruby (~> 1.3, >= 1.3.1) railties (>= 7.0.0) - aws-sdk-s3 (1.157.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-s3 (1.160.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sdk-ses (1.68.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-ses (1.70.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-sesv2 (1.55.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-sesv2 (1.57.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-sns (1.82.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-sns (1.83.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-sqs (1.80.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-sqs (1.81.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) aws-sessionstore-dynamodb (2.2.0) aws-sdk-dynamodb (~> 1, >= 1.85.0) @@ -144,7 +144,7 @@ GEM bindex (0.8.1) bootsnap (1.18.4) msgpack (~> 1.2) - brakeman (6.1.2) + brakeman (6.2.1) racc builder (3.3.0) cancancan (3.6.1) @@ -157,7 +157,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (5.0.7) + chartkick (5.1.0) childprocess (5.1.0) logger (~> 1.5) chronic (0.10.2) @@ -198,17 +198,17 @@ GEM erubi (1.13.0) et-orbi (1.2.11) tzinfo - factory_bot (6.4.6) + factory_bot (6.5.0) activesupport (>= 5.0.0) factory_bot_rails (6.4.3) factory_bot (~> 6.4) railties (>= 5.0.0) - faraday (2.10.1) - faraday-net_http (>= 2.0, < 3.2) + faraday (2.11.0) + faraday-net_http (>= 2.0, < 3.4) logger faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) - faraday-net_http (3.1.1) + faraday-net_http (3.3.0) net-http faraday_middleware-aws-sigv4 (1.0.1) aws-sigv4 (~> 1.0) @@ -219,7 +219,7 @@ GEM formtastic (5.0.0) actionpack (>= 6.0.0) formtastic_i18n (0.7.0) - fugit (1.11.0) + fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) globalid (1.2.1) @@ -316,7 +316,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.0) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -330,7 +330,7 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.0) + minitest (5.25.1) mission_control-jobs (0.3.1) importmap-rails irb (~> 1.13) @@ -343,7 +343,7 @@ GEM nenv (0.3.0) net-http (0.4.1) uri - net-imap (0.4.14) + net-imap (0.4.16) date net-protocol net-pop (0.1.2) @@ -370,14 +370,14 @@ GEM faraday (>= 1.0, < 3) multi_json (>= 1.0) orm_adapter (0.5.0) - paper_trail (15.1.0) + paper_trail (15.2.0) activerecord (>= 6.1) request_store (~> 1.4) - parallel (1.26.2) - parser (3.3.4.2) + parallel (1.26.3) + parser (3.3.5.0) ast (~> 2.4.1) racc - prism (0.30.0) + prism (1.0.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -396,20 +396,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.2.0) - actioncable (= 7.2.0) - actionmailbox (= 7.2.0) - actionmailer (= 7.2.0) - actionpack (= 7.2.0) - actiontext (= 7.2.0) - actionview (= 7.2.0) - activejob (= 7.2.0) - activemodel (= 7.2.0) - activerecord (= 7.2.0) - activestorage (= 7.2.0) - activesupport (= 7.2.0) + rails (7.2.1) + actioncable (= 7.2.1) + actionmailbox (= 7.2.1) + actionmailer (= 7.2.1) + actionpack (= 7.2.1) + actiontext (= 7.2.1) + actionview (= 7.2.1) + activejob (= 7.2.1) + activemodel (= 7.2.1) + activerecord (= 7.2.1) + activestorage (= 7.2.1) + activesupport (= 7.2.1) bundler (>= 1.15.0) - railties (= 7.2.0) + railties (= 7.2.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -424,9 +424,9 @@ GEM rails-reverse-proxy (0.13.0) actionpack addressable - railties (7.2.0) - actionpack (= 7.2.0) - activesupport (= 7.2.0) + railties (7.2.1) + actionpack (= 7.2.1) + activesupport (= 7.2.1) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -441,15 +441,15 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rbi (0.1.14) - prism (>= 0.18.0, < 1.0.0) + rbi (0.2.0) + prism (~> 1.0) sorbet-runtime (>= 0.5.9204) rbs (2.8.4) rdoc (6.7.0) psych (>= 4.0.0) recaptcha (5.17.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) @@ -458,8 +458,7 @@ GEM railties (>= 5.2) reverse_markdown (2.1.1) nokogiri - rexml (3.3.5) - strscan + rexml (3.3.7) roo (2.10.1) nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) @@ -471,35 +470,34 @@ GEM rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) + rspec-core (3.13.1) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (7.0.1) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.65.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.0) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -507,16 +505,16 @@ GEM rubocop (~> 1.61) rubocop-graphql (1.5.4) rubocop (>= 1.50, < 2) - rubocop-minitest (0.35.1) + rubocop-minitest (0.36.0) rubocop (>= 1.61, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.25.1) + rubocop-rails (2.26.1) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails-omakase (1.0.0) rubocop @@ -525,7 +523,7 @@ GEM rubocop-rails rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (3.0.4) + rubocop-rspec (3.0.5) rubocop (~> 1.61) rubocop-rspec_rails (2.30.0) rubocop (~> 1.61) @@ -534,8 +532,8 @@ GEM ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.3.2) - rufus-scheduler (3.9.1) - fugit (~> 1.1, >= 1.1.6) + rufus-scheduler (3.9.2) + fugit (~> 1.1, >= 1.11.1) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -548,11 +546,11 @@ GEM activerecord (>= 6.1) chartkick (>= 5) groupdate (>= 6) - searchkick (5.3.1) + searchkick (5.4.0) activemodel (>= 6.1) hashie securerandom (0.3.1) - selenium-webdriver (4.23.0) + selenium-webdriver (4.24.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -589,13 +587,13 @@ GEM fugit (~> 1.11.0) railties (>= 7.1) thor (~> 1.3.1) - sorbet (0.5.11520) - sorbet-static (= 0.5.11520) - sorbet-runtime (0.5.11520) - sorbet-static (0.5.11520-x86_64-linux) - sorbet-static-and-runtime (0.5.11520) - sorbet (= 0.5.11520) - sorbet-runtime (= 0.5.11520) + sorbet (0.5.11558) + sorbet-static (= 0.5.11558) + sorbet-runtime (0.5.11558) + sorbet-static (0.5.11558-x86_64-linux) + sorbet-static-and-runtime (0.5.11558) + sorbet (= 0.5.11558) + sorbet-runtime (= 0.5.11558) spoom (1.4.2) erubi (>= 1.10.0) prism (>= 0.28.0) @@ -611,21 +609,20 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - stimulus-rails (1.3.3) + stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) - strscan (3.1.0) - tapioca (0.16.0) + tapioca (0.16.2) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.1.14, < 0.2) + rbi (~> 0.2) sorbet-static-and-runtime (>= 0.5.11087) spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet temple (0.10.3) - thor (1.3.1) + thor (1.3.2) tilt (2.4.0) timeout (0.4.1) traceroute (0.8.1) @@ -638,7 +635,7 @@ GEM concurrent-ruby (~> 1.0) unaccent (0.4.0) unicode-display_width (2.5.0) - uri (0.13.0) + uri (0.13.1) useragent (0.16.10) warden (1.2.9) rack (>= 2.0.9) @@ -656,11 +653,11 @@ GEM chronic (>= 0.6.3) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.36) + yard (0.9.37) yard-sorbet (0.9.0) sorbet-runtime yard - zeitwerk (2.6.17) + zeitwerk (2.6.18) PLATFORMS x86_64-linux diff --git a/README.md b/README.md index 593d375c..cf74c838 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ ACCOUNT=$(AWS_PROFILE=nabu-stage aws sts get-caller-identity | jq -r .Account) AWS_PROFILE=nabu-stage aws ecr get-login-password --region ap-southeast-2 | docker login --username AWS --password-stdin $ACCOUNT.dkr.ecr.ap-southeast-2.amazonaws.com ``` - ## Deployment Use CDK to deploy new code via docker as well as any infrastructure changes @@ -84,32 +83,6 @@ nabu_run bin/rake db:migrate nabu_run bin/rake searchkick:reindex:all ``` -## Production Tasks - -import archive files - -``` bash -RAILS_ENV=production bundle exec rake archive:update_files -``` - -check if all files that have been uploaded are ok: -``` bash -cd /srv/www/nabu/current -RAILS_ENV=production bundle exec rake --trace archive:update_files > log/update_files.log -``` - -check if all *-CAT-PDSC_ADMIN.xml files exist and create if necessary: -``` bash -cd /srv/www/nabu/current -RAILS_ENV=production bundle exec rake --trace archive:admin_files > log/admin_files.log -``` - -delete a collection with all its items: -``` bash -cd /srv/www/nabu/current -RAILS_ENV=production bundle exec rake archive:delete_collection[PA1] - - # New Ethnologue data We use the following source locations diff --git a/lib/tasks/rocrate.rake b/lib/tasks/rocrate.rake index 86e90b2f..418ad4d4 100644 --- a/lib/tasks/rocrate.rake +++ b/lib/tasks/rocrate.rake @@ -37,6 +37,8 @@ namespace :rocrate do desc 'Generate ro-crate for all collections and save to S3' task collections: :environment do + ActiveJob::Base.logger = Logger.new(nil) + total = 0 Collection.find_each do |collection| collection.update_catalog_metadata @@ -48,6 +50,8 @@ namespace :rocrate do desc 'Generate ro-crate for all items and save to S3' task items: :environment do + ActiveJob::Base.logger = Logger.new(nil) + total = 0 Item.find_each do |item| item.update_catalog_metadata