-
Notifications
You must be signed in to change notification settings - Fork 387
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
Migrate obs-infraobs-integrations to package-spec v3 #1 #8170
Migrate obs-infraobs-integrations to package-spec v3 #1 #8170
Conversation
Here are some rough notes I recorded while migrating. I have fixed a few and accordingly improved my script. But there are 3 packages that couldn't be migrated.
|
🌐 Coverage report
|
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/activemq
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/apache_spark
The format_version in the package manifest changed from 2.3.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/apache_tomcat
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/cassandra
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/couchdb
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/airflow
The format_version in the package manifest changed from 2.5.1 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/azure_functions
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/ceph
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/cockroachdb
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/coredns
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/couchbase
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removed dotted YAML keys from package manifest. Added 'owner.type: elastic' to package manifest. [git-generate] go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -skip-format -fix-dotted-yaml-keys -add-owner-type packages/etcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -57,33 +57,6 @@ | |||
- name: image.id | |||
type: keyword | |||
description: Image ID for the cloud instance. | |||
- name: container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these mappings redundant and why these got removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If you check packages/cockroachdb/data_stream/status/fields/ecs.yml
you'd find the same fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all LGTM - just one outstanding change (nested
) and this looks ready to merge. thanks!!
…hanged by ep format" This reverts commit 5ca725b.
@lalit-satapathy / @ishleenk17 PR requires an approval. If there are any further review comments, please let me know. I'll resolve them and merge this PR. |
fields: | ||
- name: count | ||
type: long | ||
description: Total number of Placement Groups (pgs) in cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was happeing to these fields before the individual mapping ?
What did the mapping look like ?
Also, under this group, are these the only sub fields that are there since we didn't have that clarity when type was object ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before, the mapping just looks like this:
"state": {
"type": "object"
},
which does nothing at all. the fields are mapped using default types, which are long
and keyword
respectively. so there's no behviour change here. it's just more explicit and intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the object is well defined in beats. i'm not sure why we never expclicity mapped them before.
type PgState struct {
Count int64 `json:"count"`
StateName string `json:"state_name"`
}
@@ -14,5 +14,7 @@ | |||
external: ecs | |||
- name: container.image.name | |||
external: ecs | |||
- name: container.labels | |||
external: ecs | |||
- name: host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tommyers-elastic , @andrewkroh - The host
group ECS field reference is included in some integrations and some integrations doesn't include the ECS reference. As the host field
is common, Is it worth adding validations for this field as well? Just a thought.
e.g. Integration not having host
group field reference.
Package activemq - 0.14.0 containing this change is available at https://epr.elastic.co/search?package=activemq |
Package airflow - 0.5.0 containing this change is available at https://epr.elastic.co/search?package=airflow |
Package apache_spark - 0.8.0 containing this change is available at https://epr.elastic.co/search?package=apache_spark |
Package azure_functions - 0.2.0 containing this change is available at https://epr.elastic.co/search?package=azure_functions |
Package cassandra - 1.10.0 containing this change is available at https://epr.elastic.co/search?package=cassandra |
Package ceph - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=ceph |
Package cockroachdb - 1.7.0 containing this change is available at https://epr.elastic.co/search?package=cockroachdb |
Package coredns - 0.6.0 containing this change is available at https://epr.elastic.co/search?package=coredns |
Package couchbase - 1.4.0 containing this change is available at https://epr.elastic.co/search?package=couchbase |
Package couchdb - 1.1.0 containing this change is available at https://epr.elastic.co/search?package=couchdb |
Package etcd - 0.6.0 containing this change is available at https://epr.elastic.co/search?package=etcd |
Migrate a batch of packages from v1/v2 to v3 package-spec. Used the following scripts and some manual changes to generate the changes in this PR:
yq_hack.zsh
ecs-update.zsh
And another Go program to write the validation.yml by parsing the elastic-package lint errors.
Then I hooked this scripts to run with:
Another variation of the above script:
As I am creating a batch of 15 packages per migration, I am using a for loop. In case the migration is not possible for some packages, I put it in the first case to skip them.
Proposed commit message
Migrate packages owned by obs-infraobs-integrations but few couldn't be migrated. Marking them as follows:
Please see the comment #8170 (comment) in this PR itself to understand why some packages couldn't be migrated and also learn about the challenges faced when migrating.
Checklist
changelog.yml
file.