From 725f160a1078301acca30b90f7e63ad22b197dab Mon Sep 17 00:00:00 2001 From: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Date: Tue, 28 Oct 2025 16:53:35 -0700 Subject: [PATCH 1/3] ci: add workflow for generating copilot sdk v1 (#1398) * ci: added conditions for stages * ci: setup stage for v1 copilot sdk (#1396) * ci: move php beta after v1 * ci: add generation stage for v1 copilot * ci: add version name for better PR info * chore(deps): bump actions/upload-artifact from 4 to 5 (#1397) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .azure-pipelines/generation-pipeline.yml | 126 +++++++++++++++++------ .github/workflows/dotnet.yml | 4 +- 2 files changed, 96 insertions(+), 34 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 46e179ea7..6000b3f6a 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -341,6 +341,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -383,6 +384,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -425,6 +427,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -465,6 +468,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -505,6 +509,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -547,6 +552,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -580,26 +586,28 @@ extends: parameters: repoName: msgraph-beta-sdk-java namespacePath: com/microsoft/graph/beta - - stage: stage_php_beta_kiota + + - stage: stage_php_v1_kiota dependsOn: - stage_build_and_publish_kiota - - stage_beta_openapi - - open_api_beta_approval + - stage_v1_openapi + - open_api_v1_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_beta_kiota + - job: php_v1_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderBeta) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -608,40 +616,41 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: 'beta' - repoName: 'msgraph-beta-sdk-php' - branchName: 'kiota/$(betaBranch)' + version: '' + repoName: 'msgraph-sdk-php' + branchName: 'kiota/$(v1Branch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' + targetNamespace: 'Microsoft\\Graph\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderBeta) + cleanMetadataFolder: $(cleanOpenAPIFolderV1) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-beta-sdk-php + repoName: msgraph-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - - stage: stage_php_v1_kiota + - stage: stage_php_beta_kiota dependsOn: - stage_build_and_publish_kiota - - stage_v1_openapi - - open_api_v1_approval + - stage_beta_openapi + - open_api_beta_approval condition: | and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), - in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), + in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: php_v1_kiota + - job: php_beta_kiota templateContext: inputs: - input: pipelineArtifact displayName: 'Downloading metadata from artifacts' buildType: 'current' - artifactName: $(cleanOpenAPIFolderV1) - targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + artifactName: $(cleanOpenAPIFolderBeta) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderBeta)' - input: pipelineArtifact buildType: 'current' artifactName: 'kiota' @@ -650,18 +659,18 @@ extends: - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self parameters: language: 'php' - version: '' - repoName: 'msgraph-sdk-php' - branchName: 'kiota/$(v1Branch)' + version: 'beta' + repoName: 'msgraph-beta-sdk-php' + branchName: 'kiota/$(betaBranch)' targetClassName: "BaseGraphClient" - targetNamespace: 'Microsoft\\Graph\\Generated' + targetNamespace: 'Microsoft\\Graph\\Beta\\Generated' baseBranchName: 'main' commitMessagePrefix: "feat(generation): update request builders and models" - cleanMetadataFolder: $(cleanOpenAPIFolderV1) + cleanMetadataFolder: $(cleanOpenAPIFolderBeta) languageSpecificSteps: - template: /.azure-pipelines/generation-templates/php-kiota.yml@self parameters: - repoName: msgraph-sdk-php + repoName: msgraph-beta-sdk-php customArguments: "-b -e '/me' -e '/me/**'" # Exclude /me/** and enable backing store - stage: stage_typescript_v1 @@ -672,6 +681,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -709,6 +719,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_typewriter.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_metadata.result, 'Succeeded', 'Skipped') ) jobs: @@ -747,6 +758,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -790,6 +802,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -833,6 +846,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_v1_approval.result, 'Succeeded'), in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -865,6 +879,7 @@ extends: parameters: repoName: msgraph-sdk-python baseDirectory: msgraph + - stage: stage_python_beta dependsOn: - stage_build_and_publish_kiota @@ -874,6 +889,7 @@ extends: and ( eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + eq(dependencies.open_api_beta_approval.result, 'Succeeded'), in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: @@ -906,7 +922,52 @@ extends: parameters: repoName: msgraph-beta-sdk-python baseDirectory: msgraph_beta - - stage: stage_ccs_csharp_beta + + - stage: stage_agents_m365copilot_csharp_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: csharp_v1_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'csharp' + version: 'v1' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-dotnet/$(v1Branch)' + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "Microsoft.Agents.M365Copilot" + commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/dotnet-kiota.yml@self + parameters: + repoName: 'Agents-M365Copilot/dotnet' + packageName: Microsoft.Agents.M365Copilot + + - stage: stage_agents_m365copilot_csharp_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -917,7 +978,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: csharp_beta_ccs + - job: csharp_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -949,7 +1010,8 @@ extends: parameters: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta - - stage: stage_ccs_python_beta + + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -960,7 +1022,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: python_beta_ccs + - job: python_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact @@ -992,7 +1054,7 @@ extends: parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta - - stage: stage_ccs_typescript_beta + - stage: stage_agents_m365copilot_typescript_beta dependsOn: - stage_build_and_publish_kiota - stage_beta_openapi @@ -1003,7 +1065,7 @@ extends: in(dependencies.stage_beta_openapi.result, 'Succeeded', 'Skipped') ) jobs: - - job: typescript_beta_ccs + - job: typescript_beta_agents_m365copilot templateContext: inputs: - input: pipelineArtifact diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b060ce79c..1f0e31332 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,13 +26,13 @@ jobs: - name: Test run: dotnet test ./Typewriter.sln --no-build --verbosity normal - name: Upload languages test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: languages-test-output path: 'test/Typewriter.Test/bin/Debug/net8.0/OutputDirectory*/**' - name: Upload unit test output on failure - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: ${{ failure() }} with: name: unit-test-output From a13eb38de95d17abc98a5d0f4b57d48ccf8f501e Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Wed, 29 Oct 2025 13:32:20 -0700 Subject: [PATCH 2/3] ci: add workflow for generating typescript and python v1 copilot libs --- .azure-pipelines/generation-pipeline.yml | 89 ++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 6000b3f6a..95ad2a5e6 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -1011,6 +1011,50 @@ extends: repoName: 'Agents-M365Copilot/dotnet' packageName: Microsoft.Agents.M365Copilot.Beta + - stage: stage_agents_m365copilot_python_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: python_v1_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'python' + version: 'v1' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-python/$(v1Branch)' + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "microsoft_agents_m365copilot.generated" + customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + commitMessagePrefix: "feat(generation): update request builders and models for python v1" + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/python.yml@self + parameters: + repoName: 'Agents-M365Copilot/python/packages' + baseDirectory: microsoft_agents_m365copilot/microsoft_agents_m365copilot + - stage: stage_agents_m365copilot_python_beta dependsOn: - stage_build_and_publish_kiota @@ -1054,6 +1098,51 @@ extends: parameters: repoName: 'Agents-M365Copilot/python/packages' baseDirectory: microsoft_agents_m365copilot_beta/microsoft_agents_m365copilot_beta + + - stage: stage_agents_m365copilot_typescript_v1 + dependsOn: + - stage_build_and_publish_kiota + - stage_v1_openapi + condition: | + and + ( + eq(dependencies.stage_build_and_publish_kiota.result, 'Succeeded'), + in(dependencies.stage_v1_openapi.result, 'Succeeded', 'Skipped') + ) + jobs: + - job: typescript_beta_agents_m365copilot + templateContext: + inputs: + - input: pipelineArtifact + displayName: 'Downloading metadata from artifacts' + buildType: 'current' + artifactName: $(cleanOpenAPIFolderV1) + targetPath: '$(Build.SourcesDirectory)/msgraph-metadata/$(cleanOpenAPIFolderV1)' + - input: pipelineArtifact + buildType: 'current' + artifactName: 'kiota' + targetPath: '$(kiotaDirectory)' + steps: + - template: /.azure-pipelines/generation-templates/language-generation-kiota.yml@self + parameters: + language: 'typescript' + version: 'beta' + orgName: 'microsoft' + repoName: 'Agents-M365Copilot' + baseBranchName: 'main' + branchName: 'ccs-typescript/$(v1Branch)' + commitMessagePrefix: "feat(generation): update request builders and models for typescript v1" + targetClassName: "BaseAgentsM365CopilotServiceClient" + targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" + customArguments: "-b -i '**/copilot/**'" + cleanMetadataFolder: $(cleanOpenAPIFolderV1) + pathExclusionArguments: '' + languageSpecificSteps: + - template: /.azure-pipelines/generation-templates/ccs-typescript-sdk.yml@self + parameters: + repoName: 'Agents-M365Copilot/typescript' + packageName: '@microsoft/agents-m365copilot' + - stage: stage_agents_m365copilot_typescript_beta dependsOn: - stage_build_and_publish_kiota From ff0785d33ffb224767d5856f873bd034d1759e77 Mon Sep 17 00:00:00 2001 From: "Michael Mainer (from Dev Box)" <8527305+MIchaelMainer@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:43:40 -0800 Subject: [PATCH 3/3] ci: remove backing store from agents --- .azure-pipelines/generation-pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/generation-pipeline.yml b/.azure-pipelines/generation-pipeline.yml index 95ad2a5e6..c9c86140e 100644 --- a/.azure-pipelines/generation-pipeline.yml +++ b/.azure-pipelines/generation-pipeline.yml @@ -958,7 +958,7 @@ extends: targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "Microsoft.Agents.M365Copilot" commitMessagePrefix: "feat(generation): update request builders and models for dotnet v1" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderV1) pathExclusionArguments: '' languageSpecificSteps: @@ -1002,7 +1002,7 @@ extends: targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "Microsoft.Agents.M365Copilot.Beta" commitMessagePrefix: "feat(generation): update request builders and models for dotnet beta" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: @@ -1045,7 +1045,7 @@ extends: branchName: 'ccs-python/$(v1Branch)' targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "microsoft_agents_m365copilot.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderV1) commitMessagePrefix: "feat(generation): update request builders and models for python v1" pathExclusionArguments: '' @@ -1089,7 +1089,7 @@ extends: branchName: 'ccs-python/$(betaBranch)' targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "microsoft_agents_m365copilot_beta.generated" - customArguments: "-b -i '**/copilot/**'" # Enable the backing store, include only copilot paths + customArguments: "-i '**/copilot/**'" # include only copilot paths cleanMetadataFolder: $(cleanOpenAPIFolderBeta) commitMessagePrefix: "feat(generation): update request builders and models for python beta" pathExclusionArguments: '' @@ -1134,7 +1134,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models for typescript v1" targetClassName: "BaseAgentsM365CopilotServiceClient" targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" + customArguments: "-i '**/copilot/**'" cleanMetadataFolder: $(cleanOpenAPIFolderV1) pathExclusionArguments: '' languageSpecificSteps: @@ -1178,7 +1178,7 @@ extends: commitMessagePrefix: "feat(generation): update request builders and models for typescript beta" targetClassName: "BaseAgentsM365CopilotBetaServiceClient" targetNamespace: "github.com/microsoft/Agents-M365Copilot/typescript/" - customArguments: "-b -i '**/copilot/**'" + customArguments: "-i '**/copilot/**'" cleanMetadataFolder: $(cleanOpenAPIFolderBeta) pathExclusionArguments: '' languageSpecificSteps: