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

avoid string slice panic in version check #23039

Merged
merged 5 commits into from
Feb 11, 2022
Merged

avoid string slice panic in version check #23039

merged 5 commits into from
Feb 11, 2022

Conversation

brenthc
Copy link
Contributor

@brenthc brenthc commented Feb 8, 2022

See internal task referencing this PR.

Closes #22542.
Closes #20860.

Unit tests

% go test -v ./internal/service/rds '-run=TestCompareActualEngineVersion'
=== RUN   TestCompareActualEngineVersion
=== PAUSE TestCompareActualEngineVersion
=== CONT  TestCompareActualEngineVersion
=== RUN   TestCompareActualEngineVersion/point_version_upgrade
=== RUN   TestCompareActualEngineVersion/minor_version_upgrade
=== RUN   TestCompareActualEngineVersion/major_version_upgrade
=== RUN   TestCompareActualEngineVersion/aurora_upgrade
=== RUN   TestCompareActualEngineVersion/aurora_upgrade_-_used_to_crash
=== RUN   TestCompareActualEngineVersion/oracle
=== RUN   TestCompareActualEngineVersion/oracle_-_used_to_crash
--- PASS: TestCompareActualEngineVersion (0.00s)
    --- PASS: TestCompareActualEngineVersion/point_version_upgrade (0.00s)
    --- PASS: TestCompareActualEngineVersion/minor_version_upgrade (0.00s)
    --- PASS: TestCompareActualEngineVersion/major_version_upgrade (0.00s)
    --- PASS: TestCompareActualEngineVersion/aurora_upgrade (0.00s)
    --- PASS: TestCompareActualEngineVersion/aurora_upgrade_-_used_to_crash (0.00s)
    --- PASS: TestCompareActualEngineVersion/oracle (0.00s)
    --- PASS: TestCompareActualEngineVersion/oracle_-_used_to_crash (0.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	3.998s

Acceptance tests

% make testacc TESTARGS='-run=TestAccRDSCluster_allowMajorVersionUpgrade\|TestAccRDSCluster_basic' PKG=rds          
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSCluster_allowMajorVersionUpgrade\|TestAccRDSCluster_basic -timeout 180m
=== RUN   TestAccRDSCluster_basic
=== PAUSE TestAccRDSCluster_basic
=== RUN   TestAccRDSCluster_allowMajorVersionUpgrade
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgrade
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== CONT  TestAccRDSCluster_basic
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== CONT  TestAccRDSCluster_allowMajorVersionUpgrade
--- PASS: TestAccRDSCluster_basic (128.37s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgrade (1318.20s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm (1896.45s)
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters (1985.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	1988.948s

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. labels Feb 8, 2022
@ewbankkit ewbankkit requested review from ewbankkit and removed request for ewbankkit February 10, 2022 21:55
@ewbankkit ewbankkit self-assigned this Feb 10, 2022
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 10, 2022
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/XS Managed by automation to categorize the size of a PR. labels Feb 11, 2022
@ewbankkit
Copy link
Contributor

Needs backporting to release/3.x.

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

@ewbankkit
Copy link
Contributor

@brenthc Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9b116b1 into hashicorp:main Feb 11, 2022
@github-actions github-actions bot added this to the v4.1.0 milestone Feb 11, 2022
ewbankkit added a commit that referenced this pull request Feb 11, 2022
@github-actions
Copy link

This functionality has been released in v4.1.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/rds Issues and PRs that pertain to the rds service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: The terraform-provider-aws_v3.71.0_x5 plugin crashed! RDS engine version comparison causes panic
2 participants