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

feat(kql_database): deprecate token and add token_wo #281

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DariuszPorowski
Copy link
Member

@DariuszPorowski DariuszPorowski commented Mar 5, 2025

@DariuszPorowski DariuszPorowski requested a review from a team as a code owner March 5, 2025 04:38
Copy link

github-actions bot commented Mar 5, 2025

Changelog Preview

v0.1.0-dev - March 06, 2025

💫 Changed

  • #281 Introduction of the write-only attribute for Invitation Token in the KQL Database resource.
  • #286 SPN is now supported for Domain resources/data-sources

Copy link

github-actions bot commented Mar 5, 2025

Code Coverage

Package Line Rate Complexity Health
github.com/microsoft/terraform-provider-fabric/internal/auth 89% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/customtypes 75% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/planmodifiers 69% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/typeutils 63% 0
github.com/microsoft/terraform-provider-fabric/internal/framework/validators 80% 0
github.com/microsoft/terraform-provider-fabric/internal/functions 72% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/fabricitem 81% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/transforms 64% 0
github.com/microsoft/terraform-provider-fabric/internal/pkg/utils 83% 0
github.com/microsoft/terraform-provider-fabric/internal/provider 85% 0
github.com/microsoft/terraform-provider-fabric/internal/provider/client 78% 0
github.com/microsoft/terraform-provider-fabric/internal/provider/config 100% 0
github.com/microsoft/terraform-provider-fabric/internal/provider/utils 69% 0
github.com/microsoft/terraform-provider-fabric/internal/services/activator 100% 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 42% 0
github.com/microsoft/terraform-provider-fabric/internal/services/environment 87% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventhouse 93% 0
github.com/microsoft/terraform-provider-fabric/internal/services/eventstream 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/graphqlapi 100% 0
github.com/microsoft/terraform-provider-fabric/internal/services/kqldashboard 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 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/sqldatabase 100% 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 79% 0
Summary 76% (4172 / 5503) 0

Minimum allowed line rate is 40%

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 78.57143% with 15 lines in your changes missing coverage. Please review.

Project coverage is 79.37%. Comparing base (a16d3a2) to head (568729e).

Files with missing lines Patch % Lines
...rnal/services/kqldatabase/resource_kql_database.go 0.00% 11 Missing ⚠️
...item/resource_item_config_definition_properties.go 66.66% 2 Missing ⚠️
.../pkg/fabricitem/resource_item_config_properties.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
- Coverage   79.50%   79.37%   -0.13%     
==========================================
  Files         165      165              
  Lines       13465    13326     -139     
==========================================
- Hits        10705    10578     -127     
+ Misses       2755     2743      -12     
  Partials        5        5              

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

@@ -104,7 +104,7 @@ func (r *ResourceFabricItemConfigProperties[Ttfprop, Titemprop, Ttfconfig, Titem
reqCreate.setDescription(plan.Description)
reqCreate.setType(r.Type)

creationPayload, diags := getCreationPayload(ctx, plan.Configuration, r.CreationPayloadSetter)
creationPayload, diags := getCreationPayload(ctx, config.Configuration, r.CreationPayloadSetter)
Copy link

@OrBaubergMicrosoft OrBaubergMicrosoft Mar 9, 2025

Choose a reason for hiding this comment

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

getCreationPayload takes Tconfiguration as an argument, how did it work without it?
because the property setter uses the type specific configuration properties , and they exist also in the plan?

EventhouseID customtypes.UUID `tfsdk:"eventhouse_id"`
InvitationToken types.String `tfsdk:"invitation_token"`
InvitationTokenWO types.String `tfsdk:"invitation_token_wo"`
InvitationTokenWOVersion types.Int32 `tfsdk:"invitation_token_wo_version"`

Choose a reason for hiding this comment

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

the invitation token is a part of the creation payload, meaning that currently it cannot be update. why is the versioning needed?
I think it's only relevant for read only & updateable properties.

@@ -69,18 +71,57 @@ func getResourceKQLDatabaseConfigurationAttributes() map[string]schema.Attribute
MarkdownDescription: "Invitation token to follow the source database. Only allowed when `database_type` is `" + string(fabkqldatabase.TypeShortcut) + "`.",

Choose a reason for hiding this comment

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

how do we plan to depricate it?
will we write deprication date?
do we have any traces for invitation_token usage vs _wo usage?

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.

3 participants