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

Osquery_manager: Upgrade osquery_manager for serverless, pick up ECS 8.10.0 #7894

Merged
merged 6 commits into from Oct 2, 2023

Conversation

aleksmaus
Copy link
Member

What does this PR do?

Upgrades osquery_manager for serverless specs
Picks up ECS 8.10.0

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Screenshots

Tested following the serverless opt-in packages guide.

Screenshot 2023-09-20 at 12 11 22 PM Screenshot 2023-09-20 at 12 12 37 PM

@aleksmaus aleksmaus added the enhancement New feature or request label Sep 20, 2023
@aleksmaus aleksmaus requested a review from a team as a code owner September 20, 2023 16:20
@elasticmachine
Copy link

elasticmachine commented Sep 20, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-09-29T14:32:49.723+0000

  • Duration: 17 min 26 sec

Test stats 🧪

Test Results
Failed 0
Passed 9
Skipped 0
Total 9

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@aleksmaus
Copy link
Member Author

hmmm, the error in CI

[2023-09-20T16:32:46.066Z] Error response from daemon: manifest for docker.elastic.co/kibana/kibana:8.10.0 not found: manifest unknown: manifest unknown

[2023-09-20T16:32:46.066Z] Error: failed updating the stack images: updating docker images failed: running command failed: running Docker Compose pull command failed: exit status 18

@aleksmaus
Copy link
Member Author

/test

@aleksmaus
Copy link
Member Author

/test

@mrodm
Copy link
Contributor

mrodm commented Sep 26, 2023

Please wait to merge this PR @aleksmaus , merging this branch would publish this package as GA with spec v3 but this spec is not GA yet.

We are checking how this validation is performed in elastic-package to try avoid this situation.

Thanks!!

cc @jsoriano @andrewkroh

@mrodm
Copy link
Contributor

mrodm commented Sep 27, 2023

Please wait to merge this PR @aleksmaus , merging this branch would publish this package as GA with spec v3 but this spec is not GA yet.

We are checking how this validation is performed in elastic-package to try avoid this situation.

Thanks!!

cc @jsoriano @andrewkroh

@aleksmaus you could proceed with this PR, just be aware that the spec v3 is not GA yet and there could be still changes in that version (e.g. more validation rules to be applied).

Just as a note, remember to add the capabilities if this package has some special requirement.

Sorry for the inconveniences!

@aleksmaus
Copy link
Member Author

@aleksmaus you could proceed with this PR, just be aware that the spec v3 is not GA yet and there could be still changes in that version (e.g. more validation rules to be applied).

Thanks!
Any advice what to do about this error in CI?

[2023-09-20T16:32:46.066Z] Error response from daemon: manifest for docker.elastic.co/kibana/kibana:8.10.0 not found: manifest unknown: manifest unknown

I tried to re-kick the PR build, didn't help

@mrodm
Copy link
Contributor

mrodm commented Sep 28, 2023

@aleksmaus you could proceed with this PR, just be aware that the spec v3 is not GA yet and there could be still changes in that version (e.g. more validation rules to be applied).

Thanks! Any advice what to do about this error in CI?

[2023-09-20T16:32:46.066Z] Error response from daemon: manifest for docker.elastic.co/kibana/kibana:8.10.0 not found: manifest unknown: manifest unknown

I tried to re-kick the PR build, didn't help

mmm that kibana image was deleted, that's why the testing fails.
I think one option would be to update the kibana version condition to be ^8.10.1 @aleksmaus . The disadvantage in this case is that this version would not be available for the current 8.10.0 clusters, but I guess they would need to update to 8.10.1 due to the security issue too.

This has already been applied in at least 3 packages:

 $ git grep "\^8.10.1" | grep manifest
awsfirehose/manifest.yml:  kibana.version: "^8.10.1"
okta/manifest.yml:  kibana.version: ^8.10.1
security_detection_engine/manifest.yml:  kibana.version: ^8.10.1

@elasticmachine
Copy link

elasticmachine commented Sep 28, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 25.0% (1/4) 👎 -75.0
Lines 100.0% (0/0) 💚 31.522
Conditionals 100.0% (0/0) 💚

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

This looks good.

I saw a few more fields that could be changed over to use external: ecs if you wanted.

packages/osquery_manager/data_stream/result/fields/base-fields.yml:1:3 data_stream.type
packages/osquery_manager/data_stream/result/fields/base-fields.yml:4:3 data_stream.dataset
packages/osquery_manager/data_stream/result/fields/base-fields.yml:7:3 data_stream.namespace
packages/osquery_manager/data_stream/result/fields/base-fields.yml:10:3 @timestamp

@andrewkroh
Copy link
Member

andrewkroh commented Sep 28, 2023

title: Osquery result
description: Fields related to the Osquery result

These two fields, title and description on a "group", can be removed. That are not used for anything in packages or Fleet (source).

@aleksmaus
Copy link
Member Author

This has already been applied in at least 3 packages:

 $ git grep "\^8.10.1" | grep manifest
awsfirehose/manifest.yml:  kibana.version: "^8.10.1"
okta/manifest.yml:  kibana.version: ^8.10.1
security_detection_engine/manifest.yml:  kibana.version: ^8.10.1

I tried to update to ^8.10.1 the build still fails in CI

[2023-09-28T20:03:45.058Z] 2023/09/28 20:03:44 DEBUG running command: /var/lib/jenkins/workspace/est-manager_integrations_PR-7894/bin/docker-compose -f /var/lib/jenkins/workspace/est-manager_integrations_PR-7894/.elastic-package/profiles/default/stack/snapshot.yml --ansi never -p elastic-package-stack pull --quiet

[2023-09-28T20:03:50.180Z] Error response from daemon: Get "https://registry-1.docker.io/v2/": EOF

[2023-09-28T20:03:50.180Z] Error: failed updating the stack images: updating docker images failed: running command failed: running Docker Compose pull command failed: exit status 18

script returned exit code 1

@andrewkroh
Copy link
Member

/test

@andrewkroh
Copy link
Member

That last failure was 18 hours ago which was during a docker hub outage. That might have been the cause. Retrying.

@aleksmaus aleksmaus merged commit 50d9212 into elastic:main Oct 2, 2023
4 checks passed
@elasticmachine
Copy link

Package osquery_manager - 1.10.0 containing this change is available at https://epr.elastic.co/search?package=osquery_manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants