inferno-core
inferno-core copied to clipboard
Proof of concept for enabling inferno services start anywhere.
Proof of concept for discussion.
I believe that if we have command line tools that require an 'inferno environment' (that is, very specific services up and running for the command to work), then we must have a way to create the environment from any directory. Cloning "inferno core" and making users put files they want to analyze in that directory makes no sense to me.
This is just a quick and dirty proof of concept that it is not particularly hard for us to ship a docker-compose file in the gem. I can't say for certain there aren't edge cases to deal with, but in my environment this seems to work just fine (unless i messed something up and didn't actually use it how I thought I did :) )
I believe it works though... I used both bin/inferno services start from the inferno_core directory, as well as tried packaging it up as a gem, installing it, and then running inferno services start in other directories (then, going back to inferno_core, starting the web app, and running it to show that the services are fully up). I use rvm so the gems are installed to /Users/rscanlon/.rvm/gems/ruby-3.1.2, but didn't try with other ruby version managers. I admit that there might be more complexities here, and I didn't really try everything, but I don't see what might be a problem here.
I optimized here to keep the touch as small as possible, but also there are plenty of opportunities to clean this all up. Do we really need to maintain the old validator and the validator UI? Do we really need to persist redis? We should consider have the gem create a ~/.inferno/ subdirectory where we start storing stuff when not running within a Test Kit (I don't think redis matters, but the validator needs a cache to avoid rate limiting).
Buttom line to me though: the evaluator will be fairly hostile to use once we get that into the CLI if we also have to say "now, clone inferno_core or some other test kit, go to that directory, copy your files to be analyzed there, etc etc". So we need this type of thing.
inferno services start
inferno evaluate --ig:xyz *.json
# at this point, might as well just add something like this as a way to quickly validate one or more files
inferno validate --ig:xyz --profile:http://blah *.json
inferno services stop
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.29%. Comparing base (
2bb20b5) to head (d590f28). Report is 106 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #582 +/- ##
=======================================
Coverage 84.29% 84.29%
=======================================
Files 274 274
Lines 11663 11663
Branches 1302 1302
=======================================
Hits 9831 9831
Misses 1822 1822
Partials 10 10
| Flag | Coverage Δ | |
|---|---|---|
| backend | ∅ <ø> (∅) |
|
| frontend | ∅ <ø> (∅) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Addressed in #671