Skip to content
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

Bugfix: node-types-validation should handle empty stack version. #820

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

gigerdo
Copy link
Member

@gigerdo gigerdo commented Jun 18, 2024

Fixes an error in the validation when using legacy node-type configs.

If the version is unset, the validation crashes with an error. This can happen in certain scenarios: When using a reference (e.g. data.ec_stack.latest.version) it will not be resolved in a first phase when this validation is called. In such cases the validation should be skipped.

The validation still works as it is called again after the reading phase when the field has been resolved.

Related Issues

#734

Motivation and Context

How Has This Been Tested?

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improves code quality but has no user-facing effect)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Readiness Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@gigerdo gigerdo requested a review from a team as a code owner June 18, 2024 14:31
If the version is unset, the validation crashes with an error. This can happen in certain scenarios:
When using a reference (e.g. `data.ec_stack.latest.version`) it will not be resolved in a first phase when this validation is called. In such cases the validation should be skipped.

The validation still works as it is called again after the reading phase when the field has been resolved.
Copy link
Contributor

@dimuon dimuon left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@gigerdo gigerdo merged commit 7e28c3d into elastic:master Jun 19, 2024
3 checks passed
@gigerdo gigerdo deleted the fix-nodetypes-failure branch June 19, 2024 09:56
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.

2 participants