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

[Automatic Import] add fields mapping to readme #193717

Merged

Conversation

haetamoudi
Copy link
Contributor

@haetamoudi haetamoudi commented Sep 23, 2024

Summary

Duplicate of #193334

Automatic import flow creates 2 Readme files:

  • Content of docs/README.md will contain the mapping fields for each datastream and will be used to show information when opening a newly created integration.
  • Content of _dev/build/docs/README.md will contain a placeholder that can be replaced when using elastic-package.

Test results:

Use Automatic import to create a new integration.

docs/README.md
Screenshot 2024-09-18 at 18 09 51
That will be displayed like:
Screenshot 2024-09-18 at 18 08 16

_dev/build/docs/README.md
Screenshot 2024-09-18 at 18 10 21

@haetamoudi haetamoudi self-assigned this Sep 23, 2024
@haetamoudi haetamoudi added enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development Team:Security-Scalability Team label for Security Integrations Scalability Team Feature:AutomaticImport labels Sep 23, 2024
@haetamoudi haetamoudi marked this pull request as ready for review September 23, 2024 13:29
@haetamoudi haetamoudi requested a review from a team as a code owner September 23, 2024 13:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-scalability (Team:Security-Scalability)

@haetamoudi haetamoudi marked this pull request as draft September 23, 2024 14:06
@haetamoudi haetamoudi marked this pull request as ready for review September 23, 2024 16:25
@haetamoudi haetamoudi requested a review from ilyannn September 24, 2024 17:21
@ilyannn
Copy link
Contributor

ilyannn commented Sep 25, 2024

Good work, but I think we should strive to make the two readmes have the same relationship as if the user actually ran the elastic-package build. There are currently some differences, which I've checked by downloading a generated package and running

git init
git add .
git commit -m "Generated version"
elastic-package build
git diff > diff.txt

Here's an example diff.txt. I think the differences are mostly in the whitespace, default value and the additional files, such as base-fields.yml.

If it's not too hard to replicate what the elastic-package does, let's try to kill this diff.

Copy link
Contributor

@ilyannn ilyannn left a comment

Choose a reason for hiding this comment

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

I had some points to address.

The goal to replicate elastic-package isn't absolute, so let's skip it if it proves too hard.

@haetamoudi haetamoudi requested a review from ilyannn September 27, 2024 14:38
Copy link
Contributor

@ilyannn ilyannn left a comment

Choose a reason for hiding this comment

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

Looks good, though I have not tested it yet.

We might want to think about the actual content of the README (generate with LLM?)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #1 / Cloud Security Posture Test adding Cloud Security Posture Integrations CNVM CNVM AWS Hyperlink on PostInstallation Modal should have the correct URL

Metrics [docs]

✅ unchanged

History

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

cc @haetamoudi

@haetamoudi haetamoudi added backport:skip This commit does not require backporting and removed backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development labels Sep 30, 2024
@haetamoudi haetamoudi merged commit 5081414 into elastic:main Sep 30, 2024
22 checks passed
@haetamoudi haetamoudi deleted the automatic-import-readme-with-fields-mapping branch September 30, 2024 15:46
@bhapas bhapas added backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Oct 10, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11272440817

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11272440702

@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 193717

Questions ?

Please refer to the Backport tool documentation

1 similar comment
@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 193717

Questions ?

Please refer to the Backport tool documentation

bhapas pushed a commit to bhapas/kibana that referenced this pull request Oct 10, 2024
(cherry picked from commit 5081414)

# Conflicts:
#	x-pack/plugins/integration_assistant/server/integration_builder/build_integration.test.ts
@bhapas
Copy link
Contributor

bhapas commented Oct 10, 2024

💚 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

bhapas added a commit that referenced this pull request Oct 10, 2024
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Automatic Import] add fields mapping to readme
(#193717)](#193717)

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

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

<!--BACKPORT [{"author":{"name":"Hanna
Tamoudi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-30T15:46:05Z","message":"[Automatic
Import] add fields mapping to readme
(#193717)","sha":"508141423e7d18ce87628d826628d161c3292418","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["enhancement","release_note:skip","v9.0.0","backport:prev-minor","Team:Security-Scalability","Feature:AutomaticImport"],"number":193717,"url":"https://github.com/elastic/kibana/pull/193717","mergeCommit":{"message":"[Automatic
Import] add fields mapping to readme
(#193717)","sha":"508141423e7d18ce87628d826628d161c3292418"}},"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/193717","number":193717,"mergeCommit":{"message":"[Automatic
Import] add fields mapping to readme
(#193717)","sha":"508141423e7d18ce87628d826628d161c3292418"}}]}]
BACKPORT-->

---------

Co-authored-by: Hanna Tamoudi <[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 (9.0) the previous minor version (i.e. one version back from main) enhancement New value added to drive a business result Feature:AutomaticImport release_note:skip Skip the PR/issue when compiling release notes Team:Security-Scalability Team label for Security Integrations Scalability Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants