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: add missing diags #151

Merged
merged 3 commits into from
Dec 16, 2024
Merged

fix: add missing diags #151

merged 3 commits into from
Dec 16, 2024

Conversation

DariuszPorowski
Copy link
Member

📥 Pull Request

❓ What are you trying to address

This pull request focuses on enhancing error handling by ensuring that diagnostic information is properly propagated and checked across various functions. The changes span multiple files and functions.

These changes collectively improve the robustness of the code by ensuring that errors are properly handled, and diagnostic information is propagated throughout the system.

✨ Description of new changes

Error Handling Improvements:

Diagnostic Propagation:

Code Simplification:

Import Additions:

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • internal/services/workspace/data_workspace.go: Evaluated as low risk
  • internal/services/workspace/resource_workspace.go: Evaluated as low risk
  • internal/services/warehouse/data_warehouse.go: Evaluated as low risk
  • internal/services/domain/resource_domain_workspace_assignments.go: Evaluated as low risk
  • internal/services/domain/resource_domain_role_assignments.go: Evaluated as low risk
Comments suppressed due to low confidence (1)

internal/services/warehouse/models.go:26

  • The set method in warehousePropertiesModel should return diagnostics for consistency and better error handling.
func (to *warehousePropertiesModel) set(from *fabwarehouse.Properties) {
Copy link

github-actions bot commented Dec 16, 2024

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 80% 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 41% 0
github.com/microsoft/terraform-provider-fabric/internal/services/environment 84% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventhouse 84% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventstream 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/kqldatabase 78% 0
github.com/microsoft/terraform-provider-fabric/internal/services/kqlqueryset 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/lakehouse 82% 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 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/sqlendpoint 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/warehouse 82% 0
github.com/microsoft/terraform-provider-fabric/internal/services/workspace 78% 0
Summary 74% (3669 / 4950) 0

Minimum allowed line rate is 40%

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 60.82474% with 38 lines in your changes missing coverage. Please review.

Project coverage is 78.19%. Comparing base (94935b7) to head (1f7af5d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/services/environment/models.go 60.00% 14 Missing ⚠️
internal/services/warehouse/resource_warehouse.go 63.63% 8 Missing ⚠️
internal/services/workspace/models.go 63.63% 4 Missing ⚠️
...orkspace/models_data_workspace_role_assignments.go 60.00% 4 Missing ⚠️
...ervices/domain/resource_domain_role_assignments.go 0.00% 3 Missing ⚠️
...es/domain/resource_domain_workspace_assignments.go 0.00% 3 Missing ⚠️
internal/services/warehouse/models.go 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
+ Coverage   77.99%   78.19%   +0.20%     
==========================================
  Files         130      130              
  Lines       12172    12212      +40     
==========================================
+ Hits         9493     9549      +56     
+ Misses       2675     2658      -17     
- Partials        4        5       +1     

☔ 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. It seems we were potentially missing some error details. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants