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

[Security solution][Endpoint] Removes 'none' compression as it not used anymore #102767

Conversation

dasansol92
Copy link
Contributor

Summary

A wrong compressionAlgorithm=none was set to the artifact during its generation. It cases errors on agents when trying to download it and uncompress it as artifacts had zip compression.

For maintainers

@dasansol92 dasansol92 added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 21, 2021
@dasansol92 dasansol92 requested a review from a team as a code owner June 21, 2021 16:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt)

@kevinlog
Copy link
Contributor

@dasansol92 thanks for the fix!

I have a question.

Will this affect existing Policies/Endpoints? Do we need to migrate any existing Policies to ensure that the artifacts can be downloaded appropriately?

@dasansol92
Copy link
Contributor Author

@dasansol92 thanks for the fix!

I have a question.

Will this affect existing Policies/Endpoints? Do we need to migrate any existing Policies to ensure that the artifacts can be downloaded appropriately?

I don't think so, I just removed some code I added here. These changes were during the artifact creation, but the result still the same

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Firefox UI Functional Tests.test/functional/apps/discover/_field_data_with_fields_api·ts.discover app discover tab with new fields API field data the search term should be highlighted in the field data

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:09:10]         └-: discover app
[00:09:10]           └-> "before all" hook in "discover app"
[00:09:10]           └-> "before all" hook in "discover app"
[00:10:35]           └-: discover tab with new fields API
[00:10:35]             └-> "before all" hook in "discover tab with new fields API"
[00:10:35]             └-> "before all" hook in "discover tab with new fields API"
[00:10:35]               │ debg Cleaning all saved objects { space: undefined }
[00:10:35]               │ info deleting batch of 2 objects
[00:10:36]               │ succ deleted 2 objects
[00:10:36]               │ debg resolved import for test/functional/fixtures/kbn_archiver/discover.json to /dev/shm/workspace/parallel/19/kibana/test/functional/fixtures/kbn_archiver/discover.json
[00:10:36]               │ info importing 2 saved objects { space: undefined }
[00:10:37]               │ succ import success
[00:10:37]               │ info [test/functional/fixtures/es_archiver/logstash_functional] Loading "mappings.json"
[00:10:37]               │ info [test/functional/fixtures/es_archiver/logstash_functional] Loading "data.json.gz"
[00:10:37]               │ info [test/functional/fixtures/es_archiver/logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:10:37]               │ info [test/functional/fixtures/es_archiver/logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:10:37]               │ info [test/functional/fixtures/es_archiver/logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:10:39]               │ debg replacing kibana config doc: {"defaultIndex":"logstash-*","discover:searchFieldsFromSource":false}
[00:10:39]               │ debg applying update to kibana config: {"timepicker:timeDefaults":"{ \"from\": \"2015-09-18T06:31:44.000Z\", \"to\": \"2015-09-23T18:31:44.000Z\"}"}
[00:10:40]               │ debg navigating to discover url: http://localhost:61191/app/discover#/
[00:10:40]               │ debg navigate to: http://localhost:61191/app/discover#/
[00:10:40]               │ debg browser[log] "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:41]               │ debg ... sleep(700) start
[00:10:41]               │ debg ... sleep(700) end
[00:10:41]               │ debg returned from get, calling refresh
[00:10:43]               │ debg browser[log] "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:43]               │ debg currentUrl = http://localhost:61191/app/discover#/
[00:10:43]               │          appUrl = http://localhost:61191/app/discover#/
[00:10:43]               │ debg TestSubjects.find(kibanaChrome)
[00:10:43]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:47]               │ debg ... sleep(501) start
[00:10:47]               │ debg ... sleep(501) end
[00:10:47]               │ debg in navigateTo url = http://localhost:61191/app/discover#/
[00:10:47]             └-: field data
[00:10:47]               └-> "before all" hook for "search php should show the correct hit count"
[00:10:47]               └-> search php should show the correct hit count
[00:10:47]                 └-> "before each" hook: global before each for "search php should show the correct hit count"
[00:10:47]                 │ debg QueryBar.setQuery(php)
[00:10:47]                 │ debg TestSubjects.click(queryInput)
[00:10:47]                 │ debg Find.clickByCssSelector('[data-test-subj="queryInput"]') with timeout=10000
[00:10:47]                 │ debg Find.findByCssSelector('[data-test-subj="queryInput"]') with timeout=10000
[00:10:49]                 │ debg TestSubjects.getAttribute(queryInput, value, tryTimeout=120000, findTimeout=10000)
[00:10:49]                 │ debg TestSubjects.find(queryInput)
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="queryInput"]') with timeout=10000
[00:10:49]                 │ debg QueryBar.submitQuery
[00:10:49]                 │ debg TestSubjects.click(queryInput)
[00:10:49]                 │ debg Find.clickByCssSelector('[data-test-subj="queryInput"]') with timeout=10000
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="queryInput"]') with timeout=10000
[00:10:50]                 │ debg isGlobalLoadingIndicatorVisible
[00:10:50]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:10:50]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:10:55]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:10:55]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:01]                 │ debg isGlobalLoadingIndicatorVisible
[00:11:01]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:11:01]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:11:03]                 │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:11:03]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:11:03]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:03]                 │ debg TestSubjects.getVisibleText(discoverQueryHits)
[00:11:03]                 │ debg TestSubjects.find(discoverQueryHits)
[00:11:03]                 │ debg Find.findByCssSelector('[data-test-subj="discoverQueryHits"]') with timeout=10000
[00:11:04]                 └- ✓ pass  (16.2s) "discover app discover tab with new fields API field data search php should show the correct hit count"
[00:11:04]               └-> the search term should be highlighted in the field data
[00:11:04]                 └-> "before each" hook: global before each for "the search term should be highlighted in the field data"
[00:11:04]                 │ debg TestSubjects.moveMouseTo(field-extension)
[00:11:04]                 │ debg TestSubjects.find(field-extension)
[00:11:04]                 │ debg Find.findByCssSelector('[data-test-subj="field-extension"]') with timeout=10000
[00:11:05]                 │ debg TestSubjects.click(fieldToggle-extension)
[00:11:05]                 │ debg Find.clickByCssSelector('[data-test-subj="fieldToggle-extension"]') with timeout=10000
[00:11:05]                 │ debg Find.findByCssSelector('[data-test-subj="fieldToggle-extension"]') with timeout=10000
[00:11:06]                 │ debg TestSubjects.find(docTable)
[00:11:06]                 │ debg Find.findByCssSelector('[data-test-subj="docTable"]') with timeout=10000
[00:11:06]                 │ debg Firefox stdout: 1624297283119	Marionette	WARN	TimedPromise timed out after 500 ms: stacktrace:
[00:11:06]                 │      TimedPromise/<@chrome://marionette/content/sync.js:228:19
[00:11:06]                 │      TimedPromise@chrome://marionette/content/sync.js:213:10
[00:11:06]                 │      interaction.flushEventLoop@chrome://marionette/content/interaction.js:418:10
[00:11:06]                 │      webdriverClickElement@chrome://marionette/content/interaction.js:179:31
[00:11:06]                 │
[00:11:07]                 │ info Taking screenshot "/dev/shm/workspace/parallel/19/kibana/test/functional/screenshots/failure/discover app discover tab with new fields API field data the search term should be highlighted in the field data.png"
[00:11:08]                 │ info Current URL is: http://localhost:61191/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-18T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(extension),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:php),sort:!(!(%27@timestamp%27,desc)))
[00:11:08]                 │ info Saving page source to: /dev/shm/workspace/parallel/19/kibana/test/functional/failure_debug/html/discover app discover tab with new fields API field data the search term should be highlighted in the field data.html
[00:11:08]                 └- ✖ fail: discover app discover tab with new fields API field data the search term should be highlighted in the field data
[00:11:08]                 │      StaleElementReferenceError: The element reference of <mark> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed
[00:11:08]                 │       at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:550:15)
[00:11:08]                 │       at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:565:13)
[00:11:08]                 │       at Executor.execute (node_modules/selenium-webdriver/lib/http.js:491:26)
[00:11:08]                 │       at runMicrotasks (<anonymous>)
[00:11:08]                 │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:11:08]                 │       at Task.exec (test/functional/services/remote/prevent_parallel_calls.ts:28:20)
[00:11:08]                 │ 
[00:11:08]                 │ 

Stack Trace

StaleElementReferenceError: The element reference of <mark> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed
    at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:565:13)
    at Executor.execute (node_modules/selenium-webdriver/lib/http.js:491:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Task.exec (test/functional/services/remote/prevent_parallel_calls.ts:28:20) {
  remoteStacktrace: 'WebDriverError@chrome://marionette/content/error.js:181:5\n' +
    'StaleElementReferenceError@chrome://marionette/content/error.js:442:5\n' +
    'get@chrome://marionette/content/element.js:239:13\n' +
    'evaluate.fromJSON@chrome://marionette/content/evaluate.js:242:26\n' +
    'dispatch/</req<@chrome://marionette/content/listener.js:101:29\n' +
    'dispatch/<@chrome://marionette/content/listener.js:100:15\n'
}

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@@ -380,7 +380,6 @@ export class ManifestManager {
for (const result of results) {
await iterateArtifactsBuildResult(result, async (artifact, policyId) => {
const artifactToAdd = baselineManifest.getArtifact(getArtifactId(artifact)) || artifact;
artifactToAdd.compressionAlgorithm = 'none';
Copy link
Member

Choose a reason for hiding this comment

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

Nice! 🙏

@dasansol92 dasansol92 merged commit 1ea3506 into elastic:master Jun 22, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 22, 2021
…ed anymore (elastic#102767)

* Removes 'none' compression as it not used anymore

* Revert type because none type is needed for the first time the artifact is created befor the compression
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 22, 2021
…ed anymore (#102767) (#102857)

* Removes 'none' compression as it not used anymore

* Revert type because none type is needed for the first time the artifact is created befor the compression

Co-authored-by: David Sánchez <davidsansol92@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants