Skip to content

Commit ee54223

Browse files
authored
Merge branch 'main' into denik/terraform-no-plan-version
2 parents ce7fe72 + 644a4fb commit ee54223

4 files changed

Lines changed: 393 additions & 309 deletions

File tree

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,55 @@
11
name: start-integration-tests
22

33
on:
4-
#schedule:
5-
# - cron: '*/10 * * * *'
64
workflow_dispatch:
5+
merge_group:
76

87
jobs:
9-
# Trigger for pull requests.
10-
#
8+
# Auto-approve integration tests for merge queue.
9+
# The tests already passed on the PR, so we don't need to run them again.
10+
auto-approve:
11+
if: github.event_name == 'merge_group'
12+
13+
runs-on:
14+
group: databricks-deco-testing-runner-group
15+
labels: ubuntu-latest-deco
16+
17+
permissions:
18+
checks: write
19+
contents: read
20+
21+
steps:
22+
- name: Auto-approve Check for Merge Queue
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
await github.rest.checks.create({
27+
owner: context.repo.owner,
28+
repo: context.repo.repo,
29+
name: 'Integration Tests',
30+
head_sha: context.sha,
31+
status: 'completed',
32+
conclusion: 'success',
33+
output: {
34+
title: 'Integration Tests',
35+
summary: 'Auto-approved for merge queue (tests already passed on PR)'
36+
}
37+
});
38+
39+
# Trigger integration tests for PRs.
1140
# This workflow triggers the integration test workflow in a different repository.
1241
# It requires secrets from the "test-trigger-is" environment, which are only available to authorized users.
1342
trigger:
43+
if: github.event_name == 'workflow_dispatch'
44+
1445
runs-on:
1546
group: databricks-deco-testing-runner-group
1647
labels: ubuntu-latest-deco
1748

1849
environment: "test-trigger-is"
1950

20-
# Only run this job for PRs from branches on the main repository and not from forks.
21-
# Workflows triggered by PRs from forks don't have access to the "test-trigger-is" environment.
22-
if: "${{ !github.event.pull_request.head.repo.fork }}"
23-
2451
steps:
25-
- name: Generate GitHub App Token
52+
- name: Generate GitHub App Token for Workflow Trigger
2653
id: generate-token
2754
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
2855
with:
@@ -31,11 +58,20 @@ jobs:
3158
owner: ${{ secrets.ORG_NAME }}
3259
repositories: ${{secrets.REPO_NAME}}
3360

61+
- name: Generate GitHub App Token for Check Updates
62+
id: generate-check-token
63+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
64+
with:
65+
app-id: ${{ secrets.DECO_TEST_APPROVAL_APP_ID }}
66+
private-key: ${{ secrets.DECO_TEST_APPROVAL_PRIVATE_KEY }}
67+
owner: databricks
68+
3469
- name: Fetch start_integration_tests.py
3570
run: wget https://raw.githubusercontent.com/databricks/cli/refs/heads/main/tools/start_integration_tests.py
3671

3772
- name: Run start_integration_tests.py
3873
env:
3974
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
75+
GH_CHECK_TOKEN: ${{ steps.generate-check-token.outputs.token }}
4076
run: |-
4177
python3 ./start_integration_tests.py -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} --yes

experimental/aitools/cmd/install.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"time"
88

99
"github.com/databricks/cli/experimental/aitools/lib/agents"
10+
"github.com/databricks/cli/libs/agent"
1011
"github.com/databricks/cli/libs/cmdio"
1112
"github.com/fatih/color"
1213
"github.com/spf13/cobra"
@@ -29,24 +30,25 @@ func runInstall(ctx context.Context) error {
2930
// Check for non-interactive mode with agent detection
3031
// If running in an AI agent, install automatically without prompts
3132
if !cmdio.IsPromptSupported(ctx) {
32-
if os.Getenv("CLAUDECODE") != "" {
33+
switch agent.Product(ctx) {
34+
case agent.ClaudeCode:
3335
if err := agents.InstallClaude(); err != nil {
3436
return err
3537
}
3638
cmdio.LogString(ctx, color.GreenString("✓ Installed Databricks MCP server for Claude Code"))
3739
cmdio.LogString(ctx, color.YellowString("⚠️ Please restart Claude Code for changes to take effect"))
3840
return nil
39-
}
40-
if os.Getenv("CURSOR_AGENT") != "" {
41+
case agent.Cursor:
4142
if err := agents.InstallCursor(); err != nil {
4243
return err
4344
}
4445
cmdio.LogString(ctx, color.GreenString("✓ Installed Databricks MCP server for Cursor"))
4546
cmdio.LogString(ctx, color.YellowString("⚠️ Please restart Cursor for changes to take effect"))
4647
return nil
48+
default:
49+
// Unknown agent in non-interactive mode - show manual instructions
50+
return agents.ShowCustomInstructions(ctx)
4751
}
48-
// Unknown agent in non-interactive mode - show manual instructions
49-
return agents.ShowCustomInstructions(ctx)
5052
}
5153

5254
cmdio.LogString(ctx, "")

0 commit comments

Comments
 (0)