-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fi 2116 inferno version cli #441
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #441 +/- ##
=======================================
Coverage 77.32% 77.32%
=======================================
Files 225 225
Lines 11200 11200
Branches 1052 1052
=======================================
Hits 8660 8660
Misses 1939 1939
Partials 601 601
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
desc 'version', "Output Inferno core version (#{Inferno::VERSION})" | ||
def version | ||
puts "Inferno Core v#{Inferno::VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My one question here is do we care to be specific that this may or may not be the version of inferno_core of what is installed in the directory / test kit you are in? Often inferno
as a CLI is called within a test kit, which could have a different version of inferno_core installed. Do we care? I don't think so, but figured I'd check. Curious how rails
CLI command works, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this difference would come up if you run bundle exec
or not.
-
bundle exec inferno version
-> runs inferno_core from Gemfile -
inferno version
-> runs inferno_core from lastgem install inferno_core
and ruby install
On machine if I do a fresh clone of inferno-template I get:
If people start using inferno new
instead of git clone this issue will be somewhat allevaited, the versions will at least match until a new inferno version is published and either gem update --system
or bundle update
is executed but not both.
Rails loads bundler in its boot.rb, but I think Inferno can't do that because we need foreman, and foreman can't be added to the gemspec. Same reason we have to run bundle exec inferno services
and then inferno start
without bundle. So I guess one solution would be replacing or in-housing foreman functionality, and then forcing bin/inferno
to load bundler.
Without that though only thing I can think of is adding this version command and help devs figure out any version mismatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining the differences around the testkit bundled version vs the globally installed version. I mainly want to make sure we follow whatever conventions are out there, and it sound like there is a reason why ours is a little different than rails right now.
Summary
Add Inferno version CLI command:
I think there should be some option to output test kit version and even HL7 Validator version, but that should be in future tickets/PRs.
Testing Guidance
./bin/inferno version