Skip to content
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

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

Shaumik-Ashraf
Copy link
Contributor

Summary

Add Inferno version CLI command:

$ bundle exec bin/inferno version
Inferno Core v0.4.27

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

  1. Checkout this branch
  2. Run ./bin/inferno version

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (54713d5) 77.32% compared to head (00bad1f) 77.32%.

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           
Flag Coverage Δ
backend 93.92% <ø> (ø)
frontend 70.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


desc 'version', "Output Inferno core version (#{Inferno::VERSION})"
def version
puts "Inferno Core v#{Inferno::VERSION}"
Copy link
Contributor

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.

Copy link
Contributor Author

@Shaumik-Ashraf Shaumik-Ashraf Jan 25, 2024

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.

  1. bundle exec inferno version -> runs inferno_core from Gemfile

  2. inferno version -> runs inferno_core from last gem install inferno_core and ruby install

On machine if I do a fresh clone of inferno-template I get:
image

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.

@Shaumik-Ashraf Shaumik-Ashraf requested a review from arscan January 29, 2024 14:40
Copy link
Contributor

@arscan arscan left a 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.

@Shaumik-Ashraf Shaumik-Ashraf merged commit 936d973 into main Jan 29, 2024
10 checks passed
@Shaumik-Ashraf Shaumik-Ashraf deleted the fi-2116-inferno-version-cli branch January 29, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants