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

Add support for multifields added by ecs@mappings #2035

Merged
merged 9 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix tests
jsoriano committed Aug 23, 2024
commit 19eb6d00eb067ed3171a9088b38670cd96fda9a8
10 changes: 6 additions & 4 deletions internal/fields/validate.go
Original file line number Diff line number Diff line change
@@ -321,10 +321,12 @@ func initDependencyManagement(packageRoot string, specVersion semver.Version, im
return nil, nil, err
}
logger.Debugf("Imported ECS fields definition from external schema for validation (embedded in package: %v, stack uses ecs@mappings template: %v)", packageEmbedsEcsMappings, stackSupportsEcsMapping)
if stackSupportsEcsMapping {
// ecs@mappings adds additional multifields that are not defined anywhere. Add them here to the expected mappings.
ecsSchema = appendECSMappingMultifields(ecsSchema, "")
}

// ecs@mappings adds additional multifields that are not defined anywhere. Add them here to the expected mappings.
// Adding them also in cases where stackSupportsEcsMapping is false so these packages can be tested with versions
// of the stack that support ecs@mappings.
ecsSchema = appendECSMappingMultifields(ecsSchema, "")

schema = ecsSchema
}

1 change: 1 addition & 0 deletions test/packages/parallel/ti_anomali.stack_provider_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stack.logsdb_enabled=false