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

Support deployments without autoscaling fields defined in the deployments data source #667

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

tobio
Copy link
Member

@tobio tobio commented Jun 17, 2023

Description

When no autoscaling fields are defined, the autoscaling property on the model will be nil (with nil ElemType), causing the provider to crash. This PR sets the initial value to a NullList with the correct ElemTypes set.

Related Issues

Fixes #649

Motivation and Context

How Has This Been Tested?

Manually, added an acceptance test.

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 review from webfella and dimuon June 17, 2023 11:27
@tobio tobio self-assigned this Jun 17, 2023
@tobio tobio requested a review from a team as a code owner June 17, 2023 11:27
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

@tobio tobio merged commit e9df5df into elastic:master Jun 27, 2023
@tobio tobio deleted the import-without-autoscaling branch June 27, 2023 01:19
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.

Cannot use deployment data source when autoscaling is not defined.
2 participants