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

[Enterprise Search] Log warning for Kibana/EntSearch version mismatches #100809

Merged
merged 2 commits into from
May 28, 2021

Conversation

cee-chen
Copy link
Member

Summary

Adds a small Kibana log warning whenever Enterprise Search polls the config data endpoint (e.g. for access check, on plugin load) and warns if versions are mismatched.

We should always see this on dev since Kibana's master is 8.0.0 and Ent Search's is 7.x:

Checklist

FYI, no i18n for log messages is required from my last recollection of asking this question.

@cee-chen cee-chen added Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels May 27, 2021
@cee-chen cee-chen requested a review from a team May 27, 2021 18:06
@@ -135,3 +139,13 @@ export const callEnterpriseSearchConfigAPI = async ({
clearTimeout(timeout);
}
};

export const warnMismatchedVersions = (enterpriseSearchVersion: string, log: Logger) => {
Copy link
Member Author

@cee-chen cee-chen May 27, 2021

Choose a reason for hiding this comment

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

I was 50/50 about pulling this out to a separate helper const vs. keeping it inline in the main fn, but I figured there was enough complex logic going on in the main fn (timeouts, etc.) that it was a little nicer to pull this out to its own thing 🤔 If you feel strongly otherwise though I can change it, LMK

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 22 20 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 261 149 -112
lens 67 45 -22
licensing 18 15 -3
lists 239 236 -3
maps 286 208 -78
ml 121 115 -6
monitoring 109 56 -53
securitySolution 386 342 -44
stackAlerts 101 95 -6
total -342

History

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

Copy link
Contributor

@byronhulcher byronhulcher left a comment

Choose a reason for hiding this comment

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

Code-wise this looks fine to me, but I'm not sure I understand how often this log message will appear for a user. I can think of a few SDH issues that were somewhat complicated by noisy but ultimately benign error messages we had to filter out. Just want to validate that this will is the right time/place/rate for this message to encourage them to resolve the version mismatch

@cee-chen
Copy link
Member Author

cee-chen commented May 28, 2021

Simplified explanation, but it essentially happens primarily "on load" and that's it.

We call callEnterpriseSearchConfigAPI for two things:

  • On initial Kibana load/visit, to check whether the user has access to App Search/Workplace Search (and disable the plugin if not)
  • On initial Enterprise Search plugin load/visit (any of the 3 plugins - navigating between Enterprise Search plugins does not trigger a new call, navigating out to (e.g.) Observability and then back to Enterprise Search will re-trigger). This call grabs the initial app data that we used to hydrate our React apps with on load.

It should not re-log after that. I don't anticipate this being a noisy log especially for users that primarily stay on Enterprise Search. It has the same conditions as the "timeout warnings" which the Kibana team/security team told us to put in so at the very minimum it won't be noisier than that :)

@cee-chen
Copy link
Member Author

Oh, I should add the two logs in a row in the PR screenshot was me deliberately hard refreshing the page to test if the logs were working.

Copy link
Contributor

@byronhulcher byronhulcher left a comment

Choose a reason for hiding this comment

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

Simplified explanation, but it essentially happens primarily "on load" and that's it.

👍

Oh, I should add the two logs in a row in the PR screenshot was me deliberately hard refreshing the page to test if the logs were working.

That was, admittedly, what sparked my curiosity.

Merge on @constancecchen

@cee-chen cee-chen merged commit 8529040 into elastic:master May 28, 2021
@cee-chen cee-chen deleted the log-ent-search-version-mismatch branch May 28, 2021 17:57
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 28, 2021
…es (elastic#100809)

* Add server log warnings whenever Kibana and Enterprise Search versions are mismatched

* Copy feedback
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

gmmorris added a commit to gmmorris/kibana that referenced this pull request May 28, 2021
* master: (77 commits)
  [RAC][Security Solution] Register Security Detection Rules with Rule Registry (elastic#96015)
  [Enterprise Search] Log warning for Kibana/EntSearch version mismatches (elastic#100809)
  updating the saved objects test to include more saved object types (elastic#100828)
  [ML] Fix categorization job view examples link when datafeed uses multiple indices (elastic#100789)
  Fixing ES archive mapping failure (elastic#100835)
  Fix bug with Observability > APM header navigation (elastic#100845)
  [Security Solution][Endpoint] Add event filters summary card to the fleet endpoint tab (elastic#100668)
  [Actions] Taking space id into account when creating email footer link (elastic#100734)
  Ensure comments on parameters in arrow functions are captured in the docs and ci metrics. (elastic#100823)
  [Security Solution] Improve find rule and find rule status route performance (elastic#99678)
  [DOCS] Adds video to introduction (elastic#100906)
  [Fleet] Improve combo box for fleet settings (elastic#100603)
  [Security Solution][Endpoint] Endpoint generator and data loader support for Host Isolation (elastic#100813)
  [DOCS] Adds Lens video (elastic#100898)
  [TSVB] [Table tab] Fix "Math" aggregation (elastic#100765)
  chore(NA): moving @kbn/io-ts-utils into bazel (elastic#100810)
  [Alerting] Adding feature flag for enabling/disabling rule import and export (elastic#100718)
  [TSVB] Fix Upgrading from 7.12.1 to 7.13.0 breaks TSVB (elastic#100864)
  [Lens] Adds dynamic table cell coloring (elastic#95217)
  [Security Solution][Endpoint] Do not display searchbar in security-trusted apps if there are no items (elastic#100853)
  ...
kibanamachine added a commit that referenced this pull request May 28, 2021
…es (#100809) (#100935)

* Add server log warnings whenever Kibana and Enterprise Search versions are mismatched

* Copy feedback

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
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 Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants