Skip to content

Update all id parameters to use guids instead of strings as datatypes closes #125 #126

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

Merged
merged 8 commits into from
Jun 17, 2025

Conversation

SQLDBAWithABeard
Copy link
Contributor

Pull Request

Update all id parameters to use guids instead of strings as datatypes closes #125

Pull Request (PR) description

No logic altered.
Updated the WorkspaceId,CapacitiesIds,CapacityId,CopyJobId,datamartId,DataPipelineId,DataWarehouseGUID,DomainId,EnvironmentId,EventhouseId,EventstreamId,ExternalDataShareId,ItemId,KQLDashboardId,KQLDatabaseId,KQLQuerysetId,LakehouseId,MirroredDatabaseId,MirroredWarehouseId,MLExperimentId,MLModelId,NotebookId,operationId,PaginatedReportId,ParentDomainId,parentEventhouseId,PrincipalId,ReflexId,ReportId,SemanticModelId,SparkCustomPoolId,SparkJobDefinitionId,SQLDatabaseId,SQLEndpointId,subscriptionID,UserId,WarehouseId,WorkspaceGUID,WorkspaceId,WorkspaceIds,and WorkspaceRoleAssignmentId parameters to the datatype GUID

Task list

  • [ X] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.

  • [X ] Added an entry under the Unreleased section of in the CHANGELOG.md as per format.

  • [ X] Local clean build passes without issue or fail tests (build.ps1 -ResolveDependency -Tasks build, test).

  • [X ] Code follows the contribution guidelines.

…r all `Id` input parameters from [String] to [Guid] #125

Updated parameter types for WorkspaceId and LakehouseId to GUID in multiple scripts to ensure better validation and consistency across the codebase. This change enhances the robustness of the functions by enforcing the correct data type.

Thank you!
…spaceId, ReflexId, ReportId, and other identifiers

- Updated parameter types from [string] to [guid] in multiple scripts across the Public/Reflex, Public/Report, Public/Restore Points, Public/SQL Database, Public/Spark, Public/Tenant, Public/Users, Public/Utils, Public/Warehouse, and Public/Workspace directories.
- This change enhances type safety and ensures that only valid GUIDs are accepted for these parameters.
Updated the `WorkspaceId`, `CapacitiesIds`, and various other parameters to use the GUID datatype for consistency and improved type safety. This change enhances the clarity and reliability of the code.

Thank you!
Corrected the conditional check for itemID to ensure proper functionality. This change enhances the reliability of the function when exporting items from a Fabric workspace.

Thank you!
Copy link

github-actions bot commented Jun 15, 2025

Linux Test Results

4 887 tests   4 886 ✅  41s ⏱️
  594 suites      1 💤
    1 files        0 ❌

Results for commit 64295db.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 15, 2025

WinPS51 Test Results

5 092 tests   5 091 ✅  51s ⏱️
  595 suites      1 💤
    1 files        0 ❌

Results for commit 64295db.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 15, 2025

WinPS71 Test Results

5 092 tests   5 091 ✅  52s ⏱️
  595 suites      1 💤
    1 files        0 ❌

Results for commit 64295db.

♻️ This comment has been updated with latest results.

@NowinskiK
Copy link
Contributor

This looks good, thanks for implementing Rob!
Could you add a generic unit test (probably in module.tests.ps1) that validates such parameters for the existing and all new functions?

This commit introduces a new test suite to verify that function parameters ending with 'id' are of type System.Guid. This ensures consistency and correctness in parameter types across the module.

Thank you!
@SQLDBAWithABeard
Copy link
Contributor Author

This looks good, thanks for implementing Rob! Could you add a generic unit test (probably in module.tests.ps1) that validates such parameters for the existing and all new functions?

Added tests as requested

image

image

All tests passing locally
image

build succeeeding
image

@NowinskiK
Copy link
Contributor

Looks good to me. Great job!
As this is bulk changes - I'd like to ask @tiagobalabuch to review and give feedback that he is ok with new approach.

@jpomfret
Copy link
Contributor

@SQLDBAWithABeard - think from merging #128 in we got a conflict here - shout if you want me to look into it

Updated the WorkspaceId parameter type from string to GUID for better validation and to ensure correct input format. This change enhances the function's robustness and prevents potential errors.

Thank you!
@SQLDBAWithABeard
Copy link
Contributor Author

Thank you @jpomfret - I missed merging develop back into the branch for this one. I have done it locally and pushed so it now needs approval for latest commit

Copy link
Contributor

@tiagobalabuch tiagobalabuch left a comment

Choose a reason for hiding this comment

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

There was a reason I didn't use GUID, but honestly, I can't remember why. I'm fine with the change.

@SQLDBAWithABeard
Copy link
Contributor Author

Thank you both

@SQLDBAWithABeard SQLDBAWithABeard merged commit 7b588c0 into develop Jun 17, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in FabricTools-FeatureRelease Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Replace type for all Id input parameters from [String] to [Guid]
4 participants