-
Notifications
You must be signed in to change notification settings - Fork 8.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
[RAM] Feature flagging for triggers actions UI plugin #126957
[RAM] Feature flagging for triggers actions UI plugin #126957
Conversation
Co-authored-by: Zacqary Adam Xeper <zacqary.xeper@elastic.co>
Pinging @elastic/response-ops (Team:ResponseOps) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
|
||
private static throwUninitializedError(): never { | ||
throw new Error( | ||
'Experimental features services not initialized - are you trying to import this module from outside of the Security Solution app?' |
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.
Security Solution
? :)
|
||
export const useExperimentalFeatures = () => { | ||
const [featuresCache, setFeaturesCache] = useState<ExperimentalFeatures>({ | ||
rulesListDatagrid: false, |
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.
So this is where we set the list of experiment features in use?
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.
How would these be used in the UI code exactly?
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.
We set the experiments in the service file, or from kibana.dev.yml. This looks to be a default of sorts
@Zacqary just out of curiosity, Do you know the purpose of keeping these defaults as opposed to reading directly from the service? I'm not too sure what the use case would be.
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.
we also maintain a list here too: https://github.com/elastic/kibana/pull/126957/files#diff-8e2ca70700895b17125532779945a1d0ab9076b4d4db304c065b47f82b6628a5R14
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.
yea, if these defaults aren't required, I'll make this a util function that reads from the service as opposed to a hook
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.
looks at this example in Zac's PR ->
@elasticmachine merge upstream |
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!
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Feature flagging for triggers actions UI Co-authored-by: Zacqary Adam Xeper <zacqary.xeper@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Friendly reminder: Looks like this PR hasn’t been backported yet. |
⚪ Backport skippedThe pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Summary
For the upcoming feature to add logs in the rules details page (#126624), we would like to take a more incremental approach when it comes to committing code and PRs. Therefore, this PR borrows the feature flagging work done by @Zacqary, in this PR: #124428 so we can start using feature flags in triggers actions UI.
usage:
for react components:
for server side:
enable configs in plugin:
and then it'll be accessible via:
Co-authored-by: Zacqary Adam Xeper zacqary.xeper@elastic.co