From 1a97e8576fcfca98b929d00e273c1c7b979a1630 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Thu, 2 Feb 2023 16:24:59 -0800 Subject: [PATCH 1/3] Build snippets during Analyze job by default Resolves #33877 --- eng/pipelines/templates/jobs/ci.yml | 2 +- eng/pipelines/templates/stages/archetype-sdk-client.yml | 2 +- sdk/authorization/ci.mgmt.yml | 1 - sdk/billingbenefits/ci.mgmt.yml | 1 - sdk/communication/ci.mgmt.yml | 1 - sdk/containerregistry/ci.mgmt.yml | 1 - sdk/containerregistry/ci.yml | 1 - sdk/dns/ci.mgmt.yml | 1 + sdk/eventhub/ci.yml | 1 - sdk/iot/ci.yml | 3 ++- sdk/keyvault/ci.mgmt.yml | 1 - sdk/keyvault/ci.yml | 1 - sdk/metricsadvisor/ci.yml | 1 - sdk/purview/ci.mgmt.yml | 1 - sdk/purview/ci.yml | 1 - sdk/reservations/ci.mgmt.yml | 1 - sdk/search/ci.yml | 1 - sdk/textanalytics/ci.yml | 1 - 18 files changed, 5 insertions(+), 17 deletions(-) diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 62bde9d20d76a..fa339196b2999 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -16,7 +16,7 @@ parameters: default: not-specified - name: BuildSnippets type: boolean - default: false + default: true - name: TestSetupSteps type: stepList default: [] diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 6b0c410cb081a..238d9b08ec5b2 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -29,7 +29,7 @@ parameters: default: azure-docs-sdk-dotnet - name: BuildSnippets type: boolean - default: false + default: true - name: TestSetupSteps type: stepList default: [] diff --git a/sdk/authorization/ci.mgmt.yml b/sdk/authorization/ci.mgmt.yml index 15e1a4dc55677..7ac32fcc55439 100644 --- a/sdk/authorization/ci.mgmt.yml +++ b/sdk/authorization/ci.mgmt.yml @@ -17,7 +17,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: authorization - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Authorization diff --git a/sdk/billingbenefits/ci.mgmt.yml b/sdk/billingbenefits/ci.mgmt.yml index d9068aa9acf10..9900a842be4f4 100644 --- a/sdk/billingbenefits/ci.mgmt.yml +++ b/sdk/billingbenefits/ci.mgmt.yml @@ -18,7 +18,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: billingbenefits - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.BillingBenefits diff --git a/sdk/communication/ci.mgmt.yml b/sdk/communication/ci.mgmt.yml index 5e91b8ac70704..8fc73e1077450 100644 --- a/sdk/communication/ci.mgmt.yml +++ b/sdk/communication/ci.mgmt.yml @@ -16,7 +16,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: communication - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Communication diff --git a/sdk/containerregistry/ci.mgmt.yml b/sdk/containerregistry/ci.mgmt.yml index 0c89ba544bb1c..e3f0cfb5bfa53 100644 --- a/sdk/containerregistry/ci.mgmt.yml +++ b/sdk/containerregistry/ci.mgmt.yml @@ -18,7 +18,6 @@ extends: parameters: SDKType: mgmtclient ServiceDirectory: containerregistry - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.ContainerRegistry diff --git a/sdk/containerregistry/ci.yml b/sdk/containerregistry/ci.yml index 551184290c3d6..4cd77c7fbe781 100644 --- a/sdk/containerregistry/ci.yml +++ b/sdk/containerregistry/ci.yml @@ -30,7 +30,6 @@ extends: parameters: SDKType: client ServiceDirectory: containerregistry - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.Containers.ContainerRegistry diff --git a/sdk/dns/ci.mgmt.yml b/sdk/dns/ci.mgmt.yml index 58a0fc6446076..e23acb637d4cb 100644 --- a/sdk/dns/ci.mgmt.yml +++ b/sdk/dns/ci.mgmt.yml @@ -18,6 +18,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: dns + BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Dns diff --git a/sdk/eventhub/ci.yml b/sdk/eventhub/ci.yml index ab6cc89d3c1ad..c6fccf73fb45d 100644 --- a/sdk/eventhub/ci.yml +++ b/sdk/eventhub/ci.yml @@ -38,7 +38,6 @@ extends: parameters: SDKType: client ServiceDirectory: eventhub - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.Messaging.EventHubs diff --git a/sdk/iot/ci.yml b/sdk/iot/ci.yml index 40a020b840e69..430cc0fd1d1e1 100644 --- a/sdk/iot/ci.yml +++ b/sdk/iot/ci.yml @@ -20,8 +20,9 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: iot + BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.IoT.Hub.Service safeName: AzureIoTHubService - + diff --git a/sdk/keyvault/ci.mgmt.yml b/sdk/keyvault/ci.mgmt.yml index f044f886985b6..b48c2f8d4ff49 100644 --- a/sdk/keyvault/ci.mgmt.yml +++ b/sdk/keyvault/ci.mgmt.yml @@ -17,7 +17,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: keyvault - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.KeyVault diff --git a/sdk/keyvault/ci.yml b/sdk/keyvault/ci.yml index f80c0c8f6821e..b50d59f34f997 100644 --- a/sdk/keyvault/ci.yml +++ b/sdk/keyvault/ci.yml @@ -29,7 +29,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: keyvault - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.Security.KeyVault.Administration diff --git a/sdk/metricsadvisor/ci.yml b/sdk/metricsadvisor/ci.yml index db27a288d9898..1eb8ecb30648b 100644 --- a/sdk/metricsadvisor/ci.yml +++ b/sdk/metricsadvisor/ci.yml @@ -25,7 +25,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: metricsadvisor - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.AI.MetricsAdvisor diff --git a/sdk/purview/ci.mgmt.yml b/sdk/purview/ci.mgmt.yml index ba52c0e3bbe76..226718ca583ce 100644 --- a/sdk/purview/ci.mgmt.yml +++ b/sdk/purview/ci.mgmt.yml @@ -16,7 +16,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: purview - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Purview diff --git a/sdk/purview/ci.yml b/sdk/purview/ci.yml index a62c0919b9287..2e8c68fd81a80 100644 --- a/sdk/purview/ci.yml +++ b/sdk/purview/ci.yml @@ -28,7 +28,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: purview - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.Analytics.Purview.Share diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index 6c018fae947d8..c46c8c69cd2e3 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -17,7 +17,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: reservations - BuildSnippets: true LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Reservations diff --git a/sdk/search/ci.yml b/sdk/search/ci.yml index f46551ec3e025..c8d27585b4847 100644 --- a/sdk/search/ci.yml +++ b/sdk/search/ci.yml @@ -30,7 +30,6 @@ extends: parameters: SDKType: client ServiceDirectory: search - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.Search.Documents diff --git a/sdk/textanalytics/ci.yml b/sdk/textanalytics/ci.yml index 6f1084e959b32..5dee4971b1c91 100644 --- a/sdk/textanalytics/ci.yml +++ b/sdk/textanalytics/ci.yml @@ -25,7 +25,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: textanalytics - BuildSnippets: true ArtifactName: packages Artifacts: - name: Azure.AI.TextAnalytics From d799b9e243f59a714f32bb6e71e8231b675f5799 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Fri, 3 Feb 2023 16:58:08 -0800 Subject: [PATCH 2/3] Resolve PR feedback --- sdk/communication/ci.yml | 2 +- sdk/dns/ci.mgmt.yml | 2 +- sdk/formrecognizer/ci.yml | 2 +- sdk/iot/ci.yml | 2 +- sdk/servicebus/ci.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/communication/ci.yml b/sdk/communication/ci.yml index 270cb1a4800c8..e1d00ba3b8e4c 100644 --- a/sdk/communication/ci.yml +++ b/sdk/communication/ci.yml @@ -28,7 +28,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: communication - BuildSnippets: true + BuildSnippets: false ArtifactName: packages Artifacts: - name: Azure.Communication.JobRouter diff --git a/sdk/dns/ci.mgmt.yml b/sdk/dns/ci.mgmt.yml index e23acb637d4cb..8357809b4e6f4 100644 --- a/sdk/dns/ci.mgmt.yml +++ b/sdk/dns/ci.mgmt.yml @@ -18,7 +18,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: dns - BuildSnippets: true + BuildSnippets: false LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.Dns diff --git a/sdk/formrecognizer/ci.yml b/sdk/formrecognizer/ci.yml index 848648bcd6754..2f18e1247a23d 100644 --- a/sdk/formrecognizer/ci.yml +++ b/sdk/formrecognizer/ci.yml @@ -25,7 +25,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: formrecognizer - BuildSnippets: true + BuildSnippets: false ArtifactName: packages Artifacts: - name: Azure.AI.FormRecognizer diff --git a/sdk/iot/ci.yml b/sdk/iot/ci.yml index 430cc0fd1d1e1..eb0752bfa9c50 100644 --- a/sdk/iot/ci.yml +++ b/sdk/iot/ci.yml @@ -20,7 +20,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: iot - BuildSnippets: true + BuildSnippets: false ArtifactName: packages Artifacts: - name: Azure.IoT.Hub.Service diff --git a/sdk/servicebus/ci.yml b/sdk/servicebus/ci.yml index a542148fb3687..f1a4d3f31a39d 100644 --- a/sdk/servicebus/ci.yml +++ b/sdk/servicebus/ci.yml @@ -32,7 +32,7 @@ extends: parameters: SDKType: client ServiceDirectory: servicebus - BuildSnippets: true + BuildSnippets: false ArtifactName: packages Artifacts: - name: Azure.Messaging.ServiceBus From 442f1b7716dc9d2ad576675a476ba41e7f8b5c9a Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Fri, 3 Feb 2023 17:40:42 -0800 Subject: [PATCH 3/3] Don't build snippets for Core Core has a few issues actually compiling with SNIPPET symbol because it tries to elide some code for brevity. Fixing that changes the extracted snippets and may make the samples more confusing so leaving as-is. --- sdk/core/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/core/ci.yml b/sdk/core/ci.yml index 1ad54ad822a6d..7b8583d58a6e6 100644 --- a/sdk/core/ci.yml +++ b/sdk/core/ci.yml @@ -35,6 +35,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: core + BuildSnippets: false ArtifactName: packages Artifacts: - name: Azure.Core @@ -57,4 +58,4 @@ extends: TestSetupSteps: - template: /sdk/storage/tests-install-azurite.yml TestTimeoutInMinutes: 100 - TestDependsOnDependency: Azure.Core \ No newline at end of file + TestDependsOnDependency: Azure.Core