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

removing --oss #1404

Merged
merged 8 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Thanks, you're awesome :-) -->

### Breaking Changes

* Removing deprecated --oss from generator #1404

### Schema Changes

#### Bugfixes
Expand Down
25 changes: 0 additions & 25 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ relevant artifacts for their unique set of data sources.
+ [Subset](#subset)
+ [Ref](#ref)
+ [Mapping & Template Settings](#mapping--template-settings)
+ [OSS (Deprecated)](#oss-deprecated)
+ [Strict Mode](#strict-mode)
+ [Intermediate-Only](#intermediate-only)

Expand Down Expand Up @@ -352,30 +351,6 @@ The `--template-settings` argument defines [index level settings](https://www.el

For `template.json`, the `mappings` object is left empty: `{}`. Likewise the `properties` object remains empty in the `mapping.json` example. This will be filled in automatically by the script.

#### OSS (Deprecated)

**Important**: This feature has been deprecated. An Apache 2.0 distribution of Elasticsearch will not be
produced starting with the 7.11 release. Learn more about these changes [here](https://www.elastic.co/pricing/faq/licensing).

Users that want to use an Apache 2.0 distribution of Elasticsearch do not have access to the basic data types.
However some of these types have an OSS replacement that can be used instead, without too much loss of functionality.

This flag performs a best effort fallback, replacing basic data types with their OSS replacement.

Indices using purely OSS types will benefit from the normalization of ECS, but may be missing on some of the added functionality of these basic types.

Current fallbacks applied by this flag are:

- `constant_keyword` => `keyword`
- `wildcard` => `keyword`
- `version` => `keyword`

Usage:

```
$ python scripts/generator.py --oss
```

#### Strict Mode

The `--strict` argument enables "strict mode". Strict mode performs a stricter validation step against the schema's contents.
Expand Down
4 changes: 0 additions & 4 deletions scripts/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from generators import intermediate_files

from schema import loader
from schema import oss
from schema import cleaner
from schema import finalizer
from schema import subset_filter
Expand Down Expand Up @@ -46,8 +45,6 @@ def main():
print('Experimental ECS version ' + ecs_generated_version)

fields = loader.load_schemas(ref=args.ref, included_files=args.include)
if args.oss:
oss.fallback(fields)
cleaner.clean(fields, strict=args.strict)
finalizer.finalize(fields)
fields = subset_filter.filter(fields, args.subset, out_dir)
Expand Down Expand Up @@ -80,7 +77,6 @@ def argument_parser():
help='index template settings to use when generating elasticsearch template')
parser.add_argument('--mapping-settings', action='store',
help='mapping settings to use when generating elasticsearch template')
parser.add_argument('--oss', action='store_true', help='replace basic data types with oss ones where possible')
parser.add_argument('--strict', action='store_true',
help='enforce strict checking at schema cleanup')
parser.add_argument('--intermediate-only', action='store_true',
Expand Down
8 changes: 7 additions & 1 deletion scripts/generators/es_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@

from generators import ecs_helpers
from schema.cleaner import field_or_multi_field_datatype_defaults
from schema.oss import TYPE_FALLBACKS


TYPE_FALLBACKS = {
'constant_keyword': 'keyword',
'wildcard': 'keyword',
'version': 'keyword'
}

# Composable Template


def generate(ecs_nested, ecs_version, out_dir, mapping_settings_file):
"""This generates all artifacts for the composable template approach"""
all_component_templates(ecs_nested, ecs_version, out_dir)
Expand Down
31 changes: 0 additions & 31 deletions scripts/schema/oss.py

This file was deleted.

44 changes: 0 additions & 44 deletions scripts/tests/unit/test_schema_oss.py

This file was deleted.