Skip to content

Validate that custom ilm_policies are defined in the package#413

Merged
jsoriano merged 5 commits intoelastic:mainfrom
jsoriano:check-ilm-policy
Sep 14, 2022
Merged

Validate that custom ilm_policies are defined in the package#413
jsoriano merged 5 commits intoelastic:mainfrom
jsoriano:check-ilm-policy

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Sep 13, 2022

Data streams can have custom ILM policies since #90, but nothing is checking that these policies actually exist.

This new validation checks that the ILM policy is defined in the same data stream where it is used, what helps to have self-contained packages, and is coherent with the current use of this feature in existing packages.

Fixes #92.

@jsoriano jsoriano requested a review from kevinlog September 13, 2022 09:19
@jsoriano jsoriano self-assigned this Sep 13, 2022
@jsoriano jsoriano requested a review from a team as a code owner September 13, 2022 09:19
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Sep 13, 2022

💚 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: 2022-09-14T09:59:38.255+0000

  • Duration: 7 min 11 sec

Test stats 🧪

Test Results
Failed 0
Passed 626
Skipped 0
Total 626

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Sep 13, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (7/7) 💚
Files 68.0% (17/25) 👎 -2.833
Classes 76.471% (26/34) 👎 -2.317
Methods 56.075% (60/107) 👎 -2.749
Lines 42.184% (537/1273) 👎 -2.409
Conditionals 100.0% (0/0) 💚

@jsoriano
Copy link
Copy Markdown
Member Author

Migration docs added in elastic/elastic-package#977.

mrodm
mrodm previously approved these changes Sep 13, 2022
Copy link
Copy Markdown
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Added some non-blocking comments

Comment thread test/packages/bad_custom_ilm_policy/docs/README.md Outdated
Comment thread test/packages/custom_ilm_policy/changelog.yml Outdated
Comment thread code/go/internal/validator/semantic/validate_ilmpolicypresent.go Outdated
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.

Add field validation for ilm_policy field in package spec.

3 participants