-
Notifications
You must be signed in to change notification settings - Fork 369
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
ES 8.x upgrade #917
ES 8.x upgrade #917
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: "3.4" | ||
services: | ||
elasticsearch_test: | ||
image: "elasticsearch:8.11.3" | ||
environment: | ||
- bootstrap.memory_lock=${ES_MEMORY_LOCK:-false} | ||
- "ES_JAVA_OPTS=-Xms${TEST_ES_HEAP_SIZE:-500m} -Xmx${TEST_ES_HEAP_SIZE:-500m}" | ||
- discovery.type=single-node | ||
- xpack.security.enabled=false | ||
- action.destructive_requires_name=false | ||
ports: | ||
- "127.0.0.1:9250:9200" | ||
ulimits: | ||
nofile: | ||
soft: 65536 | ||
hard: 65536 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,18 +204,18 @@ def subscribe_notification | |
end | ||
end | ||
|
||
let(:mapper_parsing_exception) do | ||
let(:document_parsing_exception) do | ||
{ | ||
'type' => 'mapper_parsing_exception', | ||
'reason' => 'object mapping for [name] tried to parse field [name] as object, but found a concrete value' | ||
'type' => 'document_parsing_exception', | ||
'reason' => '[1:9] object mapping for [name] tried to parse field [name] as object, but found a concrete value' | ||
} | ||
end | ||
|
||
specify do | ||
payload = subscribe_notification | ||
import dummy_cities, batch_size: 2 | ||
expect(payload).to eq(index: CitiesIndex, | ||
errors: {index: {mapper_parsing_exception => %w[1 2 3]}}, | ||
errors: {index: {document_parsing_exception => %w[1 2 3]}}, | ||
import: {index: 3}) | ||
end | ||
end | ||
|
@@ -270,8 +270,8 @@ def subscribe_notification | |
expect(payload).to eq( | ||
errors: { | ||
index: {{ | ||
'type' => 'mapper_parsing_exception', | ||
'reason' => 'object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
'type' => 'document_parsing_exception', | ||
'reason' => '[1:27] object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these numeric prefixes ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't know this yet, I've just made all specs passing, to see how many things do we break by upgrading to ES 8.x There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When can we expect for this to be considered for release? |
||
} => %w[2 4]} | ||
}, | ||
import: {index: 6}, | ||
|
@@ -293,8 +293,8 @@ def subscribe_notification | |
expect(payload).to eq( | ||
errors: { | ||
index: {{ | ||
'type' => 'mapper_parsing_exception', | ||
'reason' => 'object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
'type' => 'document_parsing_exception', | ||
'reason' => '[1:27] object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
} => %w[2 4]} | ||
}, | ||
import: {index: 6}, | ||
|
@@ -319,8 +319,8 @@ def subscribe_notification | |
expect(payload).to eq( | ||
errors: { | ||
index: {{ | ||
'type' => 'mapper_parsing_exception', | ||
'reason' => 'object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
'type' => 'document_parsing_exception', | ||
'reason' => '[1:27] object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
} => %w[2 4]} | ||
}, | ||
import: {index: 6}, | ||
|
@@ -383,8 +383,8 @@ def subscribe_notification | |
|
||
# Full match doesn't work here. | ||
expect(payload[:errors][:update].keys).to match([ | ||
hash_including('type' => 'document_missing_exception', 'reason' => '[_doc][1]: document missing'), | ||
hash_including('type' => 'document_missing_exception', 'reason' => '[_doc][3]: document missing') | ||
hash_including('type' => 'document_missing_exception', 'reason' => '[1]: document missing'), | ||
hash_including('type' => 'document_missing_exception', 'reason' => '[3]: document missing') | ||
]) | ||
expect(payload[:errors][:update].values).to eq([['1'], ['3']]) | ||
expect(imported_cities).to match_array([ | ||
|
@@ -431,8 +431,8 @@ def subscribe_notification | |
expect(payload).to eq( | ||
errors: { | ||
update: {{ | ||
'type' => 'mapper_parsing_exception', | ||
'reason' => 'object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
'type' => 'document_parsing_exception', | ||
'reason' => '[1:26] object mapping for [object] tried to parse field [object] as object, but found a concrete value' | ||
} => %w[2 4]} | ||
}, | ||
import: {index: 6}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan here to do a major version bump of Chewy as well? So the chewy 7.x series will continue to get any bugfixes for ES7 gems, and the chewy 8.x series will support the ES8.x gems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since the major version of the Chewy, is equal to major version of the ES.
This my plan, but since I have never done this before, cannot say for sure, how hard it will be to support both versions at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully it shouldn't be too much work to keep the
7.x
branch up to date with changes in the Elasticsearch Ruby client. The last minor release is7.17
and we're not planning to release any new minors or add any new features for the moment, just addressing bugs or security issues, so patch releases only.