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] copy inactivity_timeout when duplicating agent policy #164544

Merged

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Aug 23, 2023

Summary

Closes #164532

inactivity_timeout and a lot of other properties on the agent policy saved object were not being copied over when duplicating an agent policy.

The other properties that are now duplicated when cloning an agent policy are :

  • inactivity_timeout
  • unenroll_timeout
  • agent_features - this contains the hostname mode
  • overrides
  • data_output_id
  • monitoring_output_id
  • download_source_id
  • fleet_server_host_id

Automated test added.

@hop-dev hop-dev added release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Aug 23, 2023
@hop-dev hop-dev self-assigned this Aug 23, 2023
@hop-dev hop-dev requested a review from a team as a code owner August 23, 2023 09:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@hop-dev hop-dev enabled auto-merge (squash) August 23, 2023 10:50
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Defend Workflows Endpoint Cypress Tests #2 / Automated Response Actions From alerts should have generated endpoint and rule should have generated endpoint and rule

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
fleet 46 45 -1

Total ESLint disabled count

id before after diff
fleet 57 56 -1

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

cc @hop-dev

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.10

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 23, 2023
…tic#164544)

## Summary

Closes elastic#164532

`inactivity_timeout` and a lot of other properties on the agent policy
saved object were not being copied over when duplicating an agent
policy.

The other properties that are now duplicated when cloning an agent
policy are :

- `inactivity_timeout`
- `unenroll_timeout`
- `agent_features` - this contains the hostname mode
- `overrides`
- `data_output_id`
- `monitoring_output_id`
- `download_source_id`
- `fleet_server_host_id`

Automated test added.

(cherry picked from commit ce2c18d)
kibanamachine added a commit that referenced this pull request Aug 23, 2023
#164544) (#164564)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Fleet] copy `inactivity_timeout` when duplicating agent policy
(#164544)](#164544)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-23T11:13:01Z","message":"[Fleet]
copy `inactivity_timeout` when duplicating agent policy (#164544)\n\n##
Summary\r\n\r\nCloses #164532 \r\n\r\n`inactivity_timeout` and a lot of
other properties on the agent policy\r\nsaved object were not being
copied over when duplicating an agent\r\npolicy.\r\n\r\nThe other
properties that are now duplicated when cloning an agent\r\npolicy are
:\r\n\r\n- `inactivity_timeout` \r\n- `unenroll_timeout` \r\n-
`agent_features` - this contains the hostname mode \r\n- `overrides`
\r\n- `data_output_id` \r\n- `monitoring_output_id` \r\n-
`download_source_id` \r\n- `fleet_server_host_id`\r\n\r\nAutomated test
added.","sha":"ce2c18dbae16e4b1e336ee312b6581a6d499579c","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.11.0"],"number":164544,"url":"https://github.com/elastic/kibana/pull/164544","mergeCommit":{"message":"[Fleet]
copy `inactivity_timeout` when duplicating agent policy (#164544)\n\n##
Summary\r\n\r\nCloses #164532 \r\n\r\n`inactivity_timeout` and a lot of
other properties on the agent policy\r\nsaved object were not being
copied over when duplicating an agent\r\npolicy.\r\n\r\nThe other
properties that are now duplicated when cloning an agent\r\npolicy are
:\r\n\r\n- `inactivity_timeout` \r\n- `unenroll_timeout` \r\n-
`agent_features` - this contains the hostname mode \r\n- `overrides`
\r\n- `data_output_id` \r\n- `monitoring_output_id` \r\n-
`download_source_id` \r\n- `fleet_server_host_id`\r\n\r\nAutomated test
added.","sha":"ce2c18dbae16e4b1e336ee312b6581a6d499579c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164544","number":164544,"mergeCommit":{"message":"[Fleet]
copy `inactivity_timeout` when duplicating agent policy (#164544)\n\n##
Summary\r\n\r\nCloses #164532 \r\n\r\n`inactivity_timeout` and a lot of
other properties on the agent policy\r\nsaved object were not being
copied over when duplicating an agent\r\npolicy.\r\n\r\nThe other
properties that are now duplicated when cloning an agent\r\npolicy are
:\r\n\r\n- `inactivity_timeout` \r\n- `unenroll_timeout` \r\n-
`agent_features` - this contains the hostname mode \r\n- `overrides`
\r\n- `data_output_id` \r\n- `monitoring_output_id` \r\n-
`download_source_id` \r\n- `fleet_server_host_id`\r\n\r\nAutomated test
added.","sha":"ce2c18dbae16e4b1e336ee312b6581a6d499579c"}}]}]
BACKPORT-->

Co-authored-by: Mark Hopkin <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 23, 2023
* main: (150 commits)
  Fixes unnecessary autocompletes on HTTP methods (elastic#163233)
  [Defend Workflows] Convert filterQuery to kql  (elastic#161806)
  [Fleet] copy `inactivity_timeout` when duplicating agent policy (elastic#164544)
  Fix 7.17 forward compatibility with 8.2+ (elastic#164274)
  [ML] Fixes dark mode in flyouts and modals (elastic#164399)
  [Defend Workflows]Changes to policy settings are not persistent until a refresh (elastic#164403)
  [Security Solution][Endpoint] Fixes kibana crash when going back to policy details page (elastic#164329)
  Prepare the Security domain HTTP APIs for Serverless (elastic#162087)
  skip failing test suite (elastic#160986)
  [Security Solution] Fix flaky Event Filters test (elastic#164473)
  [EDR workflows] Osquery serverless tests (elastic#163795)
  [Fleet] Only show agent dashboard links if there is more than one non-server agent and if the dashboards exist (elastic#164469)
  [Chrome UI] Fix background color in serverless (elastic#164419)
  [DOCS] Saved objects - resolve import errors API (elastic#162825)
  Remove 'Create Rule' button from Rule Group page (elastic#164167)
  [Security Solution] expandable flyout - fix infinite loop in correlations (elastic#163450)
  [Remote Clusters] Update copy about port help text (elastic#164442)
  [api-docs] 2023-08-23 Daily api_docs build (elastic#164524)
  [data views] Disable scripted fields in serverless environment (elastic#163228)
  [Reporting] Fix - show diagnostic only when image reporting is enabled (elastic#164336)
  ...
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) release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet]: Default inactivity timeout gets removed on duplicating the Agent policy.
6 participants