Skip to content
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

Secops structure code #24652

Merged
merged 9 commits into from
Oct 26, 2018

Conversation

XavierM
Copy link
Contributor

@XavierM XavierM commented Oct 26, 2018

Adding skeleton for secops app to come to live

@XavierM XavierM added review loe:medium Medium Level of Effort Team:SIEM labels Oct 26, 2018
@XavierM XavierM self-assigned this Oct 26, 2018
@FrankHassanabad
Copy link
Contributor

Checked out the project:

 git fetch upstream pull/24652/head:secops-structure-code
 git checkout secops-structure-code

Ran it:

yarn kbn bootstrap
yarn start --no-base-path

See the classic Hello Sec Ops 👍
screen shot 2018-10-26 at 8 54 12 am

@@ -54,6 +54,7 @@
"@types/react-dom": "^16.0.5",
"@types/react-redux": "^6.0.6",
"@types/react-router-dom": "^4.3.1",
"@types/recompose": "^0.26.0",
Copy link
Contributor

@FrankHassanabad FrankHassanabad Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not with this PR, but sometime soon we should probably figure out the cadence schedule of package updates since recompose is at 0.30.0 and they just updated hapi.js and we're still sitting at 0.26.0 with recompose. Would be nice to get this to the latest before using too much of its features.

Newer recompose looks like 0.30.0:
https://github.com/acdlite/recompose/releases

Wrote an issue for it https://github.com/elastic/ingest-dev/issues/67

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

*/

import { EuiPage } from '@elastic/eui';
import styled from 'styled-components';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're using:
styled-components

We probably should be adding the linter as soon as we can to catch errors, inconsistencies, type issues, etc...

https://github.com/stylelint/stylelint
https://github.com/styled-components/stylelint-processor-styled-components
https://github.com/styled-components/stylelint-processor-styled-components

They look pretty standard for people using styled-components to add them.

I added a separate ticket for that. No changes requested:
https://github.com/elastic/ingest-dev/issues/70


import { AppFrameworkAdapter } from '../../lib';

export class AppTestingFrameworkAdapter implements AppFrameworkAdapter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see this being used anywhere or any jest like tests within it. I deleted this file from my environment and am running fine at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to keep it for now I think!!!

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a checkout and a LOT of great things were changed.

I am more than happy to move forward with this as our base layer.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@FrankHassanabad
Copy link
Contributor

Since the next PR is going to be focused testing and checking the logs this looks like a failure with chrome driver crashing:

16:15:25    │ERROR [POST http://localhost:9515/session / {"desiredCapabilities":{},"requiredCapabilities":{}}] unknown error: Chrome failed to start: exited abnormally
16:15:25    │        (unknown error: DevToolsActivePort file doesn't exist)
16:15:25    │        (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
16:15:25    │        (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.9.0-8-amd64 x86_64)
16:15:25    │          at Server._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/verbose_remote_logging.js:34:21)
16:15:25    │          at Server.createSession (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/node_modules/leadfoot/Server.js:362:15)
16:15:25    │          at attemptToCreateCommand (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:38:32)
16:15:25    │          at Promise.race (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:86:11)
16:15:25    │          at initLeadfootCommand (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/leadfoot_command.js:63:5)
16:15:25    │          at RemoteProvider (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/kibana/test/functional/services/remote/remote.js:40:29)
16:15:25    │          at <anonymous>
16:15:25    │ warn 1 processes left running, stop them with procs.stop(name): [ 'kibana' ]
16:15:25    │ debg Sending "undefined" to proc "kibana"
16:15:25    │ info [kibana] exited with null after a minute
16:15:25 
16:15:25 Failure initializing 1 service(s)

I am going squash and merge and move forward.

@FrankHassanabad FrankHassanabad merged commit a9a2832 into elastic:feature-secops Oct 26, 2018
XavierM added a commit to XavierM/kibana that referenced this pull request Oct 29, 2018
* add basic structure for secops application
* finalize skeleton for secops
* fix type issue and hapi new version
* remove route home, not needed for now
* Add configuration + delete noise
* prepend elastic license to generated file
XavierM added a commit that referenced this pull request Oct 29, 2018
* Translate global navigation bar component (#23993)

Translate global navigation bar component

* [backport] add back earlier 6.x minor versions

We still backport to these branches, primarily for doc changes.

* [dev/build] fix invalid assertion

* Skip this test until snapshots are updated (#24650)

* Feat/expression threading (#24598)

Replaces #23301
Closes #23080

---

This is a minimal threading implementation for Canvas. There's still a lot to be done to make this concept great, but this is a start. 

What it does:
- Creates a server side abstraction on top of the interpreter
- Determines where to send the expression by checking the first function to be run
- Loads common functions in a separate worker thread on the server. 
- Routes to a single forked worker (thread), the main thread (server), or the browser (browser), in that order
- Defers back to the router when a function isn't found. Fails if the function isn't found in any of the above 3 environments
- Times out the worker if it takes too long, and respawns it as needed.
- Simplifies the error dialog to remove the stack. 

What is does not.:
- Round robin a pool of workers
- Queue. If one expression in the threaded env fails then anything sent to it in the meantime will fail. The upstream environment handles managing timeouts. I think this would only make sense todo with a pool.
- Client side. This doesn't implement web workers, but we could use roughly the same architecture. 
- Implement a specific, pluggable `worker` environment on the server. Right now it's just common functions, so plugin authors will always end up in a thread if they put their function in the common directory.

What I don't like:
- The socketProvider code. This was reused across the server & browser, but now that it's only used in the browser there's no good reason for the abstraction
- The serialize/deserialize stuff feels messy. Do we really need serialization?

* Polish 6.5 (#24556)

* Updates waterfall item design for timeline rows

* Adjusts span and tx flyouts and updates tooltips to EUI

* Heading size fixes and clean up

* Updates tooltip snapshots

* Review tweaks and snapshot updates

* Revert experiment :)

Co-Authored-By: jasonrhodes <[email protected]>

* Fixes bug with v1 waterfall state

* Fixes bug with timeline bar height

* Updates snapshot tests

* Updated test so it doesn't mount and rely on EUI makeId() which is non-deterministic per test run

* Don't throw errors in optimizer (#24660)

* Fixed label position on progress elements (#24623)

* [kbn/es] add context to error message (#24664)

This just tweaks the kbn-es error message to provide more context than just `Not Found`

* [BeatsCM] Beats without tags should return an empty array via the config API (#24665)

* [ML] Change file data visualizer JSON format label to NDJSON (#24643)

* [ML] Change file datavisualizer JSON format label to NDJSON
* [ML] Update edit flyout overrides snapshot

* Translations for Coordinate Map (#23952)

translate Coordinate Map

* Translations for Region Map (#23875)

add translations for region_map plugin

* [Tools] Add TemplateLiteral parsing to i18n_check tool (#24580)

* [Tools] Add TemplateLiteral parsing to i18n_check tool

* Add comments

* [ML] Remove obsolete sentence from info tooltip. (#24716)

* Translate security/users component (#23940)

Translate security/users

* [Docs] Remove beta notes for ML and Query bar (#24718)

* Translations for Table Vis plugin (#23679)

add translations for table vis plugin

* Feature/translate new nav bar (#24326)

translate new_nav_bar

* center content in fullscreen mode, hide K7 top nav (#24589)

* [APM] Fixes rare cases where KibanaLink is loaded outside of React context (#24705)

* Fixes rare cases where KibanaLink will be loaded outside of React context and requires no redux connect dependency

* Fixes tests for updated Kibana link component

* Removes obsolete snapshot

* Secops structure code (#24652)

* add basic structure for secops application
* finalize skeleton for secops
* fix type issue and hapi new version
* remove route home, not needed for now
* Add configuration + delete noise
* prepend elastic license to generated file

* Cut down on all tests except for secops tests and one example of infr… (#24693)

* Cut down on all tests except for secops tests and one example of infra integration tests
* Commented out code for only this branch
* Added comments and "please see issue number"
* https://github.com/elastic/ingest-dev/issues/60
andrew-goldstein pushed a commit that referenced this pull request Dec 4, 2018
* add basic structure for secops application
* finalize skeleton for secops
* fix type issue and hapi new version
* remove route home, not needed for now
* Add configuration + delete noise
* prepend elastic license to generated file
@XavierM XavierM deleted the secops-structure-code branch March 20, 2019 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
loe:medium Medium Level of Effort review Team:SIEM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants