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

fix(domain): workspace assignments should only care about managed resources #182

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

DariuszPorowski
Copy link
Member

@DariuszPorowski DariuszPorowski commented Jan 6, 2025

📥 Pull Request

❓ What are you trying to address

  • Currently domain_workspace_assignments resource enforce assignments based only on TF configuration. It means if someone adds more resources manually on the Fabric side, the next run of TF will remove it. Expected behavior: Resource must only manage TF provided configuration.

This fix is related (not directly) to #174 and potentially to #183

Copy link

github-actions bot commented Jan 6, 2025

Changelog Preview

v0.1.0-dev - January 10, 2025

✨ Added

  • #135 Definition support in the fabric_eventhouse Resource
  • #156 Definition support in the fabric_eventhouse Data-Sources

🪲 Fixed

  • #174 Provider produced inconsistent result after apply error appears when using fabric_domain_workspace_assignments multiple times due to enforce assignments based only on TF configuration and ignoring the real state on the Fabric side.
    Resource must only manage TF provided configuration and ignore any configuration provided outside TF.

Copy link

github-actions bot commented Jan 6, 2025

Code Coverage

Package Line Rate Complexity Health
github.com/microsoft/terraform-provider-fabric/internal/auth 74% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes 75% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/planmodifiers 62% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/typeutils 63% 0
github.com/microsoft/terraform-provider-fabric/internal/functions 72% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem 72% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/transforms 62% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/utils 84% 0
github.com/microsoft/terraform-provider-fabric/internal/provider 86% 0
github.com/microsoft/terraform-provider-fabric/internal/provider/config 100% 0
github.com/microsoft/terraform-provider-fabric/internal/provider/utils 70% 0
github.com/microsoft/terraform-provider-fabric/internal/services/capacity 87% 0
github.com/microsoft/terraform-provider-fabric/internal/services/dashboard 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/datamart 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/datapipeline 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/domain 40% 0
github.com/microsoft/terraform-provider-fabric/internal/services/environment 87% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventhouse 92% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventstream 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/kqldatabase 82% 0
github.com/microsoft/terraform-provider-fabric/internal/services/kqlqueryset 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/lakehouse 86% 0
github.com/microsoft/terraform-provider-fabric/internal/services/mirroredwarehouse 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/mlexperiment 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/mlmodel 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/notebook 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/paginatedreport 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/report 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/semanticmodel 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/spark 74% 0
github.com/microsoft/terraform-provider-fabric/internal/services/sparkjobdefinition 92% 0
github.com/microsoft/terraform-provider-fabric/internal/services/sqlendpoint 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/warehouse 92% 0
github.com/microsoft/terraform-provider-fabric/internal/services/workspace 78% 0
Summary 73% (3828 / 5269) 0

Minimum allowed line rate is 40%

@DariuszPorowski DariuszPorowski linked an issue Jan 8, 2025 that may be closed by this pull request
1 task
@DariuszPorowski DariuszPorowski force-pushed the feat/rs_domain_workspace_assignment branch from 503358d to 64001fb Compare January 8, 2025 19:56
@DariuszPorowski DariuszPorowski marked this pull request as ready for review January 8, 2025 19:56
@DariuszPorowski DariuszPorowski requested a review from a team as a code owner January 8, 2025 19:56
@DariuszPorowski DariuszPorowski added this to the 2025-01 milestone Jan 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 7.69231% with 24 lines in your changes missing coverage. Please review.

Project coverage is 76.49%. Comparing base (5578a67) to head (dc1c2f9).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...es/domain/resource_domain_workspace_assignments.go 5.26% 18 Missing ⚠️
...in/models_resource_domain_workspace_assignments.go 14.28% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   76.58%   76.49%   -0.10%     
==========================================
  Files         148      148              
  Lines       12631    12643      +12     
==========================================
- Hits         9674     9671       -3     
- Misses       2952     2967      +15     
  Partials        5        5              

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

Copy link
Contributor

@PabloZaiden PabloZaiden left a comment

Choose a reason for hiding this comment

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

Looks good. Just suggested a fix for a minor typo

.changes/unreleased/fixed-20250108-115142.yaml Outdated Show resolved Hide resolved
@DariuszPorowski DariuszPorowski force-pushed the feat/rs_domain_workspace_assignment branch from 566338f to dc1c2f9 Compare January 10, 2025 18:07
@DariuszPorowski DariuszPorowski enabled auto-merge (squash) January 10, 2025 18:15
@DariuszPorowski DariuszPorowski merged commit 3ca1c37 into main Jan 10, 2025
25 checks passed
@DariuszPorowski DariuszPorowski deleted the feat/rs_domain_workspace_assignment branch January 10, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants