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] Support for kibana spaces in openapi generated securitySolutionApi service for integration tests #194029

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

tiansivive
Copy link
Contributor

@tiansivive tiansivive commented Sep 25, 2024

Summary

This PR adds support for Kibana Spaces in the generated securitySolutionApi service for integration tests.

Users can now pass an extra parameter kibanaSpace when calling a route from the service. The provided space will be prefixed to the API's path. If no argument is provided, it is default'ed to 'default'

@tiansivive tiansivive added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 labels Sep 25, 2024
@tiansivive tiansivive requested a review from maximpn September 25, 2024 15:22
@tiansivive tiansivive requested a review from a team as a code owner September 25, 2024 15:23
@tiansivive tiansivive force-pushed the add-spaces-support-openapi-gen branch from 09f61a6 to 16be27f Compare September 25, 2024 15:29
@tiansivive tiansivive force-pushed the add-spaces-support-openapi-gen branch from 16be27f to 8f41920 Compare September 25, 2024 15:30
Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -29,9 +31,9 @@ export function SecuritySolutionApiProvider({ getService }: FtrProviderContext)
* {{{description}}}
*/
{{/if}}
{{camelCase operationId}}({{#if (or requestQuery requestParams requestBody)}}props: {{operationId}}Props{{/if}}) {
{{camelCase operationId}}({{#if (or requestQuery requestParams requestBody)}}props: {{operationId}}Props, {{/if}}kibanaSpace: string = 'default') {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: TS is able to infer string type from the literal. It's enough to define kibanaSpace = 'default'.

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #15 / UserList triggers mailto when email icon clicked

Metrics [docs]

✅ unchanged

History

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

cc @maximpn

@tiansivive tiansivive merged commit 2f45c90 into elastic:main Sep 26, 2024
20 checks passed
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 194029

Questions ?

Please refer to the Backport tool documentation

@tiansivive
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

tiansivive added a commit to tiansivive/kibana that referenced this pull request Sep 30, 2024
…curitySolutionApi service for integration tests (elastic#194029)

### Summary

This PR adds support for Kibana Spaces in the generated
`securitySolutionApi` service for integration tests.

Users can now pass an extra parameter `kibanaSpace` when calling a route
from the service. The provided space will be prefixed to the API's path.
If no argument is provided, it is default'ed to `'default'`

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 2f45c90)

# Conflicts:
#	x-pack/test/api_integration/services/security_solution_api.gen.ts
#	x-pack/test/api_integration/services/security_solution_endpoint_exceptions_api.gen.ts
#	x-pack/test/api_integration/services/security_solution_exceptions_api.gen.ts
#	x-pack/test/api_integration/services/security_solution_lists_api.gen.ts
tiansivive added a commit that referenced this pull request Sep 30, 2024
…ted securitySolutionApi service for integration tests (#194029) (#194400)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Support for kibana spaces in openapi generated
securitySolutionApi service for integration tests
(#194029)](#194029)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago Vila
Verde","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-26T17:53:25Z","message":"[Security
Solution] Support for kibana spaces in openapi generated
securitySolutionApi service for integration tests (#194029)\n\n###
Summary\r\n\r\nThis PR adds support for Kibana Spaces in the
generated\r\n`securitySolutionApi` service for integration
tests.\r\n\r\nUsers can now pass an extra parameter `kibanaSpace` when
calling a route\r\nfrom the service. The provided space will be prefixed
to the API's path.\r\nIf no argument is provided, it is default'ed to
`'default'`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2f45c90d2f58e9f0e3b5ff90f7cbece482478c00","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"number":194029,"url":"https://github.com/elastic/kibana/pull/194029","mergeCommit":{"message":"[Security
Solution] Support for kibana spaces in openapi generated
securitySolutionApi service for integration tests (#194029)\n\n###
Summary\r\n\r\nThis PR adds support for Kibana Spaces in the
generated\r\n`securitySolutionApi` service for integration
tests.\r\n\r\nUsers can now pass an extra parameter `kibanaSpace` when
calling a route\r\nfrom the service. The provided space will be prefixed
to the API's path.\r\nIf no argument is provided, it is default'ed to
`'default'`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2f45c90d2f58e9f0e3b5ff90f7cbece482478c00"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194029","number":194029,"mergeCommit":{"message":"[Security
Solution] Support for kibana spaces in openapi generated
securitySolutionApi service for integration tests (#194029)\n\n###
Summary\r\n\r\nThis PR adds support for Kibana Spaces in the
generated\r\n`securitySolutionApi` service for integration
tests.\r\n\r\nUsers can now pass an extra parameter `kibanaSpace` when
calling a route\r\nfrom the service. The provided space will be prefixed
to the API's path.\r\nIf no argument is provided, it is default'ed to
`'default'`\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>","sha":"2f45c90d2f58e9f0e3b5ff90f7cbece482478c00"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants