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] Fix agent logs not reading query from URL #117286

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented Nov 3, 2021

Summary

Fixes #112412

In #106267 we converted Fleet routing to not use hashes. We then moved to not reading the agent logs state from the URL hash in #109982 but the URL state storage connector was still storing the query using the hash, causing a mismatch.

@hop-dev hop-dev added release_note:fix v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 v8.1.0 labels Nov 3, 2021
@hop-dev hop-dev self-assigned this Nov 3, 2021
@hop-dev hop-dev requested review from a team as code owners November 3, 2021 11:40
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@@ -63,7 +63,7 @@ export const createKbnUrlStateStorage = (
onGetError,
onSetError,
}: {
useHash: boolean;
useHash?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This param is defaulted so I believe can be set as optional?

Copy link
Member

Choose a reason for hiding this comment

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

Probably a viable change, but if code owner review becomes a blocker maybe we should consider reverting and landing the other small change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not 100% sure why this was marked as required at the time, perhaps it is because this functionality was "experimental" and is often tied to an advanced setting, e.g.:

useHash: coreStart.uiSettings.get('state:storeInSessionStorage')

and the default would one day change.

@Dosant can confirm when is back next week. This looks like a safe change to make though, but I would advise waiting until he gets back next week or unblocking by not making this change now per @kpollich .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Brill thanks @jloleysens I'll work around it for now 👍

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@@ -63,7 +63,7 @@ export const createKbnUrlStateStorage = (
onGetError,
onSetError,
}: {
useHash: boolean;
useHash?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Probably a viable change, but if code owner review becomes a blocker maybe we should consider reverting and landing the other small change.

@hop-dev hop-dev enabled auto-merge (squash) November 4, 2021 15:04
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

LGTM!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fleet 615.7KB 615.8KB +28.0B

History

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

cc @hop-dev

@hop-dev hop-dev merged commit 9bc2f22 into elastic:main Nov 4, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 4, 2021
* Don't use hash for agent logs url state

* revert core app services change
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 4, 2021
* Don't use hash for agent logs url state

* revert core app services change
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 4, 2021
* Don't use hash for agent logs url state

* revert core app services change

Co-authored-by: Mark Hopkin <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 5, 2021
…ink-to-kibana-app

* 'main' of github.com:elastic/kibana: (290 commits)
  [Connectors][ServiceNow] Remove SN flags (elastic#117511)
  [ML] Functional tests - stabilize and re-enable feature importance tests (elastic#117503)
  [RAC] Disable the actions button if the user has inadequate privileges (elastic#117488)
  [Visualize] [xyChart] filter labels by default (elastic#117288)
  Fix warning when setting description to undefined (elastic#117338)
  [build] Set monitoring.ui.container.elasticsearch.enabled for all containers (elastic#115087)
  fix types
  [Alerting] UX fixes for execution duration chart (elastic#117193)
  [CI] Delete node_modules in between bootstrap attempts (elastic#117588)
  Flaky test fixes (elastic#117028)
  [Security Solution] [Sourcerer] [Feature Branch] Update to use Kibana Data Views  (elastic#114806)
  [ML] Hide anomaly entity filter button tooltips when clicked (elastic#117493)
  adjust the synthetics journey type (elastic#117316)
  Refines hasAnyData check for alerts (elastic#117499)
  [Fleet] Default to APM tutorial (elastic#117421)
  [Maps] update docs for index pattern -> data view rename (elastic#117400)
  [Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (elastic#116821)
  [Fleet] Fix agent logs not reading query from URL (elastic#117286)
  Fixing Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout·ts - Actions and Triggers app create alert should successfully test valid es_query alert (elastic#114917)
  [Metrics UI] Add docs link to redundant groupBy detection (elastic#116822)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/shared_imports.ts
#	x-pack/plugins/reporting/server/routes/management/jobs.ts
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 8, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

hop-dev added a commit that referenced this pull request Nov 11, 2021
…117568)

* [Fleet] Fix agent logs not reading query from URL (#117286)

* Don't use hash for agent logs url state

* revert core app services change

* Cherrypick changes from PR #115192

Backport @miltonhultgren's changes to add the `useHashQuery` param to `createKbnUrlStateStorage`

Co-authored-by: Milton Hultgren <[email protected]>

Co-authored-by: Mark Hopkin <[email protected]>
Co-authored-by: Milton Hultgren <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0 v8.0.0 v8.1.0
Projects
None yet
5 participants