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

Convert to YAML the ecs mappings static file #1093

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Jan 16, 2023

Relates #1018

Convert to YAML the file used as a static file to include the ECS mappings. Usually files used in packages are using YAML and moving to this format it will allow us to add comments to some dynamic template if needed for instance.

loadEcsMappings() function was using already yaml library to unmarshal the string:

func loadEcsMappings() (ecsTemplates, error) {
	var ecsMappings ecsTemplates
	err := yaml.Unmarshal([]byte(staticEcsMappings), &ecsMappings)
	if err != nil {
		return ecsMappings, err
	}
	return ecsMappings, nil
}

@mrodm mrodm self-assigned this Jan 16, 2023
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-16T11:25:05.772+0000

  • Duration: 34 min 48 sec

Test stats 🧪

Test Results
Failed 0
Passed 878
Skipped 0
Total 878

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Collaborator

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (35/35) 💚
Files 65.909% (87/132) 👍
Classes 61.376% (116/189) 👍
Methods 48.642% (394/810) 👍
Lines 31.707% (3555/11212) 👍
Conditionals 100.0% (0/0) 💚

@mrodm mrodm marked this pull request as ready for review January 16, 2023 12:31
@mrodm mrodm requested review from P1llus and a team January 16, 2023 12:31
@mrodm mrodm merged commit bbb1eeb into elastic:main Jan 16, 2023
@mrodm mrodm deleted the use_yaml_ecs_mappings_file branch January 16, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants