Skip to content

Conversation

@lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Nov 8, 2025

📝 Description

This pull request resolves an issue that prevents the pending_updates field from being properly populated. This is an extension of the fix from #2162.

Additionally, this pull request consolidates shared database schema and model logic into a database_shared helper package, which significantly reduces code redundancy.

Depends on #2165

✔️ How to Test

The following test steps assume you have pulled down this PR locally.

Integration Testing

parallel -j 4 make test-int PKG_NAME={} ::: databasepostgresqlv2 databasemysqlv2 databases

Manual Testing

TODO

@lgarber-akamai lgarber-akamai requested a review from a team as a code owner November 8, 2025 02:57
@lgarber-akamai lgarber-akamai added improvement for improvements in existing functionality in the changelog. bugfix for any bug fixes in the changelog. labels Nov 8, 2025
@lgarber-akamai lgarber-akamai requested review from ezilber-akamai and yec-akamai and removed request for a team, ezilber-akamai and yec-akamai November 8, 2025 02:57
@lgarber-akamai lgarber-akamai marked this pull request as draft November 8, 2025 02:57
@lgarber-akamai lgarber-akamai changed the base branch from main to dev November 8, 2025 02:58
@lgarber-akamai lgarber-akamai changed the title Fix/database pending updates set Resolve database pending_updates duplicates bug; refactor database schema & model sharing Nov 8, 2025
Copy link
Contributor

Copilot AI left a comment

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 resolves a bug where duplicate entries appeared in the pending_updates field of managed database resources and refactors the database-related code by centralizing shared functionality into a new databaseshared package.

  • Implements deduplication logic for pending updates using a new FrameworkDropDuplicatesIter helper function
  • Extracts common database models, schema attributes, and utility functions into a shared linode/helper/databaseshared package
  • Adds comprehensive test coverage with HTTP client modification support to verify the deduplication fix

Reviewed Changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
linode/helper/http.go Adds HTTPClientModifier type definition for modifying HTTP clients
linode/helper/framework_util.go Adds FrameworkDropDuplicatesIter function for deduplicating iterator values
linode/helper/databaseshared/*.go New package containing shared database models, schemas, and utilities extracted from individual database modules
linode/helper/database.go Removed (functionality moved to databaseshared package)
linode/framework_provider_config.go Adds support for applying HTTP client modifiers during client initialization
linode/databases/*.go Updates to use shared database models from databaseshared package
linode/database*/*.go Refactored to use shared functionality from databaseshared package instead of duplicated code
linode/acceptance/*.go Adds test infrastructure for HTTP response overrides and database-specific test helpers

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

@lgarber-akamai lgarber-akamai force-pushed the fix/database-pending-updates-set branch from bf00427 to dbd49c2 Compare November 10, 2025 17:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lgarber-akamai lgarber-akamai added the do-not-merge PRs that should not be merged until the commented issue is resolved label Nov 10, 2025
@lgarber-akamai lgarber-akamai force-pushed the fix/database-pending-updates-set branch from 35faf37 to fb585e1 Compare November 14, 2025 15:32
@lgarber-akamai lgarber-akamai removed the do-not-merge PRs that should not be merged until the commented issue is resolved label Nov 14, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review November 14, 2025 15:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.


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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lgarber-akamai lgarber-akamai requested review from a team and vshanthe and removed request for a team November 14, 2025 15:43
@lgarber-akamai lgarber-akamai requested review from a team, Copilot, ezilber-akamai, yec-akamai and zliang-akamai and removed request for a team November 14, 2025 15:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.


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

Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

This is much cleaner! Tests passed locally

@lgarber-akamai lgarber-akamai merged commit 04d79a3 into linode:dev Nov 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix for any bug fixes in the changelog. improvement for improvements in existing functionality in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants