Skip to content
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

refactor: migrate resource and datasource equinix_metal_project to framework #604

Merged
merged 25 commits into from
Mar 20, 2024

Conversation

ocobles
Copy link
Contributor

@ocobles ocobles commented Mar 1, 2024

Part of #612

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 65.02836% with 185 lines in your changes are missing coverage. Please review.

Project coverage is 61.29%. Comparing base (e86dd8a) to head (30e64cc).

Files Patch % Lines
internal/resources/metal/project/resource.go 51.68% 68 Missing and 18 partials ⚠️
internal/resources/metal/project/datasource.go 40.74% 27 Missing and 5 partials ⚠️
internal/resources/metal/project/bgp_config.go 51.56% 27 Missing and 4 partials ⚠️
internal/planmodifiers/immutable_list.go 21.73% 16 Missing and 2 partials ⚠️
internal/resources/metal/project/models.go 83.33% 8 Missing and 3 partials ⚠️
internal/planmodifiers/immutable_int64.go 72.00% 6 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #604       +/-   ##
===========================================
+ Coverage   39.04%   61.29%   +22.25%     
===========================================
  Files         114      120        +6     
  Lines       19186    19393      +207     
===========================================
+ Hits         7491    11887     +4396     
+ Misses      11489     6923     -4566     
- Partials      206      583      +377     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ocobleseqx and others added 18 commits March 20, 2024 09:05
Signed-off-by: ocobleseqx <[email protected]>
Co-authored-by: Charles Treatman <[email protected]>
Signed-off-by: Óscar Cobles <[email protected]>
@ctreatma
Copy link
Contributor

The BGP update test was still failing because the project was being deleted and recreated. After some digging I found it was because organization_id was Computed with planmodifier.RequiresReplace() but was not configured with planmodifier.UseStateForUnknown(). As a result, the framework always set organization_id to unknown on plan, which marked the resource for replacement.

I updated the schema to add the missing plan modifier and updated the error message in the immutable list to match the existing test expectation: 30e64cc

@ctreatma ctreatma requested a deployment to internal March 20, 2024 16:07 — with GitHub Actions Abandoned
Copy link
Contributor

@ctreatma ctreatma left a comment

Choose a reason for hiding this comment

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

Ran CI twice and observed no failures in project resource / datasource tests and a couple flakes in unrelated tests.

@ctreatma ctreatma merged commit 42737f8 into main Mar 20, 2024
6 of 9 checks passed
@ctreatma ctreatma deleted the framework-migr-metal-project branch March 20, 2024 17:00
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.

4 participants