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

Allow zero sized topology elements when autoscaling is enabled #472

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

tobio
Copy link
Member

@tobio tobio commented Apr 20, 2022

Related Issues

Fixes #471

Motivation and Context

Currently, managing the autoscaling limits on currently unsized topology elements results in an endless diff loop. The provider filters out all unsized topology elements when storing the resource state, meaning the defined topology elements are seen as new elements on a subsequent apply.

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

Marking this as a breaking change, since deployments which have autoscaling enabled will now include all topology elements in the resource state. This may require changes to existing resource declarations which were previously only defining a subset of possible topology elements.

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 added bug Something isn't working breaking change Breaking change which changes previous behavior in a non-compatible manner labels Apr 20, 2022
@tobio tobio requested a review from a team as a code owner April 20, 2022 01:15
@tobio tobio self-assigned this Apr 20, 2022
@tobio tobio force-pushed the allow-zero-sized-autoscaling-topologies branch from d6b95fc to ca8cbc1 Compare April 21, 2022 00:03
Copy link

@AlexP-Elastic AlexP-Elastic left a comment

Choose a reason for hiding this comment

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

LGTM, not super familiar with either how TF works or go, but I could read the logic and it made sense to me why it was wrong before and why it is now correct :)

@tobio tobio force-pushed the allow-zero-sized-autoscaling-topologies branch from ca8cbc1 to 1411f1c Compare April 26, 2022 01:11
@tobio tobio force-pushed the allow-zero-sized-autoscaling-topologies branch from 1411f1c to f71cf83 Compare April 26, 2022 01:24
@tobio tobio merged commit c46a6dd into master Apr 26, 2022
@tobio tobio deleted the allow-zero-sized-autoscaling-topologies branch April 26, 2022 03:17
tobio added a commit that referenced this pull request May 10, 2022
* Allow zero sized topology elements when autoscaling is enabled

* Fix acceptance test
tobio added a commit that referenced this pull request May 10, 2022
* Allow zero sized topology elements when autoscaling is enabled

* Fix acceptance test
tobio added a commit that referenced this pull request May 10, 2022
* feat: 429 add debug mode (#430)

* feat: 429 add debug mode

* clean up

* Add const comment

* fix: make build gcflags issue

* fix(deps): update module github.com/stretchr/testify to v1.7.1 (#456)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update actions/checkout action to v3 (#451)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* chore(deps): update endbug/add-and-commit action to v9 (#454)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update actions/setup-go action to v3 (#448)

Co-authored-by: Renovate Bot <[email protected]>

* fix(deps): update module github.com/go-openapi/runtime to v0.23.2 (#452)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* chore(deps): update actions/cache action to v3 (#458)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update peterjgrainger/action-create-branch action to v2.2.0 (#461)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update hashicorp/setup-terraform action to v2 (#470)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* Include a note in the import docs mentioning that the credentials will not be available. (#464)

* fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.11.0 (#453)

* fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.11.0

* Move debug mode to ServeOpts

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Toby Brain <[email protected]>

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* Allow zero sized topology elements when autoscaling is enabled (#472)

* Allow zero sized topology elements when autoscaling is enabled

* Fix acceptance test

* fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.14.0 (#475)

Co-authored-by: Renovate Bot <[email protected]>

* Provide a default for the autoscaling min/max resource (#477)

* Provide a default for the autoscaling min/max resource

This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template

* PR feedback

* fix(deps): update module github.com/elastic/cloud-sdk-go to v1.9.0 (#480)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* fix(deps): update module github.com/go-openapi/runtime to v0.24.0 (#457)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* Update CHANGELOG.md and NOTICE

* fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.15.0 (#481)

Co-authored-by: Renovate Bot <[email protected]>

* Update CHANGELOG.md and NOTICE

* Fixes arguments for add-and-commit (#479)

* Fixes arguments for add-and-commit 

These were changed in v8. https://github.com/EndBug/add-and-commit/blob/main/CHANGELOG.md#800---2022-01-20

* Change branch property on the minor bump.

* Fetch full repo history when checking out.

make minor inspects the current git tags before bumping. Without fetching those tags, the task fails.

* Add changelog

* Download the Terraform CLI for acceptance tests

This should be temporary, the automated download is currently failing due to an unexpected content-type on the response

Co-authored-by: luigibk <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: elasticcloudclients <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaking change which changes previous behavior in a non-compatible manner bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform provider does no handle unsized but enabled ML tiers
2 participants