-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Automatic Import] Modify codegen to autogenerate openAPI spec code #193243
[Automatic Import] Modify codegen to autogenerate openAPI spec code #193243
Conversation
Pinging @elastic/security-scalability (Team:Security-Scalability) |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
History
To update your PR or re-run it, just comment with: cc @bhapas |
…lastic#193243) ## Summary elastic#186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a [bug](elastic#186221) `x-codegen-enabled` was set to `false`. This PR modifies it to `true` and `node scripts/generate_openapi` generated new API classes for the spec. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit e4180d2)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…lastic#193243) ## Summary elastic#186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a [bug](elastic#186221) `x-codegen-enabled` was set to `false`. This PR modifies it to `true` and `node scripts/generate_openapi` generated new API classes for the spec. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit e4180d2) # Conflicts: # x-pack/plugins/integration_assistant/common/api/build_integration/build_integration.gen.ts # x-pack/plugins/integration_assistant/common/api/categorization/categorization_route.gen.ts # x-pack/plugins/integration_assistant/common/api/check_pipeline/check_pipeline.gen.ts # x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts # x-pack/plugins/integration_assistant/common/api/model/processor_attributes.ts # x-pack/plugins/integration_assistant/common/api/related/related_route.gen.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… code (#193243) (#193297) # Backport This will backport the following commits from `main` to `8.15`: - [[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)](#193243) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bharat Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T13:02:24Z","message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"number":193243,"url":"https://github.com/elastic/kibana/pull/193243","mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193243","number":193243,"mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},{"url":"https://github.com/elastic/kibana/pull/193290","number":193290,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
…code (#193243) (#193290) # Backport This will backport the following commits from `main` to `8.x`: - [[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)](#193243) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bharat Pasupula","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T13:02:24Z","message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","Team:Security-Scalability","Feature:AutomaticImport"],"title":"[Automatic Import] Modify codegen to autogenerate openAPI spec code","number":193243,"url":"https://github.com/elastic/kibana/pull/193243","mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193243","number":193243,"mergeCommit":{"message":"[Automatic Import] Modify codegen to autogenerate openAPI spec code (#193243)\n\n## Summary\r\n\r\nhttps://github.com//pull/186085 introduced OpenAPI spec\r\nfor Automatic Import APIs. Since there was a\r\n[bug](#186221) `x-codegen-enabled`\r\nwas set to `false`.\r\n\r\nThis PR modifies it to `true` and `node scripts/generate_openapi`\r\ngenerated new API classes for the spec.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"e4180d211a06513cf51328da090ea14315880201"}}]}] BACKPORT--> Co-authored-by: Bharat Pasupula <[email protected]>
## Summary Previously our schema and `.gen` files were not in sync, in the sense that ``` git checkout main && yarn kbn bootstrap && node scripts/generate_openapi --rootDir ./x-pack/plugins/integration_assistant && git diff ``` returned a non-trivial diff, despite the implementation in #193243. In this PR we - add missing additionalProperties to the schema; - generate and commit exactly the generated files. There don't seem to be any effects from the change from `passthrough` to `catchall`. Tested with Teleport (see GitHub).
…5302) ## Summary Previously our schema and `.gen` files were not in sync, in the sense that ``` git checkout main && yarn kbn bootstrap && node scripts/generate_openapi --rootDir ./x-pack/plugins/integration_assistant && git diff ``` returned a non-trivial diff, despite the implementation in elastic#193243. In this PR we - add missing additionalProperties to the schema; - generate and commit exactly the generated files. There don't seem to be any effects from the change from `passthrough` to `catchall`. Tested with Teleport (see GitHub). (cherry picked from commit 1599e4f)
…5302) ## Summary Previously our schema and `.gen` files were not in sync, in the sense that ``` git checkout main && yarn kbn bootstrap && node scripts/generate_openapi --rootDir ./x-pack/plugins/integration_assistant && git diff ``` returned a non-trivial diff, despite the implementation in elastic#193243. In this PR we - add missing additionalProperties to the schema; - generate and commit exactly the generated files. There don't seem to be any effects from the change from `passthrough` to `catchall`. Tested with Teleport (see GitHub). (cherry picked from commit 1599e4f)
Summary
#186085 introduced OpenAPI spec for Automatic Import APIs. Since there was a bug
x-codegen-enabled
was set tofalse
.This PR modifies it to
true
andnode scripts/generate_openapi
generated new API classes for the spec.Checklist
For maintainers