< Niklaus.20220124-ruby-31-part-two | Index | Niklaus.20210310-davaz_com >>
SBSM:
ODBA:
Oddb2xml:
ydbi:
ydocx:
htmlgrid:
spreadsheet:
swissmedic-diff:
oddb.org:
yus:
migel:
Installing Ruby 3.0.0 using /usr/local/src/gen_ruby_310
Attach:gen_ruby_310
Updating the links under /usr/local/bin for irb, rake, gem, bundle, typeprof, rbs, rdoc. Creating /usr/local/bin/ruby (to force the new jit compiler, see https://dl.acm.org/doi/10.1145/3486606.3486781) with the content
#!/usr/bin/env bas, /usr/local/bin/ruby-310 --yjit $@
Updating the dependencies Updating (see commits) the dependices sbsm odba oddb2xml ydbi ydocx htmlgrid spreadsheet swissmedic-diff to ensure that they tested using github actions under Ruby 3.1. Fixing some minor issuees. The rake tests for SBSM run without failures only under Ruyb 2.7, this will be investigated later.
For oddb.org the following changes werde needed to fix the unit tests. Replace YAML.load_documents by YAML.load_stream and specifiy permitted_classes in test/test_model/fachinfo.rb
.
Then I replaced File.exists?(file)
by File.exist?(file)
to get rid of warnings.
Changing in /service/ch.oddb*/run
bundle-300
by bundle-310
First impression are. Pages are loading slower than on oddb-ci2. Logging in does not yet work. The reported error was DRb::DRbConnError: drbssl://127.0.0.1:9997 - #<Errno::ECONNRESET: Connection reset by peer - SSL_connect>
import_daily started fine Used 6.6 GB at the beginning after one hour or so it went up to 16 GB and provoked Out of memory problems and got killed. ch.oddb and other ch.oddb* processes were killed a few minutes, too.
To enable login as desitin I try to regenerate the yus certificate (see https://dev.ywesee.com/Niklaus/20200615-migel-utf-8-ruby-271) by callling in /etc/yus/data
sudo openssl req -new -x509 -key ./yus.key -out ./yus.crt
and restarting yus and ch.oddb*. Now logging in as desitin works as desired.
Running the spec tests now using bundle exec rspec spec 2>&1 | tee spec-2022.01.22.log
. This did not work well, therefore I started with bundle exec rspec spec/smoketest_spec.rb 2>&1 | tee spec-2022.01.22-smoketest.log
Running import_daily had an Memory overflow (even without the --yjit-flag) in running bsv_xml. Reported the two following errors for fachinfo and patinfo
ch.ODDB.org Report - Error: Fach- und Patienteninfo Updates (swissmedicinfo.ch) - 01/2022 Posteingang admin@ywesee.com 12:57 (vor 2 Stunden) an mich Plugin: ODDB::TextInfoPlugin Error: NoMethodError Message: undefined method `text' for #<ODDB::PatinfoDocument:0x00007ff74349f740 @iksnrs=#<ODBA::Stub:4441280#39202086 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @name=#<ODDB::Text::Chapter:0x00007ff743602fd8 @sections=[], @heading="Fusicutan plus crème", @odba_id=39202087, @odba_persistent=true, @odba_observers=[], @odba_prefetch=nil>, @company=#<ODBA::Stub:4441300#39202088 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @galenic_form=nil, @effects=#<ODBA::Stub:4441320#39202089 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @amendments=nil, @contra_indications=#<ODBA::Stub:4441340#39202090 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @precautions=#<ODBA::Stub:4441360#39202091 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @pregnancy=#<ODBA::Stub:4441380#39202092 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @usage=#<ODBA::Stub:4441400#39202093 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @unwanted_effects=#<ODDB::Text::Chapter:0x00007ff7436c2c98 @sections=[#<ODDB::Text::Section:0x00007ff7436c2bf8 @subheading="", @paragraphs=[#<ODDB::Text::Paragraph:0x00007ff7436c2ae0 @preformatted=false, @text="L'utilisation de Fusicutan plus crème peut provoquer les effets secondaires suivants:", @formats=[#<ODDB::Text::Format:0x00007ff7436c29c8 @end=-1, @start=0, @values=[]>], @raw_txt=nil, @format=#<ODDB::Text::Format:0x00007ff7436c29c8 @end=-1, @start=0, @values=[]>>, #<ODDB::Text::Paragraph:0x00007ff7436c28b0 @preformatted=false, @text="Occasionnellement (chez moins de 1 personne sur 100), on a observé des effets indésirables tels que réactions d'hypersensibilité, dermatite de contact, eczéma, sensation de brûlure, démangeaisons, sécheresse cutanée et douleurs/irritation au site d'application. De rares cas d'effets indésirables tels que rougeur cutanée, urticaire, éruption, enflure/vésicules au site d'application ont été observés. Un traitement prolongé risque d'amincir la peau traitée, de dilater de petits vaisseaux superficiels, de former des stries bleu-rouge, d'augmenter la pilosité, d'augmenter la transpiration, de modifier la pigmentation et de provoquer de petites ecchymoses. Un glaucome (augmentation de la pression oculaire) peut se produire en cas d'application près des yeux.", @formats=[#<ODDB::Text::Format:0x00007ff7436c2838 @end=-1, @start=0, @values=[]>], @raw_txt=nil, @format=#<ODDB::Text::Format:0x00007ff7436c2838 @end=-1, @start=0, @values=[]>>, #<ODDB::Text::Paragraph:0x00007ff7436c27e8 @preformatted=false, @text="Chez les enfants et les enfants en bas âge, une quantité plus importante de principe actif parvient dans la circulation sanguine, ce qui peut entraîner entre autres, des troubles de la croissance lors de traitements prolongés.", @formats=[#<ODDB::Text::Format:0x00007ff7436c2770 @end=-1, @start=0, @values=[]>], @raw_txt=nil, @format=#<ODDB::Text::Format:0x00007ff7436c2770 @end=-1, @start=0, @values=[]>>, #<ODDB::Text::Paragraph:0x00007ff7436c2720 @preformatted=false, @text="Si vous remarquez d'autres effets secondaires, veuillez en informer votre médecin ou votre pharmacien.", @formats=[#<ODDB::Text::Format:0x00007ff7436c26a8 @end=-1, @start=0, @values=[]>], @raw_txt=nil, @format=#<ODDB::Text::Format:0x00007ff7436c26a8 @end=-1, @start=0, @values=[]>>]>], @heading="Quels effets secondaires Fusicutan plus crème peut-elle provoquer?", @odba_id=39202094, @odba_persistent=true, @odba_observers=[], @odba_prefetch=nil>, @general_advice=#<ODBA::Stub:4441420#39202095 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @composition=#<ODBA::Stub:4441440#39202096 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @packages=#<ODBA::Stub:4441460#39202097 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @distribution=nil, @fabrication=nil, @date=#<ODBA::Stub:4441480#39202098 @odba_class=ODDB::Text::Chapter @odba_container=4435200#38363302>, @odba_id=38363302, @odba_persistent=true, @odba_observers=[], @odba_prefetch=nil, @revision=2018-06-06 07:48:15.442330255 +0200, @oid=38363302> odba_instance.send(meth_symbol, *args, &block) ^^^^^ Did you mean? test Backtrace: /var/www/oddb.org/vendor/bundle/ruby/3.1.0/gems/odba-1.1.8/lib/odba/stub.rb:115:in `method_missing' (eval):1:in `store_fachinfo' /var/www/oddb.org/src/plugin/text_info.rb:147:in `eval' /var/www/oddb.org/src/plugin/text_info.rb:147:in `store_fachinfo' /var/www/oddb.org/src/plugin/text_info.rb:265:in `update_fachinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:1285:in `parse_textinfo' /var/www/oddb.org/src/plugin/text_info.rb:1488:in `block in import_swissmedicinfo' /var/www/oddb.org/src/plugin/text_info.rb:1487:in `each' /var/www/oddb.org/src/plugin/text_info.rb:1487:in `import_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:537:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:493:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:531:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:329:in `update_textinfo_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:209:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:41:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'and
Plugin: ODDB::TextInfoPlugin Error: NoMethodError Message: undefined method `delete_if' for #<ODDB::PatinfoDocument:0x00007ff6e1f00d90 <...> odba_instance.send(meth_symbol, *args, &block) ^^^^^ Backtrace: /var/www/oddb.org/vendor/bundle/ruby/3.1.0/gems/odba-1.1.8/lib/odba/stub.rb:115:in `method_missing' /var/www/oddb.org/src/model/sequence_observer.rb:25:in `remove_sequence' /var/www/oddb.org/src/model/sequence.rb:420:in `replace_observer' /var/www/oddb.org/src/model/sequence.rb:412:in `patinfo=' /var/www/oddb.org/src/plugin/text_info.rb:333:in `store_package_patinfo' /var/www/oddb.org/src/plugin/text_info.rb:341:in `store_patinfo_for_all_packages' /var/www/oddb.org/src/plugin/text_info.rb:374:in `block in update_patinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:373:in `each' /var/www/oddb.org/src/plugin/text_info.rb:373:in `update_patinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:1294:in `parse_textinfo' /var/www/oddb.org/src/plugin/text_info.rb:1488:in `block in import_swissmedicinfo' /var/www/oddb.org/src/plugin/text_info.rb:1487:in `each' /var/www/oddb.org/src/plugin/text_info.rb:1487:in `import_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:537:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:493:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:531:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:329:in `update_textinfo_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:210:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:41:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'
Also the spec/smoketest reported some errors. Will have a closer look at these problems next monday.
In the meantime sudo -u apache bundle-310 exec ruby-310 jobs/rebuild_indices 2>&1 | tee ~/git/oddb.org/rebuild_indices.log
is running.
But I had to add ydbd-pg to the Gemfile to make it work with the new bundler. Also changing the relevant lines in @/services/migeld/run@ to look like
cd /var/www/migel exec sudo -u apache bundle-310 exec ruby-310 bin/migeld
Now running sudo svc -hu /service/migeld/
is running fine.
This was easy. But I had to add ydbd-pg to the Gemfile to make it work with the new bundler. Also changing the relevant lines in /services/yus/run
to look like
cd /usr/local/src/yus exec sudo -u apache bundle-310 exec bin/yusd
Now running sudo svc -hu /service/migeld/
is running fine.