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

[Search Connectors] - Remove duplicate agent policy when connector is created as an integration #208123

Merged

Conversation

meghanmurphy1
Copy link
Contributor

@meghanmurphy1 meghanmurphy1 commented Jan 23, 2025

Summary

With Agentless Connectors, users can create a connector without a connector_id or a connector_name, so when a policy is created without them, they won't be skipped anymore.

The connectors do end up getting their connector_id updated to be the policy's package_policy_id, so when the check is done whether or not to deploy native connectors and create a policy, there's an an additional check for whether connector_id is the package_policy_id.

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

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@meghanmurphy1 meghanmurphy1 self-assigned this Jan 23, 2025
@meghanmurphy1 meghanmurphy1 added the ci:cloud-deploy Create or update a Cloud deployment label Jan 27, 2025
@meghanmurphy1
Copy link
Contributor Author

buildkite test this

@meghanmurphy1
Copy link
Contributor Author

buildkite test this

@meghanmurphy1
Copy link
Contributor Author

buildkite test this

@meghanmurphy1
Copy link
Contributor Author

buildkite test this

@meghanmurphy1 meghanmurphy1 removed the ci:cloud-deploy Create or update a Cloud deployment label Jan 31, 2025
@meghanmurphy1 meghanmurphy1 marked this pull request as ready for review January 31, 2025 18:31
@meghanmurphy1 meghanmurphy1 requested a review from a team as a code owner January 31, 2025 18:31
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 31, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #9 / Maps endpoints apis search ES|QL should return getColumns response in expected shape
  • [job] [logs] FTR Configs #9 / Maps endpoints apis search ES|QL should return getColumns response in expected shape
  • [job] [logs] FTR Configs #30 / Rule execution logic API @ess @serverless synthetic source synthetic source limitations should convert dot-notation to nested objects
  • [job] [logs] FTR Configs #33 / Rule execution logic API @ess @serverless synthetic source synthetic source limitations should convert dot-notation to nested objects
  • [job] [logs] FTR Configs #30 / Rule execution logic API @ess @serverless synthetic source synthetic source limitations should convert dot-notation to nested objects
  • [job] [logs] FTR Configs #33 / Rule execution logic API @ess @serverless synthetic source synthetic source limitations should convert dot-notation to nested objects

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
_inference_fields - 1 +1

History

cc @meghanmurphy1

Copy link
Member

@artem-shelkovnikov artem-shelkovnikov left a comment

Choose a reason for hiding this comment

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

Good one!

@meghanmurphy1 meghanmurphy1 added bug Fixes for quality problems that affect the customer experience backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Jan 31, 2025
@meghanmurphy1 meghanmurphy1 changed the base branch from main to 9.0 January 31, 2025 21:14
@meghanmurphy1 meghanmurphy1 added release_note:skip Skip the PR/issue when compiling release notes backport and removed backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Jan 31, 2025
@meghanmurphy1 meghanmurphy1 changed the base branch from 9.0 to main February 3, 2025 13:50
@meghanmurphy1 meghanmurphy1 added backport:version Backport to applied version labels v9.0.0 and removed backport labels Feb 3, 2025
@meghanmurphy1
Copy link
Contributor Author

buildkite test this

@meghanmurphy1
Copy link
Contributor Author

@elasticmachine merge upstream

@meghanmurphy1 meghanmurphy1 enabled auto-merge (squash) February 3, 2025 16:21
@meghanmurphy1 meghanmurphy1 merged commit 7ee6c3f into elastic:main Feb 3, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.0

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 3, 2025
… created as an integration (elastic#208123)

## Summary

With Agentless Connectors, users can create a connector without a
`connector_id` or a `connector_name`, so when a policy is created
without them, they won't be skipped anymore.

The connectors do end up getting their `connector_id `updated to be the
policy's `package_policy_id`, so when the check is done whether or not
to deploy native connectors and create a policy, there's an an
additional check for whether `connector_id` is the `package_policy_id`.

- Closes
https://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164
- Closes
https://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164

### 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
- [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
- [ ] 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

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 7ee6c3f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 3, 2025
…tor is created as an integration (#208123) (#209365)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Search Connectors] - Remove duplicate agent policy when connector is
created as an integration
(#208123)](#208123)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Meghan
Murphy","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-03T16:36:39Z","message":"[Search
Connectors] - Remove duplicate agent policy when connector is created as
an integration (#208123)\n\n## Summary\r\n\r\nWith Agentless Connectors,
users can create a connector without a\r\n`connector_id` or a
`connector_name`, so when a policy is created\r\nwithout them, they
won't be skipped anymore.\r\n\r\nThe connectors do end up getting their
`connector_id `updated to be the\r\npolicy's `package_policy_id`, so
when the check is done whether or not\r\nto deploy native connectors and
create a policy, there's an an\r\nadditional check for whether
`connector_id` is the `package_policy_id`.\r\n\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"7ee6c3fcb0df988591714589a5aa3756079aa4e5","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","backport:version","v9.1.0"],"title":"[Search
Connectors] - Remove duplicate agent policy when connector is created as
an
integration","number":208123,"url":"https://github.com/elastic/kibana/pull/208123","mergeCommit":{"message":"[Search
Connectors] - Remove duplicate agent policy when connector is created as
an integration (#208123)\n\n## Summary\r\n\r\nWith Agentless Connectors,
users can create a connector without a\r\n`connector_id` or a
`connector_name`, so when a policy is created\r\nwithout them, they
won't be skipped anymore.\r\n\r\nThe connectors do end up getting their
`connector_id `updated to be the\r\npolicy's `package_policy_id`, so
when the check is done whether or not\r\nto deploy native connectors and
create a policy, there's an an\r\nadditional check for whether
`connector_id` is the `package_policy_id`.\r\n\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"7ee6c3fcb0df988591714589a5aa3756079aa4e5"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208123","number":208123,"mergeCommit":{"message":"[Search
Connectors] - Remove duplicate agent policy when connector is created as
an integration (#208123)\n\n## Summary\r\n\r\nWith Agentless Connectors,
users can create a connector without a\r\n`connector_id` or a
`connector_name`, so when a policy is created\r\nwithout them, they
won't be skipped anymore.\r\n\r\nThe connectors do end up getting their
`connector_id `updated to be the\r\npolicy's `package_policy_id`, so
when the check is done whether or not\r\nto deploy native connectors and
create a policy, there's an an\r\nadditional check for whether
`connector_id` is the `package_policy_id`.\r\n\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n-
Closes\r\nhttps://github.com/orgs/elastic/projects/740/views/58?pane=issue&itemId=94923696&issue=elastic%7Csearch-team%7C9164\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"7ee6c3fcb0df988591714589a5aa3756079aa4e5"}}]}]
BACKPORT-->

Co-authored-by: Meghan Murphy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants