Skip to content

[Fleet] Add Edit ReadMe Functionality To Custom Integrations#215259

Merged
Supplementing merged 45 commits intoelastic:mainfrom
Supplementing:enhancment-edit-readme
Apr 23, 2025
Merged

[Fleet] Add Edit ReadMe Functionality To Custom Integrations#215259
Supplementing merged 45 commits intoelastic:mainfrom
Supplementing:enhancment-edit-readme

Conversation

@Supplementing
Copy link
Contributor

@Supplementing Supplementing commented Mar 20, 2025

Closes #212957

Adds editing of the automatically-generated readMe file on custom integrations.

  • Allows the user to make edits and then save the readMe changes via a new endpoint
  • Reloads the UI after making changes to reflect the updated readMe
  • Automatically updates associated policies

To test the new endpoint, you will need a custom integration installed, then use it as such

PUT kbn:/api/fleet/epm/custom_integrations/{pkgName}
{
    "readMeData": "New README content here"

}
Screen.Recording.2025-04-16.at.12.35.32.PM.mov

Acceptance criteria

  • An "edit" button with an icon appears in the README section of the integration overview page for custom integrations generated by automatic import
  • Clicking the "edit" button should open a modal (TBD) containing a markdown editor that allows the user to edit the content
  • Users can save their changes, and the updated README content is persisted
  • Saving updates the version of the package and reloads the content
  • Saving also starts updating policies automatically

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

N/A

Release Note

Adds edit functionality to custom integrations, allowing a user to edit the README file of a custom integration and save it to be persisted. Additionally, saving will automatically increment the version of the integration and update all associated policies.

@Supplementing
Copy link
Contributor Author

/CI

kibanamachine and others added 5 commits April 16, 2025 18:53
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --update'
@Supplementing Supplementing added backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team release_note:feature Makes this part of the condensed release notes labels Apr 16, 2025
@Supplementing Supplementing marked this pull request as ready for review April 16, 2025 20:49
@Supplementing Supplementing requested a review from a team as a code owner April 16, 2025 20:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

@elastic elastic deleted a comment from elasticmachine Apr 16, 2025
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/alerting/maintenance_window --update'
@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

// update the changelog asset as well by adding an entry
const changelogPath = `${pkgName}-${data.version}/changelog.yml`;
const changelog = assetsMap.get(changelogPath);
if (changelog) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a changelog item if there is none present?
I tried to update the readme of a custom integration without one, created with

POST kbn:/api/fleet/epm/custom_integrations
{
 "integrationName": "test",
 "datasets": []
}

and got the following error
Screenshot 2025-04-23 at 8 54 42 AM

Copy link
Member

Choose a reason for hiding this comment

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

Actually looks like the error was related to that change #217257 I will comment there

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

@Supplementing Supplementing enabled auto-merge (squash) April 23, 2025 15:42
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/alerting/maintenance_window --update'
@Supplementing Supplementing merged commit 3571878 into elastic:main Apr 23, 2025
9 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1186 1189 +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1406 1410 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +3.8KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 164.2KB 164.5KB +367.0B
Unknown metric groups

API count

id before after diff
fleet 1535 1539 +4

History

Supplementing added a commit that referenced this pull request Apr 25, 2025
## Summary

Closes elastic/ingest-dev#5219

- Adds support for editing and saving the categories of a custom
integration. Enhancement of #215259



https://github.com/user-attachments/assets/dca360e6-936a-44aa-b80e-cb4626f7aed2


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

N/A

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…#215259)

Closes elastic#212957 

Adds editing of the automatically-generated readMe file on custom
integrations.

- Allows the user to make edits and then save the readMe changes via a
new endpoint
 - Reloads the UI after making changes to reflect the updated readMe
 -  Automatically updates associated policies

To test the new endpoint, you will need a custom integration installed,
then use it as such

```
PUT kbn:/api/fleet/epm/custom_integrations/{pkgName}
{
    "readMeData": "New README content here"

}
```
 


https://github.com/user-attachments/assets/9a6f2197-aa7f-4610-9476-c1f8b4865c62



### Acceptance criteria

- [ ] An "edit" button with an icon appears in the README section of the
integration overview page for custom integrations generated by automatic
import
- [ ] Clicking the "edit" button should open a modal (TBD) containing a
markdown editor that allows the user to edit the content
- [ ] Users can save their changes, and the updated README content is
persisted
- [ ] Saving updates the version of the package and reloads the content
- [ ] Saving also starts updating policies automatically


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks
 N/A

# Release Note
Adds edit functionality to custom integrations, allowing a user to edit
the README file of a custom integration and save it to be persisted.
Additionally, saving will automatically increment the version of the
integration and update all associated policies.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
## Summary

Closes elastic/ingest-dev#5219

- Adds support for editing and saving the categories of a custom
integration. Enhancement of elastic#215259



https://github.com/user-attachments/assets/dca360e6-936a-44aa-b80e-cb4626f7aed2


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

N/A

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0

6 participants