-
Notifications
You must be signed in to change notification settings - Fork 191
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
Documentation API OSQuery Packs Policy shards feature - partial deployment #3822
Documentation API OSQuery Packs Policy shards feature - partial deployment #3822
Comments
Thanks for raising this, @111andre111 ! @tomsonpl, could you confirm that we should add a
Thanks in advance! |
Hey, I've just double checked the code, and I believe that we do not really need this as REQUIRED field. I think that we might just make it optional in the schema, and that could do fix the issue. However, some docs should be added anyway. I'll prepare the fix and doc answers for tomorrow. |
However... I am afraid we cannot backport this change further that 8.10.1 ... so that would make the API inconsistent, and this functionality goes back to 8.6.0. |
Also, the shards field is optional for updating pack, but required for creating pack. I just haven't seen this in time ;/ |
@natasha-moore-elastic Hey, sorry I know I promised to prepare this for today, but got pulled away by other high priority stuff. I'll try to prepare the answers asap |
Hey @natasha-moore-elastic , sorry for the delay, I hope this answers your questions :) I merged a PR that makes the 'shards' field optional for 8.10.1 and 8.11.0 onwards, so these version of docs can have shards field as
|
@tomsonpl thanks for being so helpful on this! Can you also share the PR that makes the |
Hey, no problem, I caused the issue in the first place :P |
Updates for 8.6.0–8.10.0 are in elastic/kibana#166363. |
@tomsonpl size and impact-wise, the change seems more like an enhancement than a new feature. I'll defer to you for the final decision though. |
## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: #166178
…#166363) ## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: elastic#166178 (cherry picked from commit 0215ed3)
…#166363) ## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: elastic#166178 (cherry picked from commit 0215ed3)
…#166363) ## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: elastic#166178 (cherry picked from commit 0215ed3)
…#166363) ## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: elastic#166178 (cherry picked from commit 0215ed3)
…#166363) ## Summary - Resolves elastic/security-docs#3822 Adds the `shards` object schema definition to Create pack and Update pack API, and to the Create pack request example. - Related dev PR: elastic#166178 (cherry picked from commit 0215ed3)
…166363) (#166626) # Backport This will backport the following commits from `main` to `8.10`: - [[DOCS] Adds shards object to Create pack and Update pack API (#166363)](#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
…166363) (#166631) # Backport This will backport the following commits from `main` to `8.9`: - [[DOCS] Adds shards object to Create pack and Update pack API (#166363)](#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
…166363) (#166627) # Backport This will backport the following commits from `main` to `8.6`: - [[DOCS] Adds shards object to Create pack and Update pack API (#166363)](#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
…166363) (#166628) # Backport This will backport the following commits from `main` to `8.7`: - [[DOCS] Adds shards object to Create pack and Update pack API (#166363)](#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
…166363) (#166630) # Backport This will backport the following commits from `main` to `8.8`: - [[DOCS] Adds shards object to Create pack and Update pack API (#166363)](#166363) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-18T13:55:57Z","message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0","v8.8.0","v8.9.0","v8.10.0","v8.11.0"],"number":166363,"url":"https://github.com/elastic/kibana/pull/166363","mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}},"sourceBranch":"main","suggestedTargetBranches":["8.6","8.7","8.8","8.9","8.10"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166363","number":166363,"mergeCommit":{"message":"[DOCS] Adds shards object to Create pack and Update pack API (#166363)\n\n## Summary\r\n\r\n- Resolves elastic/security-docs#3822 \r\n\r\nAdds the `shards` object schema definition to Create pack and Update\r\npack API, and to the Create pack request example.\r\n\r\n- Related dev PR: https://github.com/elastic/kibana/pull/166178","sha":"0215ed3a0f54823b816fc24d5efa931cd1d55b10"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
## Summary * Resolves elastic/security-docs#3822. * Updates the `shards` object in Create pack API to optional for 8.10.1 and 8.11.0 onwards, per #166178 * Related to changes made in #166363.
## Summary * Resolves elastic/security-docs#3822. * Updates the `shards` object in Create pack API to optional for 8.10.1 and 8.11.0 onwards, per elastic#166178 * Related to changes made in elastic#166363. (cherry picked from commit 62e087a)
…7135) # Backport This will backport the following commits from `main` to `8.10`: - [[DOCS] Makes shards optional in Create pack API (#166639)](#166639) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"natasha-moore-elastic","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-25T10:38:41Z","message":"[DOCS] Makes shards optional in Create pack API (#166639)\n\n## Summary\r\n\r\n* Resolves elastic/security-docs#3822. \r\n\r\n* Updates the `shards` object in Create pack API to optional for 8.10.1\r\nand 8.11.0 onwards, per https://github.com/elastic/kibana/pull/166178\r\n\r\n* Related to changes made in\r\nhttps://github.com//pull/166363.","sha":"62e087a8a8c7507cd0ead1e54d2db36654c58e60","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.10.0","v8.11.0"],"number":166639,"url":"https://github.com/elastic/kibana/pull/166639","mergeCommit":{"message":"[DOCS] Makes shards optional in Create pack API (#166639)\n\n## Summary\r\n\r\n* Resolves elastic/security-docs#3822. \r\n\r\n* Updates the `shards` object in Create pack API to optional for 8.10.1\r\nand 8.11.0 onwards, per https://github.com/elastic/kibana/pull/166178\r\n\r\n* Related to changes made in\r\nhttps://github.com//pull/166363.","sha":"62e087a8a8c7507cd0ead1e54d2db36654c58e60"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166639","number":166639,"mergeCommit":{"message":"[DOCS] Makes shards optional in Create pack API (#166639)\n\n## Summary\r\n\r\n* Resolves elastic/security-docs#3822. \r\n\r\n* Updates the `shards` object in Create pack API to optional for 8.10.1\r\nand 8.11.0 onwards, per https://github.com/elastic/kibana/pull/166178\r\n\r\n* Related to changes made in\r\nhttps://github.com//pull/166363.","sha":"62e087a8a8c7507cd0ead1e54d2db36654c58e60"}}]}] BACKPORT--> Co-authored-by: natasha-moore-elastic <[email protected]>
Description
There has been brought up some a new feature called partial deployment - policy shards in 8.6.0 for OSQuery Packs execution.
elastic/kibana#143948
It seems that as of today we have this documentation for scheduling OSQuery Packs:
https://www.elastic.co/guide/en/security/8.9/alerts-run-osquery.html
https://www.elastic.co/guide/en/kibana/8.9/osquery.html#osquery-schedule-status
However it looks that we don't have in out api documentation however any mention about the shards field:
https://www.elastic.co/guide/en/kibana/8.9/osquery-manager-packs-api-create.html#osquery-manager-packs-api-create-example
The example mentioned there ends up with an error
[request body.shards]: expected value of type [object] but got [undefined]
So after adding
"shards": {},
to the body the request works.Can we please add the particular shards field to the API docs? I suppose we might need it as well on some others like update OSQuery packs and so on.
Acceptance Test Criteria
I propose to backport this documentation with shards in API appropriately as it's atm mandatory field in earlier versions. So even if that would be changed it should be obvious from the docs in case it's not mandatory any more.
Notes
The text was updated successfully, but these errors were encountered: