Skip to content

Commit 52ed9e8

Browse files
authored
Merge branch 'Azure:main' into feature/side-panel-view
2 parents 3b9e2f3 + 294c6b5 commit 52ed9e8

File tree

260 files changed

+26982
-9608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+26982
-9608
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,16 @@ func TestMyFunction(t *testing.T) {
198198
When asked to prepare a release changelog, use the appropriate custom agent instructions:
199199
- `.github/agents/changelog-core.agent.md` for core CLI releases
200200
- `.github/agents/changelog-extension.agent.md` for extension releases
201+
202+
## Extensions Development
203+
204+
### Building Extensions
205+
Extensions are located in `extensions/` directory and use the extension framework:
206+
```bash
207+
# Build and install extension (example using demo extension)
208+
cd extensions/microsoft.azd.demo
209+
azd x build
210+
211+
# Test extension (using extension's namespace from extension.yaml)
212+
azd demo <command>
213+
```

.github/workflows/devcontainer-feature-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
matrix:
1717
baseImage:
1818
[
19-
"ubuntu:focal",
19+
"ubuntu:noble",
2020
"ubuntu:jammy",
21-
"ubuntu:bionic",
21+
"debian:13",
22+
"debian:12",
2223
"debian:11",
23-
"debian:10",
2424
"mcr.microsoft.com/devcontainers/base:ubuntu",
2525
"mcr.microsoft.com/devcontainers/base:debian",
2626
]

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ cli/azd/extensions/microsoft.azd.ai.builder/microsoft.azd.ai.builder
6767
cli/azd/extensions/microsoft.azd.ai.builder/microsoft.azd.ai.builder.exe
6868
cli/azd/extensions/microsoft.azd.demo/microsoft.azd.demo
6969
cli/azd/extensions/microsoft.azd.demo/microsoft.azd.demo.exe
70-
cli/azd/extensions/microsoft.azd.concurx/concurx
71-
cli/azd/extensions/microsoft.azd.concurx/concurx.exe
70+
cli/azd/extensions/microsoft.azd.concurx/microsoft.azd.concurx
71+
cli/azd/extensions/microsoft.azd.concurx/microsoft.azd.concurx.exe
7272
cli/azd/azd-test
73+
cli/azd/azd

.vscode/cspell-devops-ext.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
vsix
2-
tsbuildinfo
3-
codepaths
41
azuretools
2+
codepaths
3+
LASTEXITCODE
4+
tmrm
5+
toolrunner
6+
TOOLSDIRECTORY
7+
tsbuildinfo
8+
vsix

cli/azd/.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ All Go files must include Microsoft copyright header:
9696
// Licensed under the MIT License.
9797
```
9898

99+
## Extensions Development
100+
101+
### Building Extensions
102+
Extensions are located in `extensions/` directory and use the extension framework:
103+
```bash
104+
# Build and install extension (example using demo extension)
105+
cd extensions/microsoft.azd.demo
106+
azd x build
107+
108+
# Test extension (using extension's namespace from extension.yaml)
109+
azd demo <command>
110+
```
111+
99112
## MCP Tools Development
100113

101114
### Tool Pattern

cli/azd/.vscode/cspell.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ words:
4545
- jsonschema
4646
- rustc
4747
- figspec
48+
- finetune
49+
- bubbletea
50+
- lipgloss
51+
- gopxl
4852
languageSettings:
4953
- languageId: go
5054
ignoreRegExpList:
@@ -243,6 +247,12 @@ overrides:
243247
- userosscache
244248
- docstates
245249
- dylib
250+
- filename: docs/recording-functional-tests-guide.md
251+
words:
252+
- httptest
253+
- Logf
254+
- Getenv
255+
- httptest
246256
ignorePaths:
247257
- "**/*_test.go"
248258
- "**/mock*.go"

cli/azd/AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Agent Development Guide
2+
3+
A file for [guiding coding agents](https://agents.md/).
4+
5+
## Commands
6+
7+
- **Build:** `go build`
8+
- **Test (Golang):** `go test ./... -short`
9+
- **Test -- include functional end-to-end tests (Golang)**: `go test ./...`
10+
- **Cspell check**: `cspell lint "**/*.go" --relative --config ./.vscode/cspell.yaml`
11+
- **Linter**: `golangci-lint run ./...`
12+
13+
## Directory Structure
14+
15+
- Functional tests: `test/`
16+
- Docs: `docs/`

cli/azd/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 1.23.0-beta.1 (Unreleased)
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
### Bugs Fixed
10+
11+
### Other Changes
12+
313
## 1.22.5 (2025-12-18)
414

515
### Bugs Fixed

cli/azd/cmd/auth.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ func authActions(root *actions.ActionDescriptor) *actions.ActionDescriptor {
3636
DefaultFormat: output.NoneFormat,
3737
})
3838

39+
group.Add("status", &actions.ActionDescriptorOptions{
40+
Command: newAuthStatusCmd(),
41+
FlagsResolver: newAuthStatusFlags,
42+
ActionResolver: newAuthStatusAction,
43+
OutputFormats: []output.Format{output.JsonFormat, output.NoneFormat},
44+
DefaultFormat: output.NoneFormat,
45+
})
46+
3947
group.Add("logout", &actions.ActionDescriptorOptions{
4048
Command: newLogoutCmd("auth"),
4149
ActionResolver: newLogoutAction,

cli/azd/cmd/auth_login.go

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,6 @@ func (lf *loginFlags) Bind(local *pflag.FlagSet, global *internal.GlobalCommandO
196196
lf.global = global
197197
}
198198

199-
func newLoginFlags(cmd *cobra.Command, global *internal.GlobalCommandOptions) *loginFlags {
200-
flags := &loginFlags{}
201-
flags.Bind(cmd.Flags(), global)
202-
203-
return flags
204-
}
205-
206199
func newLoginCmd(parent string) *cobra.Command {
207200
return &cobra.Command{
208201
Use: "login",
@@ -237,9 +230,6 @@ type loginAction struct {
237230
commandRunner exec.CommandRunner
238231
}
239232

240-
// it is important to update both newAuthLoginAction and newLoginAction at the same time
241-
// newAuthLoginAction is the action that is bound to `azd auth login`,
242-
// and newLoginAction is the action that is bound to `azd login`
243233
func newAuthLoginAction(
244234
formatter output.Formatter,
245235
writer io.Writer,
@@ -262,32 +252,36 @@ func newAuthLoginAction(
262252
}
263253
}
264254

265-
// it is important to update both newAuthLoginAction and newLoginAction at the same time
266-
// newAuthLoginAction is the action that is bound to `azd auth login`,
267-
// and newLoginAction is the action that is bound to `azd login`
268-
func newLoginAction(
269-
formatter output.Formatter,
270-
writer io.Writer,
271-
authManager *auth.Manager,
272-
accountSubManager *account.SubscriptionsManager,
273-
flags *loginFlags,
274-
console input.Console,
275-
annotations CmdAnnotations,
276-
commandRunner exec.CommandRunner,
277-
) actions.Action {
278-
return &loginAction{
279-
formatter: formatter,
280-
writer: writer,
281-
console: console,
282-
authManager: authManager,
283-
accountSubManager: accountSubManager,
284-
flags: flags,
285-
annotations: annotations,
286-
commandRunner: commandRunner,
255+
func (la *loginAction) Run(ctx context.Context) (*actions.ActionResult, error) {
256+
loginMode, err := la.authManager.Mode()
257+
if err != nil {
258+
return nil, err
259+
}
260+
if loginMode != auth.AzdBuiltIn && !la.flags.onlyCheckStatus {
261+
la.console.MessageUxItem(ctx, &ux.WarningAltMessage{
262+
Message: fmt.Sprintf(
263+
"azd is not using the built-in authentication mode, but rather '%s'", loginMode),
264+
})
265+
la.console.Message(ctx, "If you want to use 'azd auth login', you need to disable the current auth mode.")
266+
response, err := la.console.Confirm(ctx, input.ConsoleOptions{
267+
Message: "Do you want to switch back to azd built-in authentication?",
268+
DefaultValue: false,
269+
Help: "azd supports multiple authentication modes, including " + string(auth.AzDelegated) + " and " +
270+
string(auth.ExternalRequest) + " for Auth." +
271+
" Switching back to azd built-in authentication will try to disable the current mode.",
272+
})
273+
if err != nil {
274+
return nil, err
275+
}
276+
if !response {
277+
return nil, fmt.Errorf("log in is not supported on current mode: %s", loginMode)
278+
}
279+
if err := la.authManager.SetBuiltInAuthMode(); err != nil {
280+
return nil, fmt.Errorf("setting auth mode: %w", err)
281+
}
282+
la.console.Message(ctx, "Authentication mode set to azd built-in. Continuing login...")
287283
}
288-
}
289284

290-
func (la *loginAction) Run(ctx context.Context) (*actions.ActionResult, error) {
291285
if len(la.flags.scopes) == 0 {
292286
la.flags.scopes = la.authManager.LoginScopes()
293287
}

0 commit comments

Comments
 (0)