Skip to content

Commit

Permalink
Remove support for logs/metrics categories (#571)
Browse files Browse the repository at this point in the history
The metrics and logs categories are not supported anymore. This removes support for it. But it can only be merged after elastic/package-storage#97 landed.
  • Loading branch information
ruflin committed Jun 30, 2020
1 parent f4e37da commit 7d56b1c
Show file tree
Hide file tree
Showing 42 changed files with 139 additions and 143 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Rename `kibana` query param to `kibana.version`. [#518](https://github.com/elastic/package-registry/pull/518)
* Remove `removable` flag from package manifest. [#532](https://github.com/elastic/package-registry/pull/532)
* Rename `datasources` to `config_templates` in dataset manifest. [#570](https://github.com/elastic/package-registry/pull/570)
* Remove support for logs and metrics category. [#571](https://github.com/elastic/package-registry/pull/571)

### Bugfixes

Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func TestEndpoints(t *testing.T) {
{"/categories?experimental=foo", "/categories", "categories-experimental-error.json", categoriesHandler(packagesBasePaths, testCacheTime)},
{"/search?kibana.version=6.5.2", "/search", "search-kibana652.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?kibana.version=7.2.1", "/search", "search-kibana721.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?category=metrics", "/search", "search-category-metrics.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?category=logs", "/search", "search-category-logs.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?category=web", "/search", "search-category-web.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?category=custom", "/search", "search-category-custom.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?package=example", "/search", "search-package-example.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?package=example&all=true", "/search", "search-package-example-all.json", searchHandler(packagesBasePaths, testCacheTime)},
{"/search?internal=true", "/search", "search-package-internal.json", searchHandler(packagesBasePaths, testCacheTime)},
Expand Down
37 changes: 31 additions & 6 deletions testdata/generated/categories-experimental.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
[
{
"id": "logs",
"title": "Logs",
"count": 10
"id": "aws",
"title": "AWS",
"count": 1
},
{
"id": "azure",
"title": "Azure",
"count": 1
},
{
"id": "containers",
"title": "Containers",
"count": 1
},
{
"id": "crm",
"title": "CRM",
"count": 1
},
{
"id": "custom",
"title": "Custom",
"count": 9
},
{
"id": "message_queue",
"title": "Message Queue",
"count": 1
},
{
"id": "metrics",
"title": "Metrics",
"count": 7
"id": "monitoring",
"title": "Monitoring",
"count": 1
},
{
"id": "web",
"title": "Web",
"count": 3
}
]
32 changes: 26 additions & 6 deletions testdata/generated/categories.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
[
{
"id": "logs",
"title": "Logs",
"count": 10
"id": "azure",
"title": "Azure",
"count": 1
},
{
"id": "containers",
"title": "Containers",
"count": 1
},
{
"id": "crm",
"title": "CRM",
"count": 1
},
{
"id": "custom",
"title": "Custom",
"count": 9
},
{
"id": "message_queue",
"title": "Message Queue",
"count": 1
},
{
"id": "metrics",
"title": "Metrics",
"count": 6
"id": "monitoring",
"title": "Monitoring",
"count": 1
},
{
"id": "web",
"title": "Web",
"count": 3
}
]
2 changes: 1 addition & 1 deletion testdata/generated/example-0.0.2.tar.gz-preview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
1995 example-0.0.2/kibana/visualization/7e4084e0-5c99-11e9-8477-077ec9664dbd.json
1849 example-0.0.2/kibana/visualization/80844540-5c97-11e9-8477-077ec9664dbd.json
1920 example-0.0.2/kibana/visualization/ab48c3f0-5ca6-11e9-8477-077ec9664dbd.json
196 example-0.0.2/manifest.yml
195 example-0.0.2/manifest.yml
4 changes: 2 additions & 2 deletions testdata/generated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"readme": "/package/example/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"crm",
"azure"
],
"release": "ga",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/datasources/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/datasources/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs"
"custom"
],
"release": "beta",
"requirement": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/default_pipeline/0.0.2/docs/README.md",
"license": "basic",
"categories": [
"logs",
"containers",
"message_queue"
],
"release": "beta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/ecs_style_dataset/0.0.1/docs/README.md",
"license": "basic",
"categories": [
"logs"
"monitoring"
],
"release": "beta",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/example/0.0.2/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/example/0.0.2/docs/README.md",
"license": "basic",
"categories": [
"logs"
"web"
],
"release": "beta",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/example/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"readme": "/package/example/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"crm",
"azure"
],
"release": "ga",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/experimental/0.0.1/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/experimental/0.0.1/docs/README.md",
"license": "basic",
"categories": [
"metrics"
"aws"
],
"release": "experimental",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/foo/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/foo/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"metrics"
"custom"
],
"release": "beta",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/longdocs/1.0.4/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"readme": "/package/longdocs/1.0.4/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"custom",
"web"
],
"release": "ga",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/metricsonly/2.0.1/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"readme": "/package/metricsonly/2.0.1/docs/README.md",
"license": "basic",
"categories": [
"metrics"
"custom"
],
"release": "ga",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/multiple_false/0.0.1/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/multiple_false/0.0.1/docs/README.md",
"license": "basic",
"categories": [
"logs"
"custom"
],
"release": "beta",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/multiversion/1.0.3/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"readme": "/package/multiversion/1.0.3/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"custom",
"web"
],
"release": "ga",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/multiversion/1.0.4/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"readme": "/package/multiversion/1.0.4/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"custom",
"web"
],
"release": "ga",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/multiversion/1.1.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"readme": "/package/multiversion/1.1.0/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"custom",
"web"
],
"release": "ga",
"requirement": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/no_stream_configs/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs"
"custom"
],
"release": "beta",
"requirement": {
Expand Down
4 changes: 2 additions & 2 deletions testdata/generated/package/reference/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"readme": "/package/reference/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
"custom",
"web"
],
"release": "ga",
"requirement": {
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/yamlpipeline/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"readme": "/package/yamlpipeline/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs"
"custom"
],
"release": "beta",
"requirement": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,58 @@
"path": "/package/datasources/1.0.0"
},
{
"name": "default_pipeline",
"title": "Default pipeline Integration",
"version": "0.0.2",
"description": "Tests if no pipeline is set, it defaults to the default one",
"type": "integration",
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"name": "foo",
"title": "Foo",
"version": "1.0.0",
"description": "This is the foo integration",
"type": "solution",
"download": "/epr/foo/foo-1.0.0.tar.gz",
"downloads": [
{
"path": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"path": "/epr/foo/foo-1.0.0.tar.gz",
"type": "tar"
}
],
"path": "/package/default_pipeline/0.0.2"
"path": "/package/foo/1.0.0"
},
{
"name": "ecs_style_dataset",
"title": "Default pipeline Integration",
"version": "0.0.1",
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"name": "longdocs",
"title": "Long Docs",
"version": "1.0.4",
"description": "This integration contains pretty long documentation.\nIt is used to show the different visualisations inside a documentation to test how we handle it.\nThe integration does not contain any assets except the documentation page.\n",
"type": "integration",
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"download": "/epr/longdocs/longdocs-1.0.4.tar.gz",
"downloads": [
{
"path": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"path": "/epr/longdocs/longdocs-1.0.4.tar.gz",
"type": "tar"
}
],
"path": "/package/ecs_style_dataset/0.0.1"
},
{
"name": "example",
"title": "Example Integration",
"version": "1.0.0",
"description": "This is the example integration",
"type": "integration",
"download": "/epr/example/example-1.0.0.tar.gz",
"downloads": [
"path": "/package/longdocs/1.0.4",
"icons": [
{
"path": "/epr/example/example-1.0.0.tar.gz",
"type": "tar"
"src": "/package/longdocs/1.0.4/img/icon.svg",
"type": "image/svg+xml"
}
],
"path": "/package/example/1.0.0"
]
},
{
"name": "longdocs",
"title": "Long Docs",
"version": "1.0.4",
"description": "This integration contains pretty long documentation.\nIt is used to show the different visualisations inside a documentation to test how we handle it.\nThe integration does not contain any assets except the documentation page.\n",
"name": "metricsonly",
"title": "Metrics Only",
"version": "2.0.1",
"description": "This is an integration with only the metrics category.\n",
"type": "integration",
"download": "/epr/longdocs/longdocs-1.0.4.tar.gz",
"download": "/epr/metricsonly/metricsonly-2.0.1.tar.gz",
"downloads": [
{
"path": "/epr/longdocs/longdocs-1.0.4.tar.gz",
"path": "/epr/metricsonly/metricsonly-2.0.1.tar.gz",
"type": "tar"
}
],
"path": "/package/longdocs/1.0.4",
"path": "/package/metricsonly/2.0.1",
"icons": [
{
"src": "/package/longdocs/1.0.4/img/icon.svg",
"src": "/package/metricsonly/2.0.1/img/icon.svg",
"type": "image/svg+xml"
}
]
Expand Down
Loading

0 comments on commit 7d56b1c

Please sign in to comment.