Skip to content

Commit

Permalink
Bump version, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ql committed Aug 30, 2024
1 parent d2129a8 commit e413213
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@

### Bugs Fixed

## 8.0.0-beta (2024-08-27)

### New Features

* [#962](https://github.com/toptal/chewy/pull/962): ElasticSearch v.8 support added

* `delete_all_enabled` setting introduced to align Chewy.massacre with wildcard indices deletion disabled in ES 8 by default

### Changes

### Bugs Fixed

## 7.6.0 (2024-05-03)

### Changes
Expand Down
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Chewy is compatible with MRI 3.0-3.2¹.

| Chewy version | Elasticsearch version |
| ------------- | ---------------------------------- |
| 8.0.0 | 8.x |
| 7.2.x | 7.x |
| 7.1.x | 7.x |
| 7.0.x | 6.8, 7.x |
Expand Down Expand Up @@ -97,7 +98,36 @@ development:
Make sure you have Elasticsearch up and running. You can [install](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) it locally, but the easiest way is to use [Docker](https://www.docker.com/get-started):
```shell
$ docker run --rm --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.11.1
$ docker run --rm --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:8.15.0
```

### Security

Please note that starting from version 8 ElasticSearch has security features enabled by default.
Docker command above has it disabled for local testing convenience. If you want to enable it, omit
`"xpack.security.enabled=false"` part from Docker command, and run these command after starting container (container name `es8` assumed):

Reset password for `elastic` user:
```
docker container exec es8 '/usr/share/elasticsearch/bin/elasticsearch-reset-password' -u elastic
```

Extract CA certificate generated by ElasticSearch on first run:
```
docker container cp es8:/usr/share/elasticsearch/config/certs/http_ca.crt tmp/
```

And then add them to settings:

```yaml
# config/chewy.yml
development:
host: 'localhost:9200'
user: 'elastic'
password: 'SomeLongPassword'
transport_options:
ssl:
ca_file: './tmp/http_ca.crt'
```
### Index
Expand Down Expand Up @@ -941,6 +971,8 @@ Controller actions are wrapped with the configurable value of `Chewy.request_str

It is also a good idea to set up the `:bypass` strategy inside your test suite and import objects manually only when needed, and use `Chewy.massacre` when needed to flush test ES indices before every example. This will allow you to minimize unnecessary ES requests and reduce overhead.

Deprecation note: since version 8 wildcard removing of indices is disabled by default. You can enable it for a cluster with setting `action.destructive_requires_name` to false.

```ruby
RSpec.configure do |config|
config.before(:suite) do
Expand Down
2 changes: 1 addition & 1 deletion lib/chewy/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Chewy
VERSION = '7.6.0'.freeze
VERSION = '8.0.0'.freeze
end

0 comments on commit e413213

Please sign in to comment.