Skip to content

Support changing property types of port_blueprint #255

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

Merged
merged 8 commits into from
Jun 9, 2025

Conversation

Eyal-Shalev
Copy link
Contributor

Description

What - Support changing property types of port_blueprint
Why - Users expect to be able to change the property type.
How - Updated the old blueprint without the property to delete it before recreating it with the new type

Type of change

Please leave one option from the following and delete the rest:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Non-breaking change (fix of existing functionality that will not change current behavior)
  • Documentation (added/updated documentation)

Added a flag that represents our current protection against changing the property type.

When the flag is set to false, we delete the property before recreating it with the new type.
@Eyal-Shalev Eyal-Shalev self-assigned this Jun 5, 2025
Copy link

github-actions bot commented Jun 5, 2025

TestsPassed ✅SkippedFailedTime ⏱
JUnit Test Report170 ran170 ✅0 ⚠️0 ❌20m 52s 378ms
TestRetriesTime ⏱
JUnit Test Report
com/port-labs/terraform-provider-port-labs/v2/port/team.TestAccPortTeamEmptyDescription111s 290ms
com/port-labs/terraform-provider-port-labs/v2/port/team.TestAccPortTeam17s 230ms
com/port-labs/terraform-provider-port-labs/v2/port/team.TestAccPortTeamUpdate112s 720ms
com/port-labs/terraform-provider-port-labs/v2/port/team.TestAccPortTeamImport17s 770ms

Copy link

github-actions bot commented Jun 5, 2025

Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/15466912793/artifacts/3267640240

Code Coverage Total Percentage: 45.8%

Copy link

github-actions bot commented Jun 5, 2025

🚨 The new code coverage percentage is lower than the current one. Current coverage: 71.4
While the new one is: 45.8

Copy link

github-actions bot commented Jun 5, 2025

Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/15468097803/artifacts/3268128850

Code Coverage Total Percentage: 56.7%

Copy link

github-actions bot commented Jun 5, 2025

🚨 The new code coverage percentage is lower than the current one. Current coverage: 71.4
While the new one is: 56.7

Copy link

github-actions bot commented Jun 8, 2025

Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/15518448335/artifacts/3283582895

Code Coverage Total Percentage: 56.9%

Copy link

github-actions bot commented Jun 8, 2025

🚨 The new code coverage percentage is lower than the current one. Current coverage: 71.4
While the new one is: 56.9

Copy link

github-actions bot commented Jun 8, 2025

Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/15519703010/artifacts/3283847926

Code Coverage Total Percentage: 68.7%

Copy link

github-actions bot commented Jun 8, 2025

🚨 The new code coverage percentage is lower than the current one. Current coverage: 71.4
While the new one is: 68.7

SetResult(&pb).
Patch(url)
if err != nil && resp == nil {
return fmt.Errorf("failed to delete blueprint properties: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

why the message is delete properties for the patch action?

return fmt.Errorf("failed to delete blueprint properties, got: %s", resp.Body())
}

return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Why nil and not the returned blueprint?


func (c *PortClient) PatchBlueprint(ctx context.Context, b *Blueprint) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this used?

Copy link

github-actions bot commented Jun 9, 2025

Code Coverage Artifact 📈: https://github.com/port-labs/terraform-provider-port-labs/actions/runs/15530800218/artifacts/3286754264

Code Coverage Total Percentage: 75.3%

@Eyal-Shalev Eyal-Shalev merged commit ccdaa9e into main Jun 9, 2025
22 checks passed
@Eyal-Shalev Eyal-Shalev deleted the support-changing-property-type branch June 9, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants