Skip to content

Conversation

@catalina-gav
Copy link
Contributor

📥 Pull Request

❓ What are you trying to address

Use the on preview models and methods from the sdk for domain data source and resource

@catalina-gav catalina-gav requested a review from a team as a code owner October 1, 2025 07:03
Copilot AI review requested due to automatic review settings October 1, 2025 07:03
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🛑 Changelog entry required to merge

Run changie new to add a new changelog entry

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Migrates the domain service from preview APIs to stable APIs by removing "Preview" from type names and method calls throughout the codebase.

  • Replaces DomainPreview types and *Preview method calls with non-preview equivalents
  • Updates schema to replace contributors_scope field with default_label_id field
  • Changes IsPreview flag from true to false in domain type info

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/testhelp/fakes/fabric_domain.go Updates fake server implementation to use non-preview domain types and methods
internal/services/domain/schema.go Replaces contributors_scope field with default_label_id and removes validation conflicts
internal/services/domain/resource_domain_test.go Updates test assertions to check default_label_id instead of contributors_scope
internal/services/domain/resource_domain.go Replaces preview API calls with stable API equivalents
internal/services/domain/models.go Updates model structs to use Domain instead of DomainPreview types
internal/services/domain/data_domains.go Updates data source to use stable list domains API
internal/services/domain/data_domain_test.go Updates test to check default_label_id attribute
internal/services/domain/data_domain.go Updates data source to use stable get domain API
internal/services/domain/base.go Sets IsPreview flag to false
examples/resources/fabric_domain/resource.tf Adds example showing default_label_id usage
docs/resources/domain.md Removes preview warnings and updates field documentation
docs/data-sources/domains.md Removes preview warnings and updates field documentation
docs/data-sources/domain.md Removes preview warnings and updates field documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gwendal-lecren
Copy link

gwendal-lecren commented Dec 3, 2025

Per my understanding, there are currently two endpoints to list domains:
https://learn.microsoft.com/en-us/rest/api/fabric/core/domains/list-domains?tabs=HTTP
https://learn.microsoft.com/en-us/rest/api/fabric/admin/domains/list-domains?tabs=HTTP

AFAIK the only difference is the permissions required. The core is more lenient since it requires Domain.Read.All while the admin requires Tenant.ReadWrite.All.

Maybe that would make sense to be able to configure which one to use?

@catalina-gav catalina-gav marked this pull request as draft December 18, 2025 10:02
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