Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .azure-pipelines/azure-powershell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand All @@ -107,11 +107,6 @@ jobs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: Npm@1
displayName: Install tsp client
inputs:
command: custom
customCommand: install -g @azure-tools/typespec-client-generator-cli@0.15.x
- task: PowerShell@2
displayName: 'Build'
inputs:
Expand Down Expand Up @@ -212,7 +207,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
9 changes: 2 additions & 7 deletions .azure-pipelines/powershell-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand All @@ -57,11 +57,6 @@ jobs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: Npm@1
displayName: Install tsp client
inputs:
command: custom
customCommand: install -g @azure-tools/typespec-client-generator-cli@0.15.x
- task: PowerShell@2
displayName: 'Build'
inputs:
Expand Down Expand Up @@ -107,7 +102,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
5 changes: 0 additions & 5 deletions .azure-pipelines/security-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ jobs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: Npm@1
displayName: Install tsp client
inputs:
command: custom
customCommand: install -g @azure-tools/typespec-client-generator-cli@0.15.x
- task: PowerShell@2
displayName: 'Build'
inputs:
Expand Down
5 changes: 0 additions & 5 deletions .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ steps:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: Npm@1
displayName: Install tsp client
inputs:
command: custom
customCommand: install -g @azure-tools/typespec-client-generator-cli@0.15.x
- task: UseDotNet@2
displayName: 'Use .NET SDK'
inputs:
Expand Down
9 changes: 2 additions & 7 deletions .azure-pipelines/windows-powershell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- task: NodeTool@0
displayName: Install Autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand All @@ -53,11 +53,6 @@ jobs:
targetType: inline
script: "$env:NODE_OPTIONS=\"--max-old-space-size=65536\""
pwsh: true
- task: Npm@1
displayName: Install tsp client
inputs:
command: custom
customCommand: install -g @azure-tools/typespec-client-generator-cli@0.15.x
- task: PowerShell@2
displayName: 'Build'
inputs:
Expand Down Expand Up @@ -103,7 +98,7 @@ jobs:
- task: NodeTool@0
displayName: Install autorest
inputs:
versionSpec: '18.20.8'
versionSpec: '20.19.6'
command: custom
verbose: false
customCommand: install autorest@latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "038320b6-a9d6-450d-9754-dcbd5b2e0ecb"
"generate_Id": "038320b6-a9d6-450d-9754-dcbd5b2e0ecc"
}
4 changes: 2 additions & 2 deletions src/DependencyMap/DependencyMap.Autorest/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/azuredependencymap/DependencyMap.Management
commit: 5979db8af035491b86afc1713134ea1c806f7742
repo: Azure/azure-rest-api-specs
commit: e952eed8b787d99d10ba9a5ea3789ed0a9877214
repo: VeryEarly/azure-rest-api-specs
additionalDirectories:
50 changes: 50 additions & 0 deletions src/DependencyMap/DependencyMap.Autorest/tspconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
options:
"@azure-tools/typespec-powershell":
service-dir: "src"
emitter-output-dir: "{output-dir}/{service-dir}/DependencyMap/DependencyMap.Autorest"
clear-output-folder: true
debug: true
azure: true
module-version: 0.1.0
prefix: "Az"
subject-prefix: "DependencyMap"
service-name: DependencyMap
module-name: "{prefix}.{service-name}"
output-folder: "{output-dir}"
exclude-tableview-properties:
- Id
- Type
directive:
- where:
subject: Operation
hide: true
- where:
parameter-name: SubscriptionId
set:
default:
script: "(Get-AzContext).Subscription.Id"
- where:
variant: ^(Create|Update|Export)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath)
remove: true
- where:
subject: MapConnection
variant: ^(Get)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath)
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
- where:
verb: Set
remove: true
# Remove four post operations since there are issues in tsp and response schema are not defined.
- where:
subject: MapConnection|MapDependencyView
verb: Get
remove: true
- where:
verb: Export
remove: true
- no-inline:
- DiscoverySourceResourceProperties
- model-cmdlet:
- model-name: OffAzureDiscoverySourceResourceProperties
1 change: 1 addition & 0 deletions src/DependencyMap/DependencyMap/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Pipeline test
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The ChangeLog entry "Pipeline test" is not user-facing and doesn't follow the required format. According to the ChangeLog.md guidelines, entries should describe changes from the user's perspective and explain what changed and how it affects their usage. This appears to be a test entry that should be removed or replaced with a proper description of the changes being introduced.

Copilot generated this review using guidance from repository custom instructions.

## Version 0.1.0
* First preview release for module Az.DependencyMap
Expand Down
2 changes: 1 addition & 1 deletion tools/AzDev/AzDev/AzDev.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ FunctionsToExport = 'Connect-DevCommonRepo', 'Disconnect-DevCommonRepo'
CmdletsToExport = 'Get-DevContext', 'Set-DevContext',
'Get-DevModule', 'Get-DevProject',
'Update-DevAssembly',
'Open-DevSwagger'
'Open-DevSwagger', 'New-DevTSPModule'

# Variables to export from this module
VariablesToExport = '*'
Expand Down
8 changes: 5 additions & 3 deletions tools/AzDev/build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
$module = 'AzDev'
$artifacts = "$PSScriptRoot/../../artifacts"
$artifacts = Join-Path $PSScriptRoot ".." ".." "artifacts"
$moduleOut = Join-Path $artifacts $module

dotnet publish $PSScriptRoot/src --sc -o "$artifacts/$module/bin"
Copy-Item "$PSScriptRoot/$module/*" "$artifacts/$module" -Recurse -Force
if (Test-Path $moduleOut) { Remove-Item $moduleOut -Recurse -Force }
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The build script unconditionally removes the entire module output directory on every build. While this ensures a clean build, it prevents incremental builds and can significantly slow down the development workflow. Consider adding a parameter to control whether to perform a clean build or allow incremental builds.

Copilot uses AI. Check for mistakes.
dotnet publish (Join-Path $PSScriptRoot "src") --sc -o (Join-Path $moduleOut "bin")
Copy-Item (Join-Path $PSScriptRoot $module "*") $moduleOut -Recurse -Force
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The script uses Join-Path correctly for cross-platform compatibility, which is good. However, verify that the dotnet publish and Copy-Item commands work correctly on Unix-like systems (Linux, macOS), especially the wildcard pattern in Copy-Item on line 7. Consider testing this script on non-Windows platforms to ensure full compatibility.

Suggested change
Copy-Item (Join-Path $PSScriptRoot $module "*") $moduleOut -Recurse -Force
Get-ChildItem -Path (Join-Path $PSScriptRoot $module) | Copy-Item -Destination $moduleOut -Recurse -Force

Copilot uses AI. Check for mistakes.
Comment on lines 1 to +7
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The variable naming is inconsistent with PowerShell conventions. PowerShell variables typically use PascalCase for clarity, but some variables here use lowercase (like $module, $artifacts, $moduleOut). While not incorrect, using consistent PascalCase (like $Module, $Artifacts, $ModuleOut) would be more conventional and improve readability.

Copilot uses AI. Check for mistakes.
12 changes: 11 additions & 1 deletion tools/AzDev/src/Services/YamlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ internal static class YamlHelper
private static IDeserializer Deserializer => _lazyDeserializer.Value;
private static Lazy<IDeserializer> _lazyDeserializer = new Lazy<IDeserializer>(BuildDeserializer);

private static ISerializer Serializer => _lazySerializer.Value;
private static Lazy<ISerializer> _lazySerializer = new Lazy<ISerializer>(BuildSerializer);

private static IDeserializer BuildDeserializer()
{
return new DeserializerBuilder()
.IgnoreUnmatchedProperties()
.Build();
}

private static ISerializer BuildSerializer()
{
return new SerializerBuilder()
.WithNamingConvention(YamlDotNet.Serialization.NamingConventions.CamelCaseNamingConvention.Instance)
.Build();
}

public static T Deserialize<T>(string yaml)
{
return Deserializer.Deserialize<T>(yaml);
Expand All @@ -48,6 +58,6 @@ public static bool TryDeserialize<T>(string yaml, out T obj)

public static string Serialize<T>(T obj)
{
throw new NotImplementedException();
return Serializer.Serialize(obj);
}
}
Loading
Loading