-
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
[Security Solution] modify circular deps checker to output images of circular deps graphs #75579
[Security Solution] modify circular deps checker to output images of circular deps graphs #75579
Conversation
@@ -34,6 +34,29 @@ run( | |||
|
|||
const circularFound = result.circular(); | |||
if (circularFound.length !== 0) { | |||
let count = 0; |
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.
- Should I write one image per circular that is found?
- Should I only run this logic if a flag is passed to the script?
- Any other good ideas?
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.
I think having it behind a flag makes sense. Depending on the output I can go either way for individual vs grouped images
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 great thanks!
Can you add an example of what this outputs from your other PR? |
0ee93a8
to
d3c5b83
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.
Nice! 👍
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.
wow nice markdown
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
…circular deps graphs (elastic#75579)
* master: (71 commits) [Lens] Show 'No data for this field' for empty field in accordion (elastic#73772) Skip failing lens test Configure ScopedHistory consistenty regardless of URL used to mount app (elastic#75074) Fix returned payload by "search" usage collector (elastic#75340) [Security Solution] Fix missing key error (elastic#75576) Upgrade EUI to v27.4.1 (elastic#75240) Update datasets UI copy to data streams (elastic#75618) [Lens] Register saved object references (elastic#74523) [DOCS] Update links to Beats documentation (elastic#70380) [Enterprise Search] Convert our `public_url` route to `config_data` and collect initialAppData (elastic#75616) [Usage Collection Schemas] Remove Legacy entries (elastic#75652) [Dashboard First] Lens Originating App Breadcrumb (elastic#75470) Improve login UI error message. (elastic#75642) [Security Solution] modify circular deps checker to output images of circular deps graphs (elastic#75579) [Data Telemetry] Add index pattern to identify "meow" attacks (elastic#75163) Migrate CSP usage collector to `kibana_usage_collection` plugin (elastic#75536) [Console] Get ES Config from core (elastic#75406) [Uptime] Add delay in telemetry test (elastic#75162) [Lens] Use index pattern service instead saved object client (elastic#74654) Embeddable input (elastic#73033) ...
…circular deps graphs (elastic#75579)
Summary
The Security Solution team has a script that tries to block circular dependencies between typescript files. When the script detects a circular dependency it will now attempt to use graphviz to output an SVG showing a visualization of the circular dependency. This should help developers understand the circular dependency.
When run with `--help`
When there is a circular dep and no flags were passed
When graphviz is installed and there is a circular dep and `--svg` was passed:
when there are 2 circular deps and you use `--svg`
when there are two circular deps and no flags were passed
When there are circular deps, `--svg` was passed, and graphviz isn't installed
Checklist
Doesn't do anything dramatic when graphviz is missing (as it will be for most users and CI)
Works when there is no circular dep detected
Works when multiple circular dependencies are detected.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
Documentation was added for features that require explanation or tutorials
Unit or functional tests were updated or added to match the most common scenarios
This was checked for keyboard-only and screenreader accessibility
For maintainers