-
Notifications
You must be signed in to change notification settings - Fork 474
[apache_tomcat] - Migrate to package-spec v3 #8159
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
[apache_tomcat] - Migrate to package-spec v3 #8159
Conversation
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
@shmsr : Any specific reason why we are changing the spec for this package alone? |
Yep discussed it with Tom. This is just a sample PR where I change just one package and check first. Upcoming PRs will have bulk changes (probably 10-15 packages per PR so that it is easier to review; 48 packages in total). |
@@ -0,0 +1,3 @@ | |||
errors: | |||
exclude_checks: | |||
- SVR00004 # References in dashboards. |
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.
Can you point to the link which mentions the need of this with the latest package spec ?
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.
https://github.com/elastic/package-spec/blob/main/code/go/pkg/specerrors/constants.go
Set of rules that can be skipped if required. Also see: Filter errors
So after the v3 migration, elastic-package build (which also lints the package) needs to pass but it cannot pass if the checks fail. So there's a set of errors although not recommended to skip; can be skipped so that elastic-package build
succeeds with zero return code.
Example errors:
Error: building package failed: invalid content found in built zip package: found 3 validation errors:
1. references found in dashboard kibana/dashboard/apache_tomcat-44a8e0d0-b8f5-11ed-ac9b-cb6bcd97d223.json: apache_tomcat-d0957a70-eda4-11ed-909a-2baec7270d1f (search) (SVR00004)
2. references found in dashboard kibana/dashboard/apache_tomcat-8fd54a20-1f0d-11ee-9d6b-bb41d08322c8.json: apache_tomcat-1f3c6e30-dd11-11ed-9f4f-d97c9f37d195 (search), apache_tomcat-4d39c820-ddcd-1
1ed-8080-ddad81fe2c3c (search) (SVR00004)
3. references found in dashboard kibana/dashboard/apache_tomcat-9c66eb10-dd0c-11ed-9f4f-d97c9f37d195.json: apache_tomcat-1f3c6e30-dd11-11ed-9f4f-d97c9f37d195 (search), apache_tomcat-4d39c820-ddcd-1
1ed-8080-ddad81fe2c3c (search) (SVR00004)
Similar thing was done in this PR too.
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 is the general guidance here ? These errors are here because of not having the best practices followed. Should a backlog issue be created for such error overrides and must be relooked (similar to or as part of lens migration initiative)?
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.
Looks like this code is for Visualization by Value,
So does that mean it expexts the visualiztion to be some other way ?
Can we narrow down on these issues? before skipping them ?
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.
@ishleenk17 found some related issues that could help:
- Add warning/error for dashboards including visualizations by reference package-spec#389
- Warning when dashboard with visualisations by reference instead of value exist package-spec#316
- Value migration script: By value migration script kibana#129303
- Play with legacy_vis_analyzer elastic-package#791
Might have to use the value migration script to address this error.
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, the solution would be to migrate these visualizations by reference to be included by value. You can decide to delay this migration by adding this exclude rule.
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.
yep we should make sure we track all the work required to remove these skips. but we don't have to do it as part of the package spec v3 migration.
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.
@shmsr : Lets have a meta ticket for this effort. We can track all these skips being made as part of that ticket. So that all information can be obtained from one place.
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 meta issue is here #8028
What are the testing plans for this? |
🌐 Coverage report
|
@ishleenk17 as long as we validate there are no functional changes to the package via code review (the only changes here are formatting and package spec), then no additional testing is required. |
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.
Let's track the skips that we are making for these packages in a meta ticket.
Otherwise, looks good!
Package apache_tomcat - 0.14.0 containing this change is available at https://epr.elastic.co/search?package=apache_tomcat |
Following is an autogenerated response from ecs-update tool:
Here's how the PR was created:
(){}
):^ For this
https://github.com/elastic/ep-shell-plugins
can also be used but running these as a single zsh script is also easy. Like getting the package names using the following and then looping over them and running the aforementioned commands.packages
dir):validation.yml
Proposed commit message
The format_version in the package manifest changed from 2.3.0 to 3.0.0.
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots