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

WIP Feature/elasticsearch 6 #2870

Merged
merged 58 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
de65f80
update rest spec with specification from the elasticsearch and xpack …
Mpdreamz Sep 6, 2017
f8bcf82
Add x-pack-env.bat
russcam Aug 25, 2017
8910ecc
removed deleted API's
Mpdreamz Sep 6, 2017
b2008fc
Compilable base for 6.0 beta2 PR's
Mpdreamz Sep 6, 2017
86b61e0
Alternative StartupObject workaround
Mpdreamz Sep 11, 2017
7f84d35
fixed last remaining failing unit tests
Mpdreamz Sep 28, 2017
524ba5f
small update to test framework, allows multiple tests filters and int…
Mpdreamz Sep 28, 2017
a3e5221
fixed seeder issues preventing integration tests to run to completion
Mpdreamz Sep 28, 2017
e06bbd2
x-pack now always needs TLS in production mode when security is enabled
Mpdreamz Sep 28, 2017
2e59c65
integration tests now run to completion successfully
Mpdreamz Oct 10, 2017
85120dc
build and unit test baseline
Mpdreamz Oct 10, 2017
3ade184
get mapping on non existent index with ignore unavailable now returns…
Mpdreamz Oct 10, 2017
1c1985d
_uid is no longer searchable which failed our _field_caps integ test
Mpdreamz Oct 10, 2017
b9bcac0
ClearCache API tests was failing because it was clearing the recycler…
Mpdreamz Oct 10, 2017
c588fde
remove support for fielddata_fields as per https://github.com/elastic…
Mpdreamz Oct 11, 2017
7c731e5
empty filter aggregation is now expected to fail
Mpdreamz Oct 11, 2017
0a116cf
type exists api tests was still using multiple types
Mpdreamz Oct 11, 2017
6259df5
remove postings highlighter as per https://github.com/elastic/elastic…
Mpdreamz Oct 11, 2017
933d081
remove file from search template request, had already removed the cru…
Mpdreamz Oct 11, 2017
254df0a
cluster state tests still assumed there were two types in the project…
Mpdreamz Oct 11, 2017
da51e1d
no longer rely on the deprecated way to store and retrieve scripts
Mpdreamz Oct 11, 2017
526f383
ids query was sending types which is no longer accepted should be sin…
Mpdreamz Oct 11, 2017
7cb947f
fixed failing tests that were still assuming types was emitted as par…
Mpdreamz Oct 11, 2017
88e44bd
post merge fixes
Mpdreamz Oct 21, 2017
a475780
quick update unit tests on this branch, the join-datatype branch has …
Mpdreamz Oct 23, 2017
baf8715
Compilable base for 6.0 beta2 PR's
Mpdreamz Sep 6, 2017
b4415f8
spacing in bulk response item
Mpdreamz Oct 23, 2017
46535f3
Compilable base for 6.0 beta2 PR's
Mpdreamz Sep 6, 2017
53bbeb4
Included xunit.runner.visualstudio
Mpdreamz Sep 11, 2017
04d6c58
fixed last remaining failing unit tests
Mpdreamz Sep 28, 2017
f9b23ba
no longer rely on the deprecated way to store and retrieve scripts
Mpdreamz Oct 11, 2017
2551235
Add support for join data type
Mpdreamz Oct 11, 2017
3f6a3ba
Introduce JoinField type that can be used on POCO's that are indexed
Mpdreamz Oct 11, 2017
4aad39f
AutoMap can now be called for subclasses too, this allows you to keep…
Mpdreamz Oct 11, 2017
9cf1dba
Add documentation on how to move to the new join data type'
Mpdreamz Oct 12, 2017
85ce02e
commits and project are now both stored as doc under project index, u…
Mpdreamz Oct 18, 2017
47d86c6
fixed failing integration tests, due to type normalization'
Mpdreamz Oct 21, 2017
657cfc9
temporarily disable test during rc1 because the delete response chang…
Mpdreamz Oct 21, 2017
b6a7957
remove lingering code
Mpdreamz Oct 23, 2017
e1e4d0d
update failing unit tests after fixing integration tests
Mpdreamz Oct 23, 2017
1c735c6
Added some documentation around type vs relation inference and cleane…
Mpdreamz Oct 23, 2017
2a9b329
rename join helper on querydescriptor
Mpdreamz Oct 23, 2017
aaae3c8
addressed typo's and naming comments from PR review
Mpdreamz Nov 9, 2017
2428623
Added a new deprecation logging tests that works for 6.0, test framew…
Mpdreamz Nov 9, 2017
712e01d
deprecated inline in various script/template API's as per elastic/ela…
Mpdreamz Nov 9, 2017
1bdd7fe
fix failing unit tests still asserting inline is written instead of s…
Mpdreamz Nov 9, 2017
92cb867
removed ignore_case frm hunspell token filter which was never a valid…
Mpdreamz Nov 9, 2017
e4c507c
updated the update with source api tests to no longer use fields as t…
Mpdreamz Nov 9, 2017
7e22139
random score function now requires a field to be provided explicitly …
Mpdreamz Nov 9, 2017
c2e4cf2
comment OnRequestCompletedHandler in TestClient
Mpdreamz Nov 9, 2017
c05cee5
fixed 5 level deep inner hits tests by utilizing the new join relatio…
Mpdreamz Nov 10, 2017
a114c85
Added unmapped endpoints (#2894)
Nov 14, 2017
07474c3
Rename MetaData to Metadata (#2896)
Nov 14, 2017
72fe2b3
updated rest spec with latest GA changes
Mpdreamz Nov 15, 2017
a54b94c
Review of ML
codebrain Nov 15, 2017
d9072ce
update x-pack related rest specs to align with 6.0 GA
Mpdreamz Nov 15, 2017
c946f71
updated codegen to not include new ML api's and ran codegen over the …
Mpdreamz Nov 15, 2017
1e18ac6
updated cref
Mpdreamz Nov 15, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions build/scripts/Commandline.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ Targets:
* clean
- cleans build output folders
* test [testfilter]
- incremental build and unit test for .NET 4.5, [testfilter] allows you to do
a contains match on the tests to be run.
- incremental build and unit test for .NET 4.5, [testfilter] allows you to do a contains match on the tests to be run.
* release <version>
- 0 create a release worthy nuget packages for [version] under build\output
* integrate <elasticsearch_versions> [clustername] [testfilter] -
* integrate <elasticsearch_versions> [clustername] [testfilter]
- run integration tests for <elasticsearch_versions> which is a semicolon separated list of
elasticsearch versions to test or `latest`. Can filter tests by <clustername> and <testfilter>
* canary [apikey] [feed]
Expand Down Expand Up @@ -57,6 +56,14 @@ module Commandline =
| ("test", _)
| ("integrate", _) -> false
| _ -> true

let needsClean =
match (target, skipTests) with
| (_, true) -> true
//dotnet-xunit needs to a build of its own anyways
| ("test", _)
| ("integrate", _) -> false
| _ -> true

let arguments =
match filteredArgs with
Expand Down
13 changes: 9 additions & 4 deletions build/scripts/Targets.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ open Commandline
Commandline.parse()

Target "Build" <| fun _ -> traceHeader "STARTING BUILD"
Target "Start" <| fun _ -> traceHeader "STARTING BUILD"

Target "Clean" Build.Clean

Expand Down Expand Up @@ -75,7 +76,8 @@ Target "Canary" <| fun _ ->
if (not (String.IsNullOrWhiteSpace apiKey) || apiKey = "ignore") then Release.PublishCanaryBuild apiKey feed

// Dependencies
"Clean"
"Start"
=?> ("Clean", Commandline.needsClean )
=?> ("Version", hasBuildParam "version")
==> "Restore"
=?> ("FullBuild", Commandline.needsFullBuild)
Expand All @@ -84,19 +86,22 @@ Target "Canary" <| fun _ ->
==> "Documentation"
==> "Build"

"Clean"
"Start"
=?> ("Clean", Commandline.needsClean )
=?> ("FullBuild", Commandline.needsFullBuild)
==> "Profile"

"Clean"
"Start"
=?> ("Clean", Commandline.needsClean )
=?> ("FullBuild", Commandline.needsFullBuild)
==> "Benchmark"

"Version"
==> "Release"
==> "Canary"

"Clean"
"Start"
=?> ("Clean", Commandline.needsClean )
==> "Restore"
=?> ("FullBuild", Commandline.needsFullBuild)
==> "Integrate"
Expand Down
14 changes: 13 additions & 1 deletion src/CodeGeneration/ApiGenerator/ApiGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public static void Generate(string downloadBranch, params string[] folders)
}
}

private static string[] IgnoredApis { get; } =
{
"xpack.ml.delete_filter.json",
"xpack.ml.get_filters.json",
"xpack.ml.put_filter.json",
};

private static RestApiSpec CreateRestApiSpecModel(string downloadBranch, string[] folders)
{
var directories = Directory.GetDirectories(CodeConfiguration.RestSpecificationFolder, "*", SearchOption.AllDirectories)
Expand All @@ -50,7 +57,12 @@ private static RestApiSpec CreateRestApiSpecModel(string downloadBranch, string[
var endpoints = new Dictionary<string, ApiEndpoint>();
using (var pbar = new ProgressBar(directories.Count, $"Listing {directories.Count} directories", new ProgressBarOptions { BackgroundColor = ConsoleColor.DarkGray }))
{
foreach (var jsonFiles in directories.Select(dir => Directory.GetFiles(dir).Where(f => f.EndsWith(".json")).ToList()))
var folderFiles = directories.Select(dir =>
Directory.GetFiles(dir)
.Where(f => f.EndsWith(".json") && !IgnoredApis.Contains(new FileInfo(f).Name))
.ToList()
);
foreach (var jsonFiles in folderFiles)
{
using (var fileProgress = pbar.Spawn(jsonFiles.Count, $"Listing {jsonFiles.Count} files", new ProgressBarOptions { ProgressCharacter = '─', BackgroundColor = ConsoleColor.DarkGray }))
{
Expand Down
3 changes: 3 additions & 0 deletions src/CodeGeneration/ApiGenerator/Domain/ApiUrlPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public string ClrTypeName
case "filter_id":
case "id": return this.Type == "string" ? "Id" : "Ids";
case "category_id": return "CategoryId";
case "nodes":
case "node_id": return this.Type == "string" ? "NodeId" : "NodeIds";
case "scroll_id": return this.Type == "string" ? "ScrollId" : "ScrollIds";
case "field":
Expand All @@ -64,9 +65,11 @@ public string ClrTypeName
case "realm":
case "realms":
case "alias":
case "context":
case "name":
case "thread_pool_patterns":
return this.Type == "string" ? "Name" : "Names";
case "parent_task_id":
case "task_id": return "TaskId";
case "timestamp": return "Timestamp";
default: return this.Type + "_";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"type" : "string",
"description" : "a short version of the Accept header, e.g. json, yaml"
},
"bytes": {
"type": "enum",
"description" : "The unit in which to display byte values",
"options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
},
"h": {
"type": "list",
"description" : "Comma-separated list of column names to display"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
"type" : "string",
"description" : "a short version of the Accept header, e.g. json, yaml"
},
"bytes": {
"type": "enum",
"description" : "The unit in which to display byte values",
"options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
},
"local": {
"type" : "boolean",
"description" : "Return local information, do not retrieve the state from master node (default: false)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"parts": {
"repository": {
"type" : "list",
"required": true,
"description": "Name of repository from which to fetch the snapshot information"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"remote.info": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-remote-info.html",
"cluster.remote_info": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html",
"methods": ["GET"],
"url": {
"path": "/_remote/info",
Expand All @@ -9,4 +9,4 @@
},
"body": null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"description" : "Specify the node or shard the operation should be performed on (default: random)"
},
"routing": {
"type" : "string",
"description" : "Specific routing value"
"type" : "list",
"description" : "A comma-separated list of specific routing values"
},
"q": {
"type" : "string",
Expand All @@ -67,6 +67,10 @@
"lenient": {
"type" : "boolean",
"description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
},
"terminate_after" : {
"type" : "number",
"description" : "The maximum count for each shard, upon reaching which the query execution will terminate early"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
"methods": ["DELETE"],
"url": {
"path": "/_scripts/{lang}",
"paths": [ "/_scripts/{lang}", "/_scripts/{lang}/{id}" ],
"path": "/_scripts/{id}",
"paths": [ "/_scripts/{id}" ],
"parts": {
"id": {
"type" : "string",
"description" : "Script ID",
"required" : true
},
"lang" : {
"type" : "string",
"description" : "Script language",
"required" : true
}
},
"params" : {
"timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
},
"master_timeout": {
"type" : "time",
"description" : "Specify timeout for connection to master"
}
}
},
"body": null
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exists_source": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-get.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
"methods": ["HEAD"],
"url": {
"path": "/{index}/{type}/{id}/_source",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"field_caps": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-field-caps.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
"methods": ["GET", "POST"],
"url": {
"path": "/_field_caps",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
"methods": ["GET"],
"url": {
"path": "/_scripts/{lang}",
"paths": [ "/_scripts/{lang}", "/_scripts/{lang}/{id}" ],
"path": "/_scripts/{id}",
"paths": [ "/_scripts/{id}" ],
"parts": {
"id": {
"type" : "string",
"description" : "Script ID",
"required" : true
},
"lang" : {
"type" : "string",
"description" : "Script language",
"required" : true
}
},
"params" : {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
"master_timeout": {
"type" : "time",
"description" : "Specify timeout for connection to master"
},
"ignore_unavailable": {
"type": "boolean",
"description": "Ignore unavailable indexes (default: false)"
},
"allow_no_indices": {
"type": "boolean",
"description": "Ignore if a wildcard expression resolves to no concrete indices (default: false)"
},
"expand_wildcards": {
"type": "enum",
"options": [ "open", "closed", "none", "all" ],
"default": "open",
"description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"parts": {
"name": {
"type": "list",
"required": false,
"required": true,
"description": "The comma separated names of the index templates"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
"methods":[ "GET" ],
"url":{
"path":"/{index}",
"paths":[ "/{index}", "/{index}/{feature}" ],
"paths":[ "/{index}" ],
"parts":{
"index":{
"type":"list",
"required" : true,
"description":"A comma-separated list of index names"
},
"feature":{
"type":"list",
"description":"A comma-separated list of features",
"options": ["_settings", "_mappings", "_aliases"]
}
},
"params":{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ingest.processor_grok": {
"documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html",
"methods": [ "GET" ],
"url": {
"path": "/_ingest/processor/grok",
"paths": ["/_ingest/processor/grok"],
"parts": {
},
"params": {
}
},
"body": null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"typed_keys": {
"type" : "boolean",
"description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
},
"pre_filter_shard_size" : {
"type" : "number",
"description" : "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.",
"default" : 128
}
}
},
Expand Down
Loading