Honor data stream dataset if provided#283
Merged
ycombinator merged 9 commits intoelastic:masterfrom Mar 9, 2021
Merged
Conversation
mtojek
approved these changes
Mar 9, 2021
Contributor
mtojek
left a comment
There was a problem hiding this comment.
Nothing blocking due the emergency nature of the PR.
internal/packages/packages.go
Outdated
| Name string `config:"name" json:"name" yaml:"name"` | ||
| Title string `config:"title" json:"title" yaml:"title"` | ||
| Type string `config:"type" json:"type" yaml:"type"` | ||
| Dataset string `config:"dataset" yaml:"dataset"` |
Contributor
Author
There was a problem hiding this comment.
LOL yes, moving too fast 🤦
internal/packages/assets.go
Outdated
| indexTemplateName := fmt.Sprintf("%s-%s.%s", dsManifest.Type, pkgManifest.Name, dsManifest.Name) | ||
| var indexTemplateName string | ||
| if dsManifest.Dataset == "" { | ||
| indexTemplateName = fmt.Sprintf("%s-%s.%s", dsManifest.Type, pkgManifest.Name, dsManifest.Name) |
Contributor
There was a problem hiding this comment.
nit: I wonder if it shouldn't be data stream manifest's method: dataStreamManifest.IndexTemplateName()
Contributor
Author
There was a problem hiding this comment.
Ah, good idea. I will make this change.
Collaborator
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
mtojek
approved these changes
Mar 9, 2021
Contributor
mtojek
left a comment
There was a problem hiding this comment.
If linter doesn't complain, feel free to merge this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in the asset test runner, related to Elasticsearch index template assets.
Prior to this PR, the asset test runner was assuming that Elasticsearch index templates installed by a package were always named
<package type>-<package name>.<data stream name>.However, a data stream may optionally define a
datasetin itsmanifest.yml. If this field is defined, the installed index template name becomes<package type>-<dataset>. This PR checks for the optionaldatasetfield and, if it exists, uses it to create the index template name.