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

Use the lowest version from a running resource, not just the lowest #623

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

tobio
Copy link
Member

@tobio tobio commented Apr 17, 2023

Description

Updates the deployment version determination to filter out stopped resources. The API returns the current plan for resources which have at some point been running, which should not be considered when finding the lowest version.

Related Issues

Fixes #614

How Has This Been Tested?

Updated an existing acceptance test to cover this scenario

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 April 17, 2023 11:29
@tobio tobio requested a review from a team as a code owner April 17, 2023 11:29
@tobio tobio self-assigned this Apr 17, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

@tobio , I suppose this test should fail without the fix (without the fix it should output Error: Provider produced inconsistent result after apply complaining about the version), correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep

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

@dimuon
Copy link
Contributor

dimuon commented Apr 18, 2023

@tobio , I think both unit and integration tests fail due to changes in core terraform, so if we use an older terraform cli (something like 1.3.9). the tests should pass. Anyway we need to address the issue ASAP but I believe we have also to move to the latest Framework version to handle that correctly.

@tobio
Copy link
Member Author

tobio commented Apr 18, 2023

Yep, I fixed the TF version in #624 to 1.3.9

@tobio tobio merged commit d2a0f34 into elastic:master Apr 18, 2023
@tobio tobio mentioned this pull request May 2, 2023
4 tasks
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.

Imported ec_deployment resource displays incorrect version
2 participants