-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Safely output the package manifest #192316
[Automatic Import] Safely output the package manifest #192316
Conversation
@elasticmachine merge upstream |
Pinging @elastic/security-scalability (Team:Security-Scalability) |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
Total ESLint disabled count
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally... LGTM..!
## Release note Fixes issues with rendering the package manifest in Automatic Import. ## Summary Previously the multiline output or special symbols in the user-provided strings, like description, were breaking YAML structure of the package manifest. The user would be confronted with a message like this, during the last step, after all the work of generating the integration was completed. The incorrect behavior can be observed in detail with a failing test in the first commit of the PR. In this PR, we change the manifest construction logic from template rendering into TypeScript code. As a result, all user-provided strings are correctly serialized. We keep as close as possible to the original manifest structure, also keeping the parameter names. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 521b6ee)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#192524) # Backport This will backport the following commits from `main` to `8.15`: - [[Automatic Import] Safely output the package manifest (#192316)](#192316) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ilya Nikokoshev","email":"ilya.nikokoshev@elastic.co"},"sourceCommit":{"committedDate":"2024-09-09T13:52:07Z","message":"[Automatic Import] Safely output the package manifest (#192316)\n\n## Release note\r\n\r\nFixes issues with rendering the package manifest in Automatic Import.\r\n\r\n## Summary\r\n\r\nPreviously the multiline output or special symbols in the user-provided\r\nstrings, like description, were breaking YAML structure of the package\r\nmanifest. The user would be confronted with a message like this, during\r\nthe last step, after all the work of generating the integration was\r\ncompleted.\r\n\r\nThe incorrect behavior can be observed in detail with a failing test in\r\nthe first commit of the PR.\r\n\r\nIn this PR, we change the manifest construction logic from template\r\nrendering into TypeScript code. As a result, all user-provided strings\r\nare correctly serialized. We keep as close as possible to the original\r\nmanifest structure, also keeping the parameter names.\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"521b6eec30cb5f8e4a81307110760527d21fd154","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-minor","v8.16.0","Team:Security-Scalability"],"title":"[Automatic Import] Safely output the package manifest","number":192316,"url":"https://github.com/elastic/kibana/pull/192316","mergeCommit":{"message":"[Automatic Import] Safely output the package manifest (#192316)\n\n## Release note\r\n\r\nFixes issues with rendering the package manifest in Automatic Import.\r\n\r\n## Summary\r\n\r\nPreviously the multiline output or special symbols in the user-provided\r\nstrings, like description, were breaking YAML structure of the package\r\nmanifest. The user would be confronted with a message like this, during\r\nthe last step, after all the work of generating the integration was\r\ncompleted.\r\n\r\nThe incorrect behavior can be observed in detail with a failing test in\r\nthe first commit of the PR.\r\n\r\nIn this PR, we change the manifest construction logic from template\r\nrendering into TypeScript code. As a result, all user-provided strings\r\nare correctly serialized. We keep as close as possible to the original\r\nmanifest structure, also keeping the parameter names.\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"521b6eec30cb5f8e4a81307110760527d21fd154"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192316","number":192316,"mergeCommit":{"message":"[Automatic Import] Safely output the package manifest (#192316)\n\n## Release note\r\n\r\nFixes issues with rendering the package manifest in Automatic Import.\r\n\r\n## Summary\r\n\r\nPreviously the multiline output or special symbols in the user-provided\r\nstrings, like description, were breaking YAML structure of the package\r\nmanifest. The user would be confronted with a message like this, during\r\nthe last step, after all the work of generating the integration was\r\ncompleted.\r\n\r\nThe incorrect behavior can be observed in detail with a failing test in\r\nthe first commit of the PR.\r\n\r\nIn this PR, we change the manifest construction logic from template\r\nrendering into TypeScript code. As a result, all user-provided strings\r\nare correctly serialized. We keep as close as possible to the original\r\nmanifest structure, also keeping the parameter names.\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"521b6eec30cb5f8e4a81307110760527d21fd154"}}]}] BACKPORT--> Co-authored-by: Ilya Nikokoshev <ilya.nikokoshev@elastic.co>
Release note
Fixes issues with rendering the package manifest in Automatic Import.
Summary
Previously the multiline output or special symbols in the user-provided strings, like description, were breaking YAML structure of the package manifest. The user would be confronted with a message like this, during the last step, after all the work of generating the integration was completed:
The incorrect behavior can be observed in detail with a failing test in the first commit.
In this PR, we change the manifest construction logic from template rendering into TypeScript code. As a result, all user-provided strings are correctly serialized. We keep as close as possible to the original manifest structure, also keeping the parameter names.
Example
An example generated manifest:
Checklist
Risk Matrix