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

[Fleet] Fleet APIs using kbn/config-schema part 3 #193698

Merged
merged 18 commits into from
Oct 3, 2024

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Sep 23, 2024

Summary

Relates #184685

Added response schemas to remaining APIs:

  • agent_policies
  • agents, actions
  • download_source
  • enrollment_api_key
  • epm

when this is merged, the fleet/openapi folder can be deleted (which includes the previous version of bundled.yaml)

Checklist

@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Sep 23, 2024
@juliaElastic juliaElastic self-assigned this Sep 23, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@juliaElastic juliaElastic marked this pull request as ready for review October 2, 2024 07:11
@juliaElastic juliaElastic requested a review from a team as a code owner October 2, 2024 07:11
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 2, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

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

I tested locally and couldn't find anything breaking, I tried to test most of the updated endpoints. I did not test some of the agent actions (upgrade for example).

I left some small comments for the code but overall LGTM! 🚀

x-pack/plugins/fleet/server/types/models/agent_policy.ts Outdated Show resolved Hide resolved
x-pack/plugins/fleet/server/types/models/agent_policy.ts Outdated Show resolved Hide resolved
!(Array.isArray(assets.elasticsearch?.transform) && assets.elasticsearch?.transform?.length > 0)
!(
Array.isArray(assets.elasticsearch?.transform) &&
(assets.elasticsearch?.transform?.length ?? 0) > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for this change? small bug in the UI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made transform optional in TS type as it came up as an error in schema validation (sometimes undefined), and then tsc started complaining about transform?.length possibly undefined

postNewAgentActionHandlerBuilder: jest.fn(),
}));

describe('schema validation', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for all the testing!

@juliaElastic juliaElastic requested a review from a team as a code owner October 2, 2024 14:11
@juliaElastic juliaElastic removed the request for review from a team October 2, 2024 14:12
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

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 1245 1246 +1

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 +37.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
fleet 73 74 +1
Unknown metric groups

API count

id before after diff
fleet 1368 1369 +1

History

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit 28aeb68 into elastic:main Oct 3, 2024
24 checks passed
tiansivive pushed a commit to tiansivive/kibana that referenced this pull request Oct 7, 2024
## Summary

Relates elastic#184685


Added response schemas to remaining APIs:
- agent_policies
- agents, actions
- download_source
- enrollment_api_key
- epm

when this is merged, the fleet/openapi folder can be deleted (which
includes the previous version of bundled.yaml)


### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants