-
Notifications
You must be signed in to change notification settings - Fork 31
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
Persist run options & set at creation (not claim) #2085
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2085 +/- ##
=======================================
Coverage 90.09% 90.09%
=======================================
Files 268 268
Lines 8951 8955 +4
=======================================
+ Hits 8064 8068 +4
Misses 887 887 ☔ View full report in Codecov by Sentry. |
@stuartc , please take a look here! context in the PR itself |
@taylordowns2000 this looks like a valid way to implement this. I am not sure I can't validate it's relevancy but it seems to me as a better way of dynamically calculating the run options. Maybe wait for @stuartc to confirm that point. |
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.
@taylordowns2000 this implementation looks good to me (assuming that tests and other bits will come later)
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.
This looks good, thanks for the detailed PR.
My only comment here is that I think we should make the run options more than a type. Right now it's defined in RunWithOptions
.
I think is should become an embedded schema, so using Ecto.Schema.
And then in the Run model, it becomes embeds_one :options, Run.Option
This will require some light refactoring on get_run_options
on UsageLimiter
on both Lightning and Thunderbolt.
I believe this change will give the run options more prominence and make 'just dumping stuff in' less of a temptation.
Oh and yes, @taylordowns2000 - tests please! |
7a0d5e4
to
b467ca6
Compare
584fe80
to
5e37f17
Compare
Requesting guidance before going further. Does this feel like the right way to address the run
options
issue?Required context (pre-reading) to review:
options
column to runs table #2082Note that if we like this idea, next we still need to: