Skip to content

TPT-4534: Flaky smoke tests fixes#818

Merged
mawilk90 merged 9 commits into
linode:devfrom
mawilk90:hotfix/flaky_smoke_tests_fixes
Jul 2, 2026
Merged

TPT-4534: Flaky smoke tests fixes#818
mawilk90 merged 9 commits into
linode:devfrom
mawilk90:hotfix/flaky_smoke_tests_fixes

Conversation

@mawilk90

@mawilk90 mawilk90 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📝 Description

This PRs covers fixes for failing nightly smoke tests.

Additionally, following modules have been refactored:

  • plugins/modules/user.py - currently, grants cannot be retrieved for unrestricted users so "user_basic" playbook was failing on "Update the Linode User" task as it runs "_get_raw_grants" in the background. Decided to check if user is restricted first.
  • plugins/modules/database_mysql_v2.py , plugins/modules/database_postgresql_v2.py - currently available version of mysql engine is in X.Y format so it cannot be converted into integer and properly used as major_version. Decided to split it and use string type instead of int

✔️ How to Test

Tested with TPT test user

make test-int TEST_SUITE="instance_basic"
make test-int TEST_SUITE="object_basic"
make test-int TEST_SUITE="user_basic"
make test-int TEST_SUITE="vpc_basic"

make test-int TEST_SUITE="database_mysql_v2_basic"
make test-int TEST_SUITE="database_mysql_v2_complex"
make test-int TEST_SUITE="database_mysql_v2_vpc"
make test-int TEST_SUITE="database_mysql_v2_vpc_detach"

@mawilk90 mawilk90 added improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog. labels Jun 19, 2026
@mawilk90 mawilk90 marked this pull request as ready for review June 19, 2026 14:16
@mawilk90 mawilk90 requested review from a team as code owners June 19, 2026 14:16
@mawilk90 mawilk90 requested review from Copilot, ezilber-akamai, jbilskiAkam, lgarber-akamai and psnoch-akamai and removed request for a team and jbilskiAkam June 19, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses nightly smoke test flakiness by aligning integration test expectations with current API behavior and by making the user/database modules more tolerant of engine/version format and permission constraints.

Changes:

  • Update VPC and Object Storage integration tests to use consistent region variables and updated validation/error expectations.
  • Adjust MySQL integration tests to assert only the major engine version and remove unused variables from VPC-related MySQL tests.
  • Prevent user module from fetching grants for unrestricted users; update MySQL/PostgreSQL v2 modules to handle dotted engine versions when deriving the major version.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/integration/targets/vpc_basic/tasks/main.yaml Updates expected VPC invalid-label error message text.
tests/integration/targets/object_basic/tasks/main.yaml Introduces a region variable and scopes object keys to that region; updates assertions accordingly.
tests/integration/targets/database_mysql_v2_vpc/tasks/main.yaml Removes unused engine_version fact.
tests/integration/targets/database_mysql_v2_vpc_detach/tasks/main.yaml Removes unused engine_version fact.
tests/integration/targets/database_mysql_v2_complex/tasks/main.yaml Normalizes engine_version fact to major version for stable assertions.
tests/integration/targets/database_mysql_v2_basic/tasks/main.yaml Normalizes engine_version fact to major version for stable assertions.
plugins/modules/user.py Skips grants fetch for unrestricted users to avoid forbidden API calls.
plugins/modules/database_postgresql_v2.py Parses major version from dotted engine version strings during update.
plugins/modules/database_mysql_v2.py Parses major version from dotted engine version strings during update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ezilber-akamai ezilber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

database_mysql_v2_complex failed for me locally due to the allow_list assertion. This issue pops up all the time in Terraform too, maybe we just shouldn't assert on this field?

Other than that I got the typical 500s but not much we can do about that. Overall looks good!

@mawilk90

mawilk90 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

database_mysql_v2_complex failed for me locally due to the allow_list assertion. This issue pops up all the time in Terraform too, maybe we just shouldn't assert on this field?

Other than that I got the typical 500s but not much we can do about that. Overall looks good!

Hi @ezilber-akamai, it's a bit strange because I double checked it and I didn't face this issue. The only problem I had was incorrect db engine used for fork (playbook already updated)

@ezilber-akamai

Copy link
Copy Markdown
Contributor

database_mysql_v2_complex failed for me locally due to the allow_list assertion. This issue pops up all the time in Terraform too, maybe we just shouldn't assert on this field?
Other than that I got the typical 500s but not much we can do about that. Overall looks good!

Hi @ezilber-akamai, it's a bit strange because I double checked it and I didn't face this issue. The only problem I had was incorrect db engine used for fork (playbook already updated)

Maybe the differences we are seeing is due to different customer tags? Seems like a long shot but idk. Gotta love the inconsistency 😆

@psnoch-akamai psnoch-akamai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM and tests work with service account token

@psnoch-akamai

Copy link
Copy Markdown

database_mysql_v2_complex failed for me locally due to the allow_list assertion. This issue pops up all the time in Terraform too, maybe we just shouldn't assert on this field?
Other than that I got the typical 500s but not much we can do about that. Overall looks good!

Hi @ezilber-akamai, it's a bit strange because I double checked it and I didn't face this issue. The only problem I had was incorrect db engine used for fork (playbook already updated)

Maybe the differences we are seeing is due to different customer tags? Seems like a long shot but idk. Gotta love the inconsistency 😆

For me - it was working fine with service account. Do you use your own token?

@ezilber-akamai

Copy link
Copy Markdown
Contributor

database_mysql_v2_complex failed for me locally due to the allow_list assertion. This issue pops up all the time in Terraform too, maybe we just shouldn't assert on this field?
Other than that I got the typical 500s but not much we can do about that. Overall looks good!

Hi @ezilber-akamai, it's a bit strange because I double checked it and I didn't face this issue. The only problem I had was incorrect db engine used for fork (playbook already updated)

Maybe the differences we are seeing is due to different customer tags? Seems like a long shot but idk. Gotta love the inconsistency 😆

For me - it was working fine with service account. Do you use your own token?

Yeah I used my own token.

@mawilk90 mawilk90 merged commit 6866448 into linode:dev Jul 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants