Skip to content

fix stale IGM cache in node pool - #18454

Open
c2thorn wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
c2thorn:fix-gke-node-pool-igm-cache-invalidation
Open

fix stale IGM cache in node pool#18454
c2thorn wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
c2thorn:fix-gke-node-pool-igm-cache-invalidation

Conversation

@c2thorn

@c2thorn c2thorn commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes hashicorp/terraform-provider-google#27966
Splits #18397

This PR fixes a bug where stale Instance Group Manager target sizes were served from the client-side provider cache after GKE node count updates or when ignore_node_count_changes was active.

To solve stale IGM target sizes, this PR:

  1. Adds an invalidateItem(igmUrl) method to instanceGroupManagerCache to allow removing specific IGM entries.
  2. Calls the invalidation inside flattenNodePool when ignore_node_count_changes is active, as the cache isn't needed if we are ignoring the count.
  3. Calls invalidation in nodePoolUpdate after a size update, ensuring subsequent reads fetch fresh GCE API data.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

container: fixed a bug where `google_container_node_pool` and `google_container_cluster` failed to invalidate their Instance Group Manager cache when a resize occurred or when `ignore_node_count_changes` was active

…izing or ignore_node_count_changes is active

Fixes hashicorp/terraform-provider-google#27966

This PR fixes a bug where google_container_node_pool and google_container_cluster failed to invalidate their Instance Group Manager cache when a resize occurred or when ignore_node_count_changes was active.

```release-note:bug
container: fixed a bug where `google_container_node_pool` and `google_container_cluster` failed to invalidate their Instance Group Manager cache when a resize occurred or when `ignore_node_count_changes` was active
```
@modular-magician

modular-magician commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit f16989d:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 19 insertions(+)
google-beta provider View Diff 1 file changed, 19 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
320 304 15 1
Affected Service Packages
  • container

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccContainerCluster_regionalWithNodePool

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccContainerCluster_regionalWithNodePool

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@c2thorn VCR tests complete for f16989d!

@c2thorn

c2thorn commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

TestAccContainerCluster_regionalWithNodePool will pass after #18453 is merged

@c2thorn
c2thorn requested a review from rileykarson July 29, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing test(s): TestAccContainerNodePool_ignoreNodeCountChanges

3 participants