Skip to content

Commit 169539a

Browse files
Merge pull request #1820 from Azure/antmarti/onboard_by_default
Onboard new RPs for autogeneration by default
2 parents f9ced97 + f38e772 commit 169539a

13 files changed

+429
-201
lines changed

.github/workflows/autogenerateBatch0.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

generator/README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ View the Pipeline Configuration [here](/azure-pipelines-autogen.yml).
3232
3. If there are any modifications to [schemas/common/autogeneratedResources.json](/schemas/common/autogeneratedResources.json), push a commit to the autogenerate branch to make any corresponding changes to [schemas/2014-04-01-preview/deploymentTemplate.json](/schemas/2014-04-01-preview/deploymentTemplate.json) and [schemas/2015-01-01/deploymentTemplate.json](/schemas/2015-01-01/deploymentTemplate.json).
3333

3434
#### Onboarding to the autogeneration pipeline
35-
36-
1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the `generator` directory.
37-
3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
38-
4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
39-
5. Manually remove any existing references to your provider namespace (if any) from [schemas/2019-04-01/deploymentTemplate.json](/schemas/2019-04-01/deploymentTemplate.json).
40-
6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
41-
7. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include the full output saved in step 2 as a comment.
42-
8. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources have been detected and generated as expected.
35+
New resource providers are onboarded for autogeneration by default, so the only providers which have been opted out are listed in [autogenlist.ts](./autogenlist.ts) with `disabledForAutogen` set.
36+
37+
If your team has been opted out, and you would like to opt in, please raise an issue in this repo, and we will assist.
38+
39+
> The following steps are no longer necessary for onboarding, but listed here for reference:
40+
> 1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the > `generator` directory.
41+
> 3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
42+
> 4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
43+
> 5. Manually remove any existing references to your provider namespace (if any) from [schemas/2019-04-01/deploymentTemplate.> json](/schemas/2019-04-01/deploymentTemplate.json).
44+
> 6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
45+
> 7. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include > the full output saved in step 2 as a comment.
46+
> 8. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources > have been detected and generated as expected.

generator/autogenlist.ts

Lines changed: 222 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,229 @@ import { postProcessor as policyProcessor } from './processors/Microsoft.Authori
88
import { postProcessor as securityInsightsPostProcessor } from './processors/Microsoft.SecurityInsights';
99
import { lowerCaseEquals } from './utils';
1010

11+
// New providers are onboarded by default. The providers listed here are the only ones **not** onboarded.
12+
const disabledProviders: AutoGenConfig[] = [
13+
{
14+
basePath: 'advisor/resource-manager',
15+
namespace: 'Microsoft.Advisor',
16+
disabledForAutogen: true,
17+
},
18+
{
19+
basePath: 'agrifood/resource-manager',
20+
namespace: 'Microsoft.AgFoodPlatform',
21+
disabledForAutogen: true,
22+
},
23+
{
24+
basePath: 'azure-kusto/resource-manager',
25+
namespace: 'Microsoft.Kusto',
26+
disabledForAutogen: true,
27+
},
28+
{
29+
basePath: 'azurestackhci/resource-manager',
30+
namespace: 'Microsoft.AzureStackHCI',
31+
disabledForAutogen: true,
32+
},
33+
{
34+
basePath: 'baremetalinfrastructure/resource-manager',
35+
namespace: 'Microsoft.BareMetalInfrastructure',
36+
disabledForAutogen: true,
37+
},
38+
{
39+
basePath: 'cloudshell/resource-manager',
40+
namespace: 'Microsoft.Portal',
41+
disabledForAutogen: true,
42+
},
43+
{
44+
basePath: 'compute/resource-manager',
45+
namespace: 'Microsoft.Compute',
46+
disabledForAutogen: true,
47+
},
48+
{
49+
basePath: 'compute/resource-manager',
50+
namespace: 'Microsoft.ContainerService',
51+
disabledForAutogen: true,
52+
},
53+
{
54+
basePath: 'confidentialledger/resource-manager',
55+
namespace: 'Microsoft.ConfidentialLedger',
56+
disabledForAutogen: true,
57+
},
58+
{
59+
basePath: 'cost-management/resource-manager',
60+
namespace: 'Microsoft.CostManagement',
61+
disabledForAutogen: true,
62+
},
63+
{
64+
basePath: 'cpim/resource-manager',
65+
namespace: 'Microsoft.AzureActiveDirectory',
66+
disabledForAutogen: true,
67+
},
68+
{
69+
basePath: 'dataprotection/resource-manager',
70+
namespace: 'Microsoft.DataProtection',
71+
disabledForAutogen: true,
72+
},
73+
{
74+
// Disabled as the swagger spec contains a type ("DateTimeRfc1123") which autorest is unable to parse: https://github.com/Azure/autorest.azureresourceschema/issues/71
75+
basePath: 'domainservices/resource-manager',
76+
namespace: 'Microsoft.AAD',
77+
disabledForAutogen: true,
78+
},
79+
{
80+
basePath: 'dfp/resource-manager',
81+
namespace: 'Microsoft.Dynamics365Fraudprotection',
82+
disabledForAutogen: true,
83+
},
84+
{
85+
basePath: 'dnc/resource-manager',
86+
namespace: 'Microsoft.DelegatedNetwork',
87+
disabledForAutogen: true,
88+
},
89+
{
90+
basePath: 'dns/resource-manager',
91+
namespace: 'Microsoft.Network',
92+
disabledForAutogen: true,
93+
},
94+
{
95+
basePath: 'edgeorder/resource-manager',
96+
namespace: 'Microsoft.EdgeOrder',
97+
disabledForAutogen: true,
98+
},
99+
{
100+
basePath: 'edgeorderpartner/resource-manager',
101+
namespace: 'Microsoft.EdgeOrderPartner',
102+
disabledForAutogen: true,
103+
},
104+
{
105+
basePath: 'extendedlocation/resource-manager',
106+
namespace: 'Microsoft.ExtendedLocation',
107+
disabledForAutogen: true,
108+
},
109+
{
110+
basePath: 'fluidrelay/resource-manager',
111+
namespace: 'Microsoft.FluidRelay',
112+
disabledForAutogen: true,
113+
},
114+
{
115+
basePath: 'iotsecurity/resource-manager',
116+
namespace: 'Microsoft.IoTSecurity',
117+
disabledForAutogen: true,
118+
},
119+
{
120+
basePath: 'logic/resource-manager',
121+
namespace: 'Microsoft.Logic',
122+
disabledForAutogen: true,
123+
},
124+
{
125+
basePath: 'm365securityandcompliance/resource-manager',
126+
namespace: 'Microsoft.M365SecurityAndCompliance',
127+
disabledForAutogen: true,
128+
},
129+
{
130+
basePath: 'managedservices/resource-manager',
131+
namespace: 'Microsoft.ManagedServices',
132+
disabledForAutogen: true,
133+
},
134+
{
135+
basePath: 'marketplacenotifications/resource-manager',
136+
namespace: 'Microsoft.MarketplaceNotifications',
137+
disabledForAutogen: true,
138+
},
139+
{
140+
basePath: 'marketplaceordering/resource-manager',
141+
namespace: 'Microsoft.MarketplaceOrdering',
142+
disabledForAutogen: true,
143+
},
144+
{
145+
basePath: 'mediaservices/resource-manager',
146+
namespace: 'Microsoft.Media',
147+
disabledForAutogen: true,
148+
},
149+
{
150+
basePath: 'msi/resource-manager',
151+
namespace: 'Microsoft.ManagedIdentity',
152+
disabledForAutogen: true,
153+
},
154+
{
155+
basePath: 'network/resource-manager',
156+
namespace: 'Microsoft.Network',
157+
disabledForAutogen: true,
158+
},
159+
{
160+
basePath: 'operationsmanagement/resource-manager',
161+
namespace: 'Microsoft.OperationsManagement',
162+
disabledForAutogen: true,
163+
},
164+
{
165+
basePath: 'privatedns/resource-manager',
166+
namespace: 'Microsoft.Network',
167+
disabledForAutogen: true,
168+
},
169+
{
170+
basePath: 'providerhub/resource-manager',
171+
namespace: 'Microsoft.ProviderHub',
172+
disabledForAutogen: true,
173+
},
174+
{
175+
basePath: 'purview/resource-manager',
176+
namespace: 'Microsoft.Purview',
177+
disabledForAutogen: true,
178+
},
179+
{
180+
basePath: 'quota/resource-manager',
181+
namespace: 'Microsoft.Quota',
182+
disabledForAutogen: true,
183+
},
184+
{
185+
basePath: 'resources/resource-manager',
186+
namespace: 'Microsoft.Features',
187+
disabledForAutogen: true,
188+
},
189+
{
190+
basePath: 'resources/resource-manager',
191+
namespace: 'Microsoft.Solutions',
192+
disabledForAutogen: true,
193+
},
194+
{
195+
basePath: 'securityandcompliance/resource-manager',
196+
namespace: 'Microsoft.SecurityAndCompliance',
197+
disabledForAutogen: true,
198+
},
199+
{
200+
basePath: 'service-map/resource-manager',
201+
namespace: 'Microsoft.OperationalInsights',
202+
disabledForAutogen: true,
203+
},
204+
{
205+
basePath: 'servicefabricmanagedclusters/resource-manager',
206+
namespace: 'Microsoft.ServiceFabricManagedClusters',
207+
disabledForAutogen: true,
208+
},
209+
{
210+
basePath: 'testbase/resource-manager',
211+
namespace: 'Microsoft.TestBase',
212+
disabledForAutogen: true,
213+
},
214+
{
215+
basePath: 'trafficmanager/resource-manager',
216+
namespace: 'Microsoft.Network',
217+
disabledForAutogen: true,
218+
},
219+
{
220+
basePath: 'videoanalyzer/resource-manager',
221+
namespace: 'Microsoft.Media',
222+
disabledForAutogen: true,
223+
},
224+
{
225+
basePath: 'webpubsub/resource-manager',
226+
namespace: 'Microsoft.SignalRService',
227+
disabledForAutogen: true,
228+
},
229+
];
230+
11231
// Run "npm run list-basepaths" to discover all the valid readme files to add to this list
12232
const autoGenList: AutoGenConfig[] = [
233+
...disabledProviders,
13234
{
14235
basePath: 'addons/resource-manager',
15236
namespace: 'Microsoft.Addons',
@@ -268,10 +489,6 @@ const autoGenList: AutoGenConfig[] = [
268489
basePath: 'EnterpriseKnowledgeGraph/resource-manager',
269490
namespace: 'Microsoft.EnterpriseKnowledgeGraph',
270491
},
271-
/*{ NOTE(jcotillo): Temporally removing this RP - latest swagger contains an unsupported type by the schema generator tool
272-
basePath: 'domainservices/resource-manager',
273-
namespace: 'Microsoft.AAD',
274-
},*/
275492
{
276493
basePath: 'eventhub/resource-manager',
277494
namespace: 'Microsoft.EventHub',
@@ -827,7 +1044,7 @@ const autoGenList: AutoGenConfig[] = [
8271044
{
8281045
basePath: 'deviceupdate/resource-manager',
8291046
namespace: 'Microsoft.DeviceUpdate',
830-
}
1047+
},
8311048
];
8321049

8331050
export function getAutoGenList(): AutoGenConfig[] {

generator/cmd/findbasepath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ executeSynchronous(async () => {
1717

1818
const autoGenEntries = findAutogenEntries(basePath);
1919

20-
if (autoGenEntries.length === 0) {
20+
if (autoGenEntries[0]?.disabledForAutogen === true) {
2121
// not onboarded in autogeneration
2222
console.log("false");
2323
return;

0 commit comments

Comments
 (0)