Skip to content

Commit

Permalink
[Maps] chunk geojson upload to keep import requests under 1MB (#93678) (
Browse files Browse the repository at this point in the history
#93974)

* [Maps] chunk geojson upload to keep import requests under 1MB

* fix geojson_importer tests

* update failure.item to reflect location in file

* remove console statement

* clean up

* return instead of break if upload is no longer active

* add unit test for createChunks

* update file_upload API

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
nreese and kibanamachine authored Mar 8, 2021
1 parent 6d76271 commit da07553
Show file tree
Hide file tree
Showing 5 changed files with 279 additions and 126 deletions.
71 changes: 39 additions & 32 deletions api_docs/file_upload.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 24
"lineNumber": 31
}
},
{
Expand All @@ -30,7 +30,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 25
"lineNumber": 32
}
},
{
Expand All @@ -41,7 +41,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 26
"lineNumber": 33
},
"signature": [
{
Expand All @@ -62,7 +62,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 27
"lineNumber": 34
},
"signature": [
"any"
Expand All @@ -71,7 +71,7 @@
],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 23
"lineNumber": 30
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -237,15 +237,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 37
"lineNumber": 44
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 37
"lineNumber": 44
}
},
{
Expand Down Expand Up @@ -299,7 +299,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 39
"lineNumber": 46
}
},
{
Expand All @@ -318,7 +318,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 40
"lineNumber": 47
}
},
{
Expand All @@ -337,7 +337,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 41
"lineNumber": 48
}
},
{
Expand All @@ -356,15 +356,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 42
"lineNumber": 49
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 38
"lineNumber": 45
}
},
{
Expand Down Expand Up @@ -394,7 +394,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 45
"lineNumber": 52
}
},
{
Expand All @@ -407,7 +407,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 46
"lineNumber": 53
}
},
{
Expand All @@ -420,7 +420,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 47
"lineNumber": 54
}
},
{
Expand All @@ -433,21 +433,21 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 48
"lineNumber": 55
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 44
"lineNumber": 51
}
}
],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 36
"lineNumber": 43
},
"initialIsOpen": false
},
Expand All @@ -466,7 +466,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 11
"lineNumber": 18
},
"signature": [
{
Expand All @@ -486,7 +486,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 12
"lineNumber": 19
},
"signature": [
{
Expand All @@ -506,7 +506,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 13
"lineNumber": 20
},
"signature": [
{
Expand All @@ -521,7 +521,7 @@
],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 10
"lineNumber": 17
},
"initialIsOpen": false
},
Expand All @@ -540,7 +540,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 31
"lineNumber": 38
},
"signature": [
"string | undefined"
Expand All @@ -554,7 +554,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 32
"lineNumber": 39
},
"signature": [
"string | undefined"
Expand All @@ -568,7 +568,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 33
"lineNumber": 40
},
"signature": [
{
Expand All @@ -583,7 +583,7 @@
],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 30
"lineNumber": 37
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -782,7 +782,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 17
"lineNumber": 24
}
},
{
Expand All @@ -793,10 +793,17 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 18
"lineNumber": 25
},
"signature": [
"any[] | undefined"
{
"pluginId": "fileUpload",
"scope": "common",
"docId": "kibFileUploadPluginApi",
"section": "def-common.ImportFailure",
"text": "ImportFailure"
},
"[] | undefined"
]
},
{
Expand All @@ -807,7 +814,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 19
"lineNumber": 26
},
"signature": [
"number | undefined"
Expand All @@ -821,7 +828,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 20
"lineNumber": 27
},
"signature": [
"any"
Expand All @@ -830,7 +837,7 @@
],
"source": {
"path": "x-pack/plugins/file_upload/public/importer/types.ts",
"lineNumber": 16
"lineNumber": 23
},
"initialIsOpen": false
},
Expand Down
Loading

0 comments on commit da07553

Please sign in to comment.