onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
34 stars 12 forks source link

Terminology Generation not working in RC1 build #26

Closed danielkitchener closed 2 years ago

danielkitchener commented 2 years ago

When I run the terminology build ( docker-compose -f terminology_compose.yml build ) with the latest RC1 code, I get an error. This was previously working fine before the RC1 build.

Error Text:

[!] There was an error parsing `Gemfile`:
[!] There was an error while loading `onc_certification_g10_test_kit.gemspec`: cannot load such file -- /opt/inferno/lib/onc_certification_g10_test_kit/version. Bundler cannot continue.

 #  from /opt/inferno/onc_certification_g10_test_kit.gemspec:1
 #  -------------------------------------------
 >  require_relative 'lib/onc_certification_g10_test_kit/version'
 #
 #  -------------------------------------------
. Bundler cannot continue.

 #  from /opt/inferno/Gemfile:5
 #  -------------------------------------------
 #
 >  gemspec
 #
 #  -------------------------------------------
1 error occurred:
        * Status: The command '/bin/sh -c bundle install' returned a non-zero code: 14, Code: 14

This is fixed by adding the line:

ADD lib/onc_certification_g10_test_kit/version.rb $INSTALL_PATH/lib/onc_certification_g10_test_kit/version.rb

to Dockerfile.terminology between lines 14 and 15, this fixes the issue. It looks like this was done for the Dockerfile but missed in Dockerfile.terminology as part of the RC update.

danielkitchener commented 2 years ago

Another issue I found in terminology generation - if CLEANUP is not set to true:

NameError: uninitialized constant Inferno::Terminology::Tasks::CleanupPrecursors::TempDir
Did you mean?  Tempfile
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks/cleanup_precursors.rb:5:in `<class:CleanupPrecursors>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks/cleanup_precursors.rb:4:in `<module:Tasks>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks/cleanup_precursors.rb:3:in `<module:Terminology>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks/cleanup_precursors.rb:2:in `<module:Inferno>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks/cleanup_precursors.rb:1:in `<top (required)>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks.rb:2:in `require_relative'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks.rb:2:in `block in <top (required)>'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks.rb:1:in `each'
/home/ec2-user/onc-certification-g10-test-kit/lib/inferno/terminology/tasks.rb:1:in `<top (required)>'
/home/ec2-user/onc-certification-g10-test-kit/Rakefile:6:in `require_relative'
/home/ec2-user/onc-certification-g10-test-kit/Rakefile:6:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.7.3/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.7.3/bin/ruby_executable_hooks:22:in `eval'
/usr/local/rvm/gems/ruby-2.7.3/bin/ruby_executable_hooks:22:in `<main>'
(See full trace by running task with --trace)

This seems to be fixed by adding a require_relative 'temp_dir' to the top of lib/inferno/terminology/tasks/cleanup_precursors.rb.

Should I open another issue for this, or can it be addressed as part of this one? Thanks