Skip to content

Commit edf4ec8

Browse files
authored
Promote layered provisioning to beta (#6169)
* remove feature flag and document feature * update feature stages * update figspec
1 parent 1181471 commit edf4ec8

14 files changed

Lines changed: 114 additions & 61 deletions

cli/azd/cmd/down.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func newDownFlags(cmd *cobra.Command, global *internal.GlobalCommandOptions) *do
5555

5656
func newDownCmd() *cobra.Command {
5757
cmd := &cobra.Command{
58-
Use: "down",
58+
Use: "down [<layer>]",
5959
Short: "Delete your project's Azure resources.",
6060
}
6161
cmd.Args = cobra.MaximumNArgs(1)
@@ -114,15 +114,6 @@ func (a *downAction) Run(ctx context.Context) (*actions.ActionResult, error) {
114114
a.console.WarnForFeature(ctx, azapi.FeatureDeploymentStacks)
115115
}
116116

117-
if len(infra.Options.Layers) > 1 {
118-
if !a.alphaFeatureManager.IsEnabled(featLayers) {
119-
return nil, fmt.Errorf(
120-
"Layered provisioning is not enabled. Run '%s' to enable it.", alpha.GetEnableCommand(featLayers))
121-
}
122-
123-
a.console.WarnForFeature(ctx, featLayers)
124-
}
125-
126117
downLayer := ""
127118
if len(a.args) > 0 {
128119
downLayer = a.args[0]
@@ -168,7 +159,10 @@ func (a *downAction) Run(ctx context.Context) (*actions.ActionResult, error) {
168159
func getCmdDownHelpDescription(*cobra.Command) string {
169160
return generateCmdHelpDescription(fmt.Sprintf(
170161
"Delete Azure resources for an application. Running %s will not delete application"+
171-
" files on your local machine.", output.WithHighLightFormat("azd down")), nil)
162+
" files on your local machine.", output.WithHighLightFormat("azd down")), []string{
163+
"When <layer> is specified, only deletes resources for the given layer." +
164+
" When omitted, deletes resources for all layers defined in the project.",
165+
})
172166
}
173167

174168
func getCmdDownHelpFooter(*cobra.Command) string {

cli/azd/cmd/env.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,6 @@ func (en *envNewAction) Run(ctx context.Context) (*actions.ActionResult, error)
927927
return nil, nil
928928
}
929929

930-
var featLayers = alpha.MustFeatureKey("layers")
931-
932930
type envRefreshFlags struct {
933931
hint string
934932
layer string
@@ -939,7 +937,6 @@ type envRefreshFlags struct {
939937
func (er *envRefreshFlags) Bind(local *pflag.FlagSet, global *internal.GlobalCommandOptions) {
940938
local.StringVarP(&er.hint, "hint", "", "", "Hint to help identify the environment to refresh")
941939
local.StringVarP(&er.layer, "layer", "", "", "Provisioning layer to refresh the environment from.")
942-
_ = local.MarkHidden("layer") // alpha: featLayers
943940

944941
er.EnvFlag.Bind(local, global)
945942
er.global = global
@@ -1053,15 +1050,6 @@ func (ef *envRefreshAction) Run(ctx context.Context) (*actions.ActionResult, err
10531050
}
10541051
defer func() { _ = infra.Cleanup() }()
10551052

1056-
if len(infra.Options.Layers) > 1 {
1057-
if !ef.alphaFeatureManager.IsEnabled(featLayers) {
1058-
return nil,
1059-
fmt.Errorf("Layered provisioning is not enabled. Run '%s' to enable it.", alpha.GetEnableCommand(featLayers))
1060-
}
1061-
1062-
ef.console.WarnForFeature(ctx, featLayers)
1063-
}
1064-
10651053
layers := infra.Options.GetLayers()
10661054
if ef.flags.layer != "" {
10671055
layerOpt, err := infra.Options.GetLayer(ef.flags.layer)

cli/azd/cmd/pipeline.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,6 @@ func (p *pipelineConfigAction) Run(ctx context.Context) (*actions.ActionResult,
174174
Title: fmt.Sprintf("Configure your %s pipeline", pipelineProviderName),
175175
})
176176

177-
if len(infra.Options.Layers) > 0 {
178-
if !p.alphaFeatureManager.IsEnabled(featLayers) {
179-
return nil, fmt.Errorf(
180-
"Layered provisioning is not enabled. Run '%s' to enable it.",
181-
alpha.GetEnableCommand(featLayers))
182-
}
183-
184-
p.console.WarnForFeature(ctx, featLayers)
185-
}
186-
187177
layers := infra.Options.GetLayers()
188178
allParameters := []provisioning.Parameter{}
189179

cli/azd/cmd/testdata/TestFigSpec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ const completionSpec: Fig.Spec = {
402402
isDangerous: true,
403403
},
404404
],
405+
args: {
406+
name: 'layer',
407+
isOptional: true,
408+
},
405409
},
406410
{
407411
name: ['env'],
@@ -494,6 +498,15 @@ const completionSpec: Fig.Spec = {
494498
},
495499
],
496500
},
501+
{
502+
name: ['--layer'],
503+
description: 'Provisioning layer to refresh the environment from.',
504+
args: [
505+
{
506+
name: 'layer',
507+
},
508+
],
509+
},
497510
],
498511
args: {
499512
name: 'environment',
@@ -1268,6 +1281,10 @@ const completionSpec: Fig.Spec = {
12681281
description: 'Preview changes to Azure resources.',
12691282
},
12701283
],
1284+
args: {
1285+
name: 'layer',
1286+
isOptional: true,
1287+
},
12711288
},
12721289
{
12731290
name: ['publish'],
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
This extension provides custom commands for building AI applications using Azure Developer CLI.
3+
4+
Usage
5+
azd ai builder [flags]
6+
7+
Global Flags
8+
-C, --cwd string : Sets the current working directory.
9+
--debug : Enables debugging and diagnostics logging.
10+
--docs : Opens the documentation for azd ai builder in your web browser.
11+
-h, --help : Gets help for builder.
12+
--no-prompt : Accepts the default value instead of prompting, or it fails if there is no default.
13+
14+
Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats.
15+
16+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
This extension provides custom commands for building AI applications using Azure Developer CLI.
3+
4+
Usage
5+
azd ai [command]
6+
7+
Available Commands
8+
builder : This extension provides custom commands for building AI applications using Azure Developer CLI.
9+
10+
Global Flags
11+
-C, --cwd string : Sets the current working directory.
12+
--debug : Enables debugging and diagnostics logging.
13+
--docs : Opens the documentation for azd ai in your web browser.
14+
-h, --help : Gets help for ai.
15+
--no-prompt : Accepts the default value instead of prompting, or it fails if there is no default.
16+
17+
Use azd ai [command] --help to view examples and more information about a specific command.
18+
19+
Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats.
20+
21+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
This extension configures GitHub Copilot Coding Agent access to Azure
3+
4+
Usage
5+
azd coding-agent [flags]
6+
7+
Global Flags
8+
-C, --cwd string : Sets the current working directory.
9+
--debug : Enables debugging and diagnostics logging.
10+
--docs : Opens the documentation for azd coding-agent in your web browser.
11+
-h, --help : Gets help for coding-agent.
12+
--no-prompt : Accepts the default value instead of prompting, or it fails if there is no default.
13+
14+
Find a bug? Want to let us know how we're doing? Fill out this brief survey: https://aka.ms/azure-dev/hats.
15+
16+

cli/azd/cmd/testdata/TestUsage-azd-down.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11

22
Delete Azure resources for an application. Running azd down will not delete application files on your local machine.
33

4+
When <layer> is specified, only deletes resources for the given layer. When omitted, deletes resources for all layers defined in the project.
5+
46
Usage
5-
azd down [flags]
7+
azd down [<layer>] [flags]
68

79
Flags
810
-e, --environment string : The name of the environment to use.

cli/azd/cmd/testdata/TestUsage-azd-env-refresh.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Usage
77
Flags
88
-e, --environment string : The name of the environment to use.
99
--hint string : Hint to help identify the environment to refresh
10+
--layer string : Provisioning layer to refresh the environment from.
1011

1112
Global Flags
1213
-C, --cwd string : Sets the current working directory.

cli/azd/cmd/testdata/TestUsage-azd-provision.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ This command prompts you to input the following:
66
Azure location: The Azure location where your resources will be deployed.
77
Azure subscription: The Azure subscription where your resources will be deployed.
88

9+
When <layer> is specified, only provisions resources for the given layer. When omitted, provisions resources for all layers defined in the project.
10+
911
Usage
10-
azd provision [flags]
12+
azd provision [<layer>] [flags]
1113

1214
Flags
1315
-e, --environment string : The name of the environment to use.

0 commit comments

Comments
 (0)