-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
There was a problem hiding this comment.
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 inwarehousePropertiesModel
should return diagnostics for consistency and better error handling.
func (to *warehousePropertiesModel) set(from *fabwarehouse.Properties) {
Minimum allowed line rate is |
Codecov ReportAttention: Patch coverage is
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. |
There was a problem hiding this 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!
ac76632
to
1f7af5d
Compare
📥 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:
internal/services/domain/resource_domain_role_assignments.go
: Updated theDelete
function to append diagnostics and check for errors after setting the request.internal/services/domain/resource_domain_workspace_assignments.go
: Modified theDelete
function to append diagnostics and check for errors after setting the request.Diagnostic Propagation:
internal/services/environment/models.go
: Updated severalset
methods to return diagnostics and check for errors within nested property assignments. [1] [2] [3] [4]internal/services/warehouse/models.go
: Changed theset
method inbaseWarehouseModel
to return diagnostics and handle errors during property assignments. [1] [2]internal/services/warehouse/resource_warehouse.go
: Updated theCreate
,Read
,Update
, andImportState
functions to append diagnostics and check for errors after setting the state. [1] [2] [3] [4] [5]Code Simplification:
internal/services/warehouse/data_warehouse.go
: Simplified thegetByID
andgetByDisplayName
functions by directly returning the result of theset
method. [1] [2]internal/services/workspace/data_workspace.go
: Simplified thegetByID
function by directly returning the result of theset
method.Import Additions:
internal/services/warehouse/models.go
: Added thediag
package import to support diagnostic handling.internal/services/warehouse/resource_warehouse.go
: Added thediag
package import to support diagnostic handling.