Skip to content

Conversation

@rmvangun
Copy link
Contributor

Sets up the new Feature type, which behaves as a trimmed down conditional fragment of a blueprint.

Sets up the new Feature type, which behaves as a trimmed down conditional fragment of a blueprint.
@rmvangun rmvangun added the chore label Sep 18, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

terraformComponentsCopy := make([]ConditionalTerraformComponent, len(f.TerraformComponents))
for i, component := range f.TerraformComponents {
valuesCopy := make(map[string]any, len(component.Values))
maps.Copy(valuesCopy, component.Values)
Copy link

Choose a reason for hiding this comment

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

Bug: Deep Copy Methods Fail for Mutable Map Values

The DeepCopy methods for Feature and ConditionalTerraformComponent use maps.Copy() for the Values map. This performs a shallow copy, meaning if Values contains mutable types like slices or nested maps, the original and copy will share references. Modifying these shared values in one object will unexpectedly affect the other, violating deep copy behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

@rmvangun rmvangun merged commit 60e28fb into main Sep 18, 2025
13 of 14 checks passed
@rmvangun rmvangun deleted the feature/blueprint-features-type branch September 18, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants