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

Validate node_roles and node_types are supported in the version used #683

Merged
merged 3 commits into from
Aug 12, 2023

Conversation

tobio
Copy link
Member

@tobio tobio commented Aug 6, 2023

Description

Applying incompatible changes without this validation leads to confusing, esoteric errors (detailed in #663). This PR instead aims to provide a clearer error for end users.

Related Issues

Fixes #663

Motivation and Context

How Has This Been Tested?

Unit tests, manually.

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

@tobio tobio requested a review from dimuon August 6, 2023 23:14
@tobio tobio self-assigned this Aug 6, 2023
@tobio tobio requested a review from a team as a code owner August 6, 2023 23:14
return
}

resp.Diagnostics.AddAttributeError(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to add err to resp.Diagnostics?

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.

👍 Very readable code

@tobio tobio merged commit 2207c7e into elastic:master Aug 12, 2023
@tobio tobio deleted the version-validation branch August 12, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants