-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix constand_keyword test run and properly test recent behavior change #117284
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,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.constantkeyword; | ||
|
||
import org.elasticsearch.features.FeatureSpecification; | ||
import org.elasticsearch.features.NodeFeature; | ||
|
||
import java.util.Set; | ||
|
||
public class ConstantKeywordFeatures implements FeatureSpecification { | ||
public static final NodeFeature SYNTHETIC_SOURCE_WRITE_FIX = new NodeFeature("constant_keyword.synthetic_source_write_fix"); | ||
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. Can we add this to MapperFeatures instead? I think that should be okay, although the mapping type is in x-pack. 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. We can i just thought this is cleaner. 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. Because 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. I think we can define a NodeFeature in MapperFeatures class? 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. But I am fine if we continue with this approach too. |
||
|
||
@Override | ||
public Set<NodeFeature> getFeatures() { | ||
return Set.of(); | ||
} | ||
|
||
@Override | ||
public Set<NodeFeature> getTestFeatures() { | ||
return Set.of(SYNTHETIC_SOURCE_WRITE_FIX); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
module org.elasticsearch.xpack.constantkeyword { | ||
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. I am not confident in this files contents. 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. @rjernst is modularizing this plugin strictly necessary or is the services info file sufficient? |
||
requires org.elasticsearch.base; | ||
requires org.elasticsearch.server; | ||
requires org.elasticsearch.xcontent; | ||
requires org.apache.logging.log4j; | ||
requires org.apache.lucene.core; | ||
|
||
provides org.elasticsearch.features.FeatureSpecification with org.elasticsearch.xpack.constantkeyword.ConstantKeywordFeatures; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the "Elastic License | ||
# 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
# Public License v 1"; you may not use this file except in compliance with, at | ||
# your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
# License v3.0 only", or the "Server Side Public License, v 1". | ||
# | ||
|
||
org.elasticsearch.xpack.constantkeyword.ConstantKeywordFeatures |
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.
The test artifact plugin shouldn't be required here. This is only necessarily if another project needs to consume the tests of this project as an artifact dependency.