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

[HTTP] Log build number mismatch #170261

Merged
merged 10 commits into from
Nov 2, 2023

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Oct 31, 2023

This PR adds new behaviour to log a message when we are not enforcing strict client-server build number checks and see a different build number.

How to test

  • Start Kibana
  • Set server.versioned.strictClientVersionCheck: false in kibana.dev.yml
  • Send a request that will return a bad response, in my case I sent POST /api/files/files/defaultImage with an empty body {}

Assumptions

  • We only want to log when we are returning a bad response (>=400). It's possible that we miss events this way, but the assumption is that status codes >=400 are a strong indication that something is wrong, i.e. we don't care about mismatches when good responses happen
  • We want to treat this as a WARN level log
  • We will be able to track this in o11y using the logger context (like kbn-build-number-mismatch)

Example

[2023-11-02T13:52:48.134+01:00][WARN ][http.kbn-build-number-mismatch] Client build (999999) is older than this Kibana server build (9007199254740991). The [400] error status in req id [29ad1f7c-056a-419b-9051-b45598aebd2c] may be due to client-server incompatibility!

@jloleysens jloleysens added Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Oct 31, 2023
@jloleysens jloleysens force-pushed the add-log-about-version-mismatch branch from 952f3e0 to 314bf35 Compare November 1, 2023 12:30
@jloleysens jloleysens marked this pull request as ready for review November 2, 2023 12:20
@jloleysens jloleysens requested a review from a team as a code owner November 2, 2023 12:20
@jloleysens jloleysens enabled auto-merge (squash) November 2, 2023 13:17
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@jloleysens jloleysens merged commit 2aa8e6d into elastic:main Nov 2, 2023
27 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 2, 2023
delanni pushed a commit to delanni/kibana that referenced this pull request Nov 6, 2023
This PR adds new behaviour to log a message when we are not enforcing
strict client-server build number checks and see a different build
number.

## How to test

* Start Kibana
* Set `server.versioned.strictClientVersionCheck: false` in
`kibana.dev.yml`
* Send a request that will return a bad response, in my case I sent
`POST /api/files/files/defaultImage` with an empty body `{}`

## Assumptions

* We only want to log when we are returning a bad response (>=400). It's
possible that we miss events this way, but the assumption is that status
codes >=400 are a strong indication that something is wrong, i.e. we
don't care about mismatches when good responses happen
* We want to treat this as a `WARN` level log
* We will be able to track this in o11y using the `logger` context (like
`kbn-build-number-mismatch`)

## Example

```
[2023-11-02T13:52:48.134+01:00][WARN ][http.kbn-build-number-mismatch] Client build (999999) is older than this Kibana server build (9007199254740991). The [400] error status in req id [29ad1f7c-056a-419b-9051-b45598aebd2c] may be due to client-server incompatibility!
```
@jloleysens jloleysens deleted the add-log-about-version-mismatch branch November 8, 2023 11:00
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 Feature:http release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants