-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add GetScenarioOptions
method to ExecutorConfig
interface
#3053
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3053 +/- ##
==========================================
+ Coverage 77.01% 77.03% +0.01%
==========================================
Files 229 229
Lines 17065 17066 +1
==========================================
+ Hits 13143 13147 +4
+ Misses 3080 3078 -2
+ Partials 842 841 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 this! LGTM.
59d17da
to
2d82729
Compare
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.
LGTM, waiting for the green CI
Apparently there's an issue building gotip 😮💨
|
This simplifies retrieval of ScenarioOptions, since it avoids type assertions of all possible ExecutorConfig implementations. See grafana/xk6-browser#858 (comment)
I'm not adding it to the lib package, since it could possibly result in an import loop (lib -> lib/executor -> lib).
2d82729
to
35af258
Compare
Previously, the new scenario `options` field added in #3036 was being serialized to JSON by default, which made it an incompatible change with some of our internal Cloud services that validate the existing configuration structure. This change makes the object optional, and it will only be serialized if it's included in the data.
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.
LGTM.
This simplifies retrieval of
ScenarioOptions
(added in #3036), since it avoids type assertions of all possibleExecutorConfig
implementations. See this comment.I also added an archive test to serialize the scenario options and read them back, which was arguably missing from #3036.