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

[pull] main from elastic:main #18

Merged
merged 4 commits into from
Dec 24, 2022
Merged

[pull] main from elastic:main #18

merged 4 commits into from
Dec 24, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 24, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Spencer and others added 4 commits December 23, 2022 09:31
The new images have an updated gh binary which now requires setting the
`GITHUB_REPO` env var, or calling `gh repo set-default`. I opted for the
env var so that we didn't need to find a good time to execute the CLI
(after the keys are in the env, but before all other user code) or worry
about the logging. This also allows other users of our scripts to
customize as makes sense without having to dive into a bunch of
imperative shell code.

Co-authored-by: kibanamachine <[email protected]>
This makes the add domain input in the Elastic crawler full width
## Summary

In the new edit tags & edit assignees flyouts, I use `emotion` to add
CSS that makes the flyout body 100% in height. PR
#146212 introduces some changes
where `emotion` runs in development mode. Before this PR it wasn't. This
had as a result to break the styles in Cases. Our e2e tests did not
catch it because all tests in CI run in production mode.

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Fixes #124946

## Summary

Takes a step toward optimising our migration paths by only reindexing
(an expensive operation) when needed by checking whether the current SO
mappings have "changed".

By "changed" we mean that we have detected a new md5 checksum of any
registered saved object type relative to the hashes we have stored.

## How to test

These changes are constrained to the `model.ts`, a test was added for
correctly detecting that mappings are the same during the `INIT` phase
to send us down the correct migration path.

Additionally, we have a new Jest integration test `skip_reindex.test.ts`
that runs Kibana and inspects the logs for the expected model
transitions.

Everything else should remain the same.

## Happy path for skipping reindex

```
RUN INIT

IF !versionMigrationIsComplete AND
   !kibana indexBelongsToLaterVersion AND
   !waitForMigrationCompletion AND
   mappingsAreUnchanged
THEN
  the migration operations must target the existing .kibana_x.y.z_001 index

RUN PREPARE_COMPATIBLE_MIGRATION (new state)
    we remove old version aliases (prevent old reads/writes), and set the current version alias (prevent old migrations)

SKIP LEGACY_SET_WRITE_BLOCK
SKIP ...
SKIP SET_SOURCE_WRITE_BLOCK 
SKIP ...
SKIP REFRESH_TARGET

RUN OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT
...
RUN MARK_VERSION_INDEX_READY
DONE
```

## Notes

* This optimisation will only be triggered when there are no mappings
changes AND we are upgrading to a new version. This does not cover all
cases. In future we will make this more sophisticated by checking for
incompatible changes to mappings and only reindexing when those occur.

## Related

* #147503

### Checklist

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

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Gerard Soldevila <[email protected]>
@pull pull bot added the ⤵️ pull label Dec 24, 2022
@pull pull bot merged commit bcb8a13 into afharo:main Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants