Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate obs-infraobs-integrations to package-spec v3 #3#8203

Merged
tommyers-elastic merged 50 commits intoelastic:mainfrom
shmsr:migrate-infraobs-ps-v3-batch-3-serverless
Oct 25, 2023
Merged

Migrate obs-infraobs-integrations to package-spec v3 #3#8203
tommyers-elastic merged 50 commits intoelastic:mainfrom
shmsr:migrate-infraobs-ps-v3-batch-3-serverless

Conversation

@shmsr
Copy link
Member

@shmsrshmsr commentedOct 15, 2023
edited
Loading

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

#!/bin/bashset -eset -uset -o pipefailset -xpushd $1find data_stream -type f -path "*fields*" -name "*.yml" -exec yq e -i "del .[].release" {} \;find data_stream -type f -path "*fields*" -name "ecs.yml" -exec yq e -i "unique_by(.name)" {} \;find data_stream -type f -path "*fields*" -name "*.yml" -exec yq e -i "del .[].fields.[].required" {} \;yq e -i 'del .release' manifest.ymlyq e -i "with(select(.license != null); .conditions.elastic.subscription = .license) | del .license" manifest.ymlpopdgit add -u $1/git commit -m "[$1]: migration with yq"

ecs-update.zsh

#!/bin/bashset -uset -o pipefailset -xecho "-- executing ecs-update for $1 --"ecs-update -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type -owner elastic/obs-infraobs-integrations -v -skip-format=true $1if (( $? )) then    echo "-- write validation for $1 --"    pushd $1    go run ../scripting/write_validation.go    popd    # Try again?    git checkout .    ecs-update -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type -owner elastic/obs-infraobs-integrations -v -skip-format=true $1fi

And another Go program to write the validation.yml by parsing the elastic-package lint errors.

Then I hooked this scripts to run with:

$ pkgs=($(cat .github/CODEOWNERS| grep'@elastic/obs-infraobs-integrations'| cut -d'' -f 1| cut -d'/' -f 3| sort| uniq))$for((idx=16; idx<=30; idx++))doscripting/yq_hack.zsh$pkgs[idx]done
$for((idx=16; idx<=30; idx++))doscripting/ecs_update.zsh$pkgs[idx]||breakdone

Another variation of the above script:

$for((idx=31; idx<=48; idx++))docase$pkgs[idx]in"tomcat" |"salesforce" |"redis")echo"-- skip$pkgs[idx] --";;"websphere_application_server" |"system" |"statsd_input" |"sql_input" |"springboot" |"rabbitmq" |"postgresql" |"prometheus_input" |"oracle_weblogic" |"php_fpm" |"oracle")echo"-- done$pkgs[idx] --";;*) scripting/ecs_update.zsh$pkgs[idx]||break;;esacdone

As I am creating a batch of 18 packages here, 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:

  • oracle
  • oracle_weblogic
  • php_fpm
  • postgresql
  • prometheus_input
  • rabbitmq
  • redis
  • redisenterprise
  • salesforce
  • spring_boot
  • sql_input
  • statsd_input
  • system
  • tomcat
  • traefik
  • vsphere
  • websphere_application_server
  • zookeeper

Please see the comment#8203 (comment) in this PR itself to understand why some packages couldn't be migrated and also learn about the challenges faced when migrating.

Checklist

  • I have reviewedtips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package'schangelog.yml file.
  • I have verified that Kibana version constraints are current according toguidelines.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Relates to#8170
Relates to#8171

Screenshots

The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[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/oracle
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/oracle_weblogic
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/php_fpm
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/postgresql
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/prometheus_input
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/rabbitmq
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/redisenterprise
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/spring_boot
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/sql_input
The format_version in the package manifest changed from 2.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/statsd_input
The format_version in the package manifest changed from 1.0.0 to 3.0.0. 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 -fix-dotted-yaml-keys -add-owner-type packages/system
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/traefik
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/vsphere
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/websphere_application_server
The format_version in the package manifest changed from 1.0.0 to 3.0.0. Removeddotted YAML keys from package manifest. Added 'owner.type: elastic' to packagemanifest.[git-generate]go run github.com/andrewkroh/go-examples/ecs-update@latest -v -format-version=3.0.0 -fix-dotted-yaml-keys -add-owner-type packages/zookeeper
@shmsr
Copy link
MemberAuthor

Pulling outstatsd_input andsql_input because of the mapping-related ambiguities. Need to discuss the mappings in more detail and then commit the changes for both packages.

@tommyers-elastictommyers-elastic merged commitda0fc7a intoelastic:mainOct 25, 2023
@shmsrshmsr deleted the migrate-infraobs-ps-v3-batch-3-serverless branchOctober 25, 2023 10:08
@elasticmachine
Copy link

Package oracle - 1.22.0 containing this change is available athttps://epr.elastic.co/search?package=oracle

@elasticmachine
Copy link

Package oracle_weblogic - 1.3.0 containing this change is available athttps://epr.elastic.co/search?package=oracle_weblogic

@elasticmachine
Copy link

Package php_fpm - 1.1.0 containing this change is available athttps://epr.elastic.co/search?package=php_fpm

@elasticmachine
Copy link

Package postgresql - 1.17.0 containing this change is available athttps://epr.elastic.co/search?package=postgresql

@elasticmachine
Copy link

Package prometheus_input - 0.2.0 containing this change is available athttps://epr.elastic.co/search?package=prometheus_input

@elasticmachine
Copy link

Package rabbitmq - 1.11.0 containing this change is available athttps://epr.elastic.co/search?package=rabbitmq

@elasticmachine
Copy link

Package redisenterprise - 0.6.0 containing this change is available athttps://epr.elastic.co/search?package=redisenterprise

@elasticmachine
Copy link

Package spring_boot - 0.13.0 containing this change is available athttps://epr.elastic.co/search?package=spring_boot

@elasticmachine
Copy link

Package traefik - 1.11.0 containing this change is available athttps://epr.elastic.co/search?package=traefik

@elasticmachine
Copy link

Package vsphere - 1.9.0 containing this change is available athttps://epr.elastic.co/search?package=vsphere

@elasticmachine
Copy link

Package websphere_application_server - 1.1.0 containing this change is available athttps://epr.elastic.co/search?package=websphere_application_server

@elasticmachine
Copy link

Package zookeeper - 1.10.0 containing this change is available athttps://epr.elastic.co/search?package=zookeeper

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@muthu-mpsmuthu-mpsmuthu-mps left review comments

@ishleenk17ishleenk17ishleenk17 left review comments

@tommyers-elastictommyers-elastictommyers-elastic approved these changes

+1 more reviewer

@ali786XIali786XIali786XI left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@shmsrshmsr

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@shmsr@elasticmachine@muthu-mps@ishleenk17@tommyers-elastic@ali786XI@andrewkroh

Comments


[8]ページ先頭

©2009-2026 Movatter.jp