Skip to content

Commit

Permalink
Rename fields data stream (#622)
Browse files Browse the repository at this point in the history
* Rename datastream to data_stream

* Bump up version

* Update CHANGELOG

* Fix

* Fix

* Fix descriptions

* Fix
  • Loading branch information
mtojek authored Aug 5, 2020
1 parent ca1e8e4 commit 6e278bc
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 66 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/elastic/package-registry/compare/v0.9.0...master)
## [Unreleased](https://github.com/elastic/package-registry/compare/v0.10.0...master)

### Breaking changes

Expand All @@ -16,7 +16,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Known Issue

## [v0.9.0](https://github.com/elastic/package-registry/compare/v0.8.0...0.9.0)
## [v0.10.0](https://github.com/elastic/package-registry/compare/v0.9.0...v0.10.0)

### Breaking changes

* Change dataset.* fields to data_stream.* fields. [#622](https://github.com/elastic/package-registry/pull/622)

## [v0.9.0](https://github.com/elastic/package-registry/compare/v0.8.0...v0.9.0)

### Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
packageDir = "package"

serviceName = "package-registry"
version = "0.9.0"
version = "0.10.0"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/index.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"service.name": "package-registry",
"version": "0.9.0"
"version": "0.10.0"
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
description: >
Event timestamp.
- name: datastream
title: datastream
- name: data_stream
title: data_stream
group: 2
description: Fields describing the new indexing strategy <type>-<name>-<namespace>
type: group
fields:
- name: dataset
level: custom
type: constant_keyword
description: Datastream dataset.
description: Data stream dataset.
default_field: false
- name: namespace
level: custom
type: constant_keyword
description: Datastream namespace.
description: Data stream namespace.
default_field: false
- name: type
level: custom
type: constant_keyword
description: Datastream type.
description: Data stream type.
default_field: false
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: datastream.type
- name: data_stream.type
type: constant_keyword
description: >
Datastream type.
- name: datastream.dataset
Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: >
Datastream dataset.
- name: datastream.namespace
Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: >
Datastream namespace.
Data stream namespace.
- name: "@timestamp"
type: date
description: >
Expand Down
6 changes: 3 additions & 3 deletions util/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ func (d *Dataset) validateRequiredFields() error {
}

// Verify required keys
err = requireField(allFields, "datastream.type", "constant_keyword", err)
err = requireField(allFields, "datastream.dataset", "constant_keyword", err)
err = requireField(allFields, "datastream.namespace", "constant_keyword", err)
err = requireField(allFields, "data_stream.type", "constant_keyword", err)
err = requireField(allFields, "data_stream.dataset", "constant_keyword", err)
err = requireField(allFields, "data_stream.namespace", "constant_keyword", err)
err = requireField(allFields, "@timestamp", "date", err)
return err
}
Expand Down

0 comments on commit 6e278bc

Please sign in to comment.