Skip to content

Add bundle deployment auto-deploy get and list - #8186

Open
atreyadbrx wants to merge 1 commit into
dabs-ad-d4-dep-pr3-createfrom
dabs-ad-d4-dep-pr4-get-list
Open

atreyadbrx wants to merge 1 commit into
dabs-ad-d4-dep-pr3-createfrom
dabs-ad-d4-dep-pr4-get-list

Conversation

@atreyadbrx

@atreyadbrx atreyadbrx commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This is #7941 under bundle deployment.

Changes

  • get shows the trigger of the bundle target. list lists the triggers of all the bundle's targets.
  • Both call ListWebhookTriggers with an AIP-160 filter on the repo URL and bundle path, plus the target for get. get stops at the first match, since the service keeps one trigger per target. Its "no trigger" error suggests the create command, including -p when it was passed. Both support text and -o json output. list covers the selected target's origin and workspace, as its help says.
  • The fake list handler follows the service: it pages over all triggers, returns the matches on each page, and lists only the caller's triggers. It parses only the quoted values and \"/\\ escapes the service takes, and rejects a repeated field and a bad page token.

Why

Users need to see what auto-deploy is set up for a bundle. The service keeps at most one trigger per repository and target, so a target filter is enough for get. The service returns deploy_as only for a service principal, so an unset value shows as "its creator".

Tests

  • acceptance/bundle/deployment/auto-deploy/get: a target with no trigger, text output, and -o json.
  • acceptance/bundle/deployment/auto-deploy/list: two targets, plus another bundle in the same repo whose trigger is left out. The fake's one-item pages exercise the client's paging.
  • Unit test for filter-string quoting.
  • Also run against a staging workspace that serves the API, on existing triggers: get, list and their -o json read the service's responses as expected, including the GITHUB enum, deploy_as for a service principal, and the "no trigger" error.

Stacked on #8185.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 86128aa83 | Workflow run

Selected 3 changed tests (limit=20, 0 not selected)

3 tests: regression=3 unreleased=0 coverage=0 failing=0
test branch main (4c4f104) latest (v1.28.0)
TestAccept/bundle/deployment/auto-deploy/create ✅ ❌ ❌
TestAccept/bundle/deployment/auto-deploy/get ✅ ❌ ❌
TestAccept/bundle/deployment/auto-deploy/list ✅ ❌ ❌
TestAccept/bundle/deployment/auto-deploy/create: branch ✅ | main (4c4f104) ❌ | latest (v1.28.0) ❌

main (4c4f104):

acceptance_test.go:1402: Diff:
        --- bundle/deployment/auto-deploy/create/output.txt
        +++ /tmp/TestAcceptbundledeploymentauto-deploycreate2856525476/002/output.txt
        @@ -2,289 +2,41 @@
         === The current branch, as the caller
         
         >>> [CLI] bundle deployment auto-deploy create
        -Pushes to branch main now deploy target dev as you.
        -Trigger ID: [UUID][0]
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "dev"
        -      }
        -    }
        -  }
        -}
        +Deployment related commands for managing bundle resource bindings.
         
        -=== Updating the trigger keeps its ID
        +Use these commands to bind / unbind bundle definitions to existing workspace resources.
         
        ->>> [CLI] bundle deployment auto-deploy create --branch release --deploy-as [UUID][1]
        -Pushes to branch release now deploy target dev as [UUID][1].
        -Trigger ID: [UUID][0]
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "release"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "dev",
        -        "deploy_as": {
        -          "service_principal_client_id": "[UUID][1]"
        -        }
        -      }
        -    }
        -  }
        -}
        +Common workflow:
        +1. Generate configuration from existing resource:
        +   databricks bundle generate job --existing-job-id 12345 --key my_job
         
        -=== As yourself, in JSON
        +2. Bind the bundle resource to the existing workspace resource:
        +   databricks bundle deployment bind my_job 12345
         
        ->>> [CLI] bundle deployment auto-deploy create -t prod --deploy-as [USERNAME] -o json
        -{
        -  "webhook_id": "[UUID][2]",
        -  "trigger_id": "[UUID][3]"
        -}
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "prod",
        -        "deploy_as": {
        -          "user_email": "[USERNAME]"
        -        }
        -      }
        -    }
        -  }
        -}
        +3. Deploy updates - the bound resource will be updated in the workspace:
        +   databricks bundle deploy
         
        -=== As a service principal, on a production target that a user could not deploy
        +After binding, the existing workspace resource will be managed by your bundle.
         
        ->>> [CLI] bundle deployment auto-deploy create -t prod --deploy-as [UUID][1]
        -Pushes to branch main now deploy target prod as [UUID][1].
        -Trigger ID: [UUID][3]
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "prod",
        -        "deploy_as": {
        -          "service_principal_client_id": "[UUID][1]"
        -        }
        -      }
        -    }
        -  }
        -}
        +Usage:
        +  databricks bundle deployment [command]
         
        -=== As another user
        +Available Commands:
        +  bind        Bind bundle-defined resources to existing resources
        +  migrate     Migrate from Terraform to Direct deployment engine
        +  unbind      Unbind bundle-defined resources from its managed remote resource
         
        ->>> musterr [CLI] bundle deployment auto-deploy create -t prod --deploy-as someone@example.com
        -Error: deploy_as.user_email must be your own email. To deploy as another identity, use a service principal you have the Service Principal User role on.
        +Flags:
        +  -h, --help[=true|false]   help for deployment
         
        -Host:      [DATABRICKS_URL]
        -Auth type: Personal Access Token (pat)
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +      --var strings          set values for variables defined in bundle config. Example: --var="foo=bar"
         
        -Next steps:
        -  - Verify you have the required permissions for this operation
        -  - Check your identity: databricks auth describe
        -  - Consider setting up a profile: databricks auth login --profile <name>
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "prod",
        -        "deploy_as": {
        -          "user_email": "someone@example.com"
        -        }
        -      }
        -    }
        -  }
        -}
        +Use "databricks bundle deployment [command] --help" for more information about a command.
        +File [OUTPUT_DIR]/out.requests.txt not found
         
        -=== A branch other than the target's git.branch
        -
        ->>> musterr [CLI] bundle deployment auto-deploy create -t prod --branch release
        -Error: git.branch is main for target prod, so a deploy from release would fail. Omit --branch, or change git.branch
        -
        -=== A git.branch from a variable
        -
        ->>> [CLI] bundle deployment auto-deploy create -t staging
        -Pushes to branch release now deploy target staging as you.
        -Trigger ID: [UUID][4]
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "release"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "staging"
        -      }
        -    }
        -  }
        -}
        -
        -=== A git.branch that resolves to empty leaves the current branch
        -
        ->>> [CLI] bundle deployment auto-deploy create -t unpinned
        -Pushes to branch main now deploy target unpinned as you.
        -Trigger ID: [UUID][5]
        -
... (120 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0): same output as main (4c4f104)

TestAccept/bundle/deployment/auto-deploy/get: branch ✅ | main (4c4f104) ❌ | latest (v1.28.0) ❌

main (4c4f104):

acceptance_test.go:1402: Diff:
        --- bundle/deployment/auto-deploy/get/output.txt
        +++ /tmp/TestAcceptbundledeploymentauto-deployget1141351433/002/output.txt
        @@ -2,84 +2,42 @@
         === A target without a trigger
         
         >>> musterr [CLI] bundle deployment auto-deploy get
        -Error: target dev has no auto-deploy trigger that you can view. To create one, run: databricks bundle deployment auto-deploy create -t dev
        +Deployment related commands for managing bundle resource bindings.
         
        -=== The target's trigger
        +Use these commands to bind / unbind bundle definitions to existing workspace resources.
         
        ->>> [CLI] bundle deployment auto-deploy get
        -Trigger ID: [UUID][0]
        -Repository: https://github.com/acme/repo
        -Bundle:     databricks.yml
        -Target:     dev
        -Branch:     main
        -Deploy as:  you or a user
        +Common workflow:
        +1. Generate configuration from existing resource:
        +   databricks bundle generate job --existing-job-id 12345 --key my_job
         
        ->>> [CLI] bundle deployment auto-deploy get -t prod
        -Trigger ID: [UUID][1]
        -Repository: https://github.com/acme/repo
        -Bundle:     databricks.yml
        -Target:     prod
        -Branch:     main
        -Deploy as:  [UUID][2]
        +2. Bind the bundle resource to the existing workspace resource:
        +   databricks bundle deployment bind my_job 12345
         
        ->>> [CLI] bundle deployment auto-deploy get -t prod -o json
        -{
        -  "name": "webhook-triggers/[UUID][1]",
        -  "repo_url": "https://github.com/acme/repo",
        -  "git_provider": "GITHUB",
        -  "trigger_config": {
        -    "push_event": {
        -      "branch": "main"
        -    },
        -    "dabs_deploy": {
        -      "bundle_yml_repo_path": "databricks.yml",
        -      "deployment_mode": "prod",
        -      "deploy_as": {
        -        "service_principal_client_id": "[UUID][2]"
        -      }
        -    },
        -    "trigger_id": "[UUID][1]"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\" AND trigger_config.dabs_deploy.deployment_mode = \"dev\""
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\" AND trigger_config.dabs_deploy.deployment_mode = \"prod\""
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\" AND trigger_config.dabs_deploy.deployment_mode = \"prod\"",
        -    "page_token": "1"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\" AND trigger_config.dabs_deploy.deployment_mode = \"prod\""
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\" AND trigger_config.dabs_deploy.deployment_mode = \"prod\"",
        -    "page_token": "1"
        -  }
        -}
        +3. Deploy updates - the bound resource will be updated in the workspace:
        +   databricks bundle deploy
         
        -=== Another caller does not see the trigger
        +After binding, the existing workspace resource will be managed by your bundle.
         
        ->>> musterr as-test-sp [CLI] bundle deployment auto-deploy get
        -Error: target dev has no auto-deploy trigger that you can view. To create one, run: databricks bundle deployment auto-deploy create -t dev
        +Usage:
        +  databricks bundle deployment [command]
        +
        +Available Commands:
        +  bind        Bind bundle-defined resources to existing resources
        +  migrate     Migrate from Terraform to Direct deployment engine
        +  unbind      Unbind bundle-defined resources from its managed remote resource
        +
        +Flags:
        +  -h, --help[=true|false]   help for deployment
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +      --var strings          set values for variables defined in bundle config. Example: --var="foo=bar"
        +
        +Use "databricks bundle deployment [command] --help" for more information about a command.
        +
        +Unexpected success
        +
        +Exit code: 1
        
FAIL

latest (v1.28.0): same output as main (4c4f104)

TestAccept/bundle/deployment/auto-deploy/list: branch ✅ | main (4c4f104) ❌ | latest (v1.28.0) ❌

main (4c4f104):

acceptance_test.go:1402: Diff:
        --- bundle/deployment/auto-deploy/list/output.txt
        +++ /tmp/TestAcceptbundledeploymentauto-deploylist1793721319/002/output.txt
        @@ -2,114 +2,41 @@
         === A bundle without triggers
         
         >>> [CLI] bundle deployment auto-deploy list
        -Target  Branch  Deploy as  Trigger ID
        +Deployment related commands for managing bundle resource bindings.
         
        -=== Another bundle in the same repository, whose trigger is not this bundle's
        +Use these commands to bind / unbind bundle definitions to existing workspace resources.
         
        ->>> withdir other [CLI] bundle deployment auto-deploy create
        -Pushes to branch main now deploy target dev as you.
        -Trigger ID: [UUID][0]
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/git-webhooks",
        -  "body": {
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "other/databricks.yml",
        -        "deployment_mode": "dev"
        -      }
        -    }
        -  }
        -}
        +Common workflow:
        +1. Generate configuration from existing resource:
        +   databricks bundle generate job --existing-job-id 12345 --key my_job
         
        -=== The triggers of this bundle's targets
        +2. Bind the bundle resource to the existing workspace resource:
        +   databricks bundle deployment bind my_job 12345
         
        ->>> [CLI] bundle deployment auto-deploy list
        -Target  Branch  Deploy as      Trigger ID
        -dev     main    you or a user  [UUID][1]
        -prod    main    you or a user  [UUID][2]
        +3. Deploy updates - the bound resource will be updated in the workspace:
        +   databricks bundle deploy
         
        ->>> [CLI] bundle deployment auto-deploy list -o json
        -[
        -  {
        -    "name": "webhook-triggers/[UUID][1]",
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "dev"
        -      },
        -      "trigger_id": "[UUID][1]"
        -    }
        -  },
        -  {
        -    "name": "webhook-triggers/[UUID][2]",
        -    "repo_url": "https://github.com/acme/repo",
        -    "git_provider": "GITHUB",
        -    "trigger_config": {
        -      "push_event": {
        -        "branch": "main"
        -      },
        -      "dabs_deploy": {
        -        "bundle_yml_repo_path": "databricks.yml",
        -        "deployment_mode": "prod"
        -      },
        -      "trigger_id": "[UUID][2]"
        -    }
        -  }
        -]
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\""
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\"",
        -    "page_token": "1"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\"",
        -    "page_token": "2"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\""
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\"",
        -    "page_token": "1"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/git-webhooks/webhook-triggers",
        -  "q": {
        -    "filter": "repo_url = \"https://github.com/acme/repo\" AND trigger_config.dabs_deploy.bundle_yml_repo_path = \"databricks.yml\"",
        -    "page_token": "2"
        -  }
        -}
        +After binding, the existing workspace resource will be managed by your bundle.
        +
        +Usage:
        +  databricks bundle deployment [command]
        +
        +Available Commands:
        +  bind        Bind bundle-defined resources to existing resources
        +  migrate     Migrate from Terraform to Direct deployment engine
        +  unbind      Unbind bundle-defined resources from its managed remote resource
        +
        +Flags:
        +  -h, --help[=true|false]   help for deployment
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +      --var strings          set values for variables defined in bundle config. Example: --var="foo=bar"
        +
        +Use "databricks bundle deployment [command] --help" for more information about a command.
        +rm: cannot remove '[OUTPUT_DIR]/out.requests.txt': No such file or directory
        +
        +Exit code: 1
        
    acceptance_test.go:1180: 
        LOG.setup: Deployment related commands for managing bundle resource bindings.
        LOG.setup: 
        LOG.setup: Use these commands to bind / unbind bundle definitions to existing workspace resources.
        LOG.setup: 
        LOG.setup: Common workflow:
        LOG.setup: 1. Generate configuration from existing resource:
        LOG.setup:    databricks bundle generate job --existing-job-id 12345 --key my_job
        LOG.setup: 
        LOG.setup: 2. Bind the bundle resource to the existing workspace resource:
        LOG.setup:    databricks bundle deployment bind my_job 12345
        LOG.setup: 
        LOG.setup: 3. Deploy updates - the bound resource will be updated in the workspace:
        LOG.setup:    databricks bundle deploy
        LOG.setup: 
        LOG.setup: After binding, the existing workspace resource will be managed by your bundle.
        LOG.setup: 
        LOG.setup: Usage:
        LOG.setup:   databricks bundle deployment [command]
        LOG.setup: 
        LOG.setup: Available Commands:
        LOG.setup:   bind        Bind bundle-defined resources to existing resources
        LOG.setup:   migrate     Migrate from Terraform to Direct deployment engine
        LOG.setup:   unbind      Unbind bundle-defined resources from its managed remote resource
        LOG.setup: 
        LOG.setup: Flags:
        LOG.setup:   -h, --help[=true|false]   help for deployment
        LOG.setup: 
        LOG.setup: Global Flags:
        LOG.setup:       --debug[=true|false]   enable debug logging
        LOG.setup:   -o, --output type          output type: text or json (default text)
        LOG.setup:   -p, --profile string       ~/.databrickscfg profile
        LOG.setup:   -t, --target string        bundle target to use (if applicable)
        LOG.setup:       --var strings          set values for variables defined in bundle config. Example: --var="foo=bar"
        LOG.setup: 
        LOG.setup: Use "databricks bundle deployment [command] --help" for more information about a command.
        LOG.setup: Deployment related commands for managing bundle resource bindings.
        LOG.setup: 
        LOG.setup: Use these commands to bind / unbind bundle definitions to existing workspace resources.
        LOG.setup: 
        LOG.setup: Common workflow:
        LOG.setup: 1. Generate configuration from existing resource:
        LOG.setup:    databricks bundle generate job --existing-job-id 12345 --key my_job
        LOG.setup: 
        LOG.setup: 2. Bind the bundle resource to the existing workspace resource:
        LOG.setup:    databricks bundle deployment bind my_job 12345
        LOG.setup: 
        LOG.setup: 3. Deploy updates - the bound resource will be updated in the workspace:
... (23 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0): same output as main (4c4f104)

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 77d4c74. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR adds bundle deployment auto-deploy get and list. Both use ListWebhookTriggers with an AIP-160 filter, and the PR adds a paging fake that filters by creator to test them. The listing and lookup paths look right. Two things are worth fixing before merge, neither blocking: the "you or a user" text in the Deploy as field, and the unquoted values in the suggested create command, which also has no test for the -p case.


// The service shows deploy_as only for a service principal other than the caller, so an unset
// value is the caller or a user, which an admin's update can make someone other than the creator.
const deployAsTemplate = `{{with .TriggerConfig.DabsDeploy.DeployAs}}{{.ServicePrincipalClientID}}{{else}}you or a user{{end}}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] When an admin runs list (or get) on triggers that other users created without --deploy-as, every row reads "you or a user", even though the deploys don't run as the admin. It also disagrees with create, which prints "as you" for the same trigger, and with the PR description, which says "its creator". Can we pick one wording that is true when the service omits deploy_as (for example "a user (not shown)") and use it in create's message too? Also, the template renders only ServicePrincipalClientID. If a response ever sets user_email, with takes that branch and the field prints empty, so {{or .ServicePrincipalClientID .UserEmail}} would cost little.


// createCommand is the command that creates the trigger of the bundle's target.
func (t trigger) createCommand() string {
command := "databricks bundle deployment auto-deploy create -t " + t.target

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] get -p 'production workspace' on a target with no trigger suggests ... create -t dev -p production workspace. Pasting that splits the profile into two arguments, so create fails. Shell characters in a target or profile name would change what the command does. getCommonArgs in cmd/bundle/deployment/migrate.go already quotes these flags with shellquote.BashArg. Can we do the same here, and add a get -p <profile> case to the get acceptance test? Right now nothing covers the -p part of this hint.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 86128aa

Run: 46397356917

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 173 20 4:04
💚​ aws-windows-latest-4core-16gb 1 173 20 1:31
💚​ azure linux-2core-8gb 1 172 20 3:59
💚​ azure-windows-latest-4core-16gb 1 172 20 1:22
💚​ gcp linux-2core-8gb 1 173 20 4:18
💚​ gcp-windows-latest-4core-16gb 1 173 20 2:11
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
4:18 gcp linux-2core-8gb TestAccept
4:04 aws linux-2core-8gb TestAccept
3:59 azure linux-2core-8gb TestAccept

`get` shows the trigger of the bundle target and `list` lists the triggers of
all the bundle's targets. Both call ListWebhookTriggers, filtered on the
bundle's repository and path, plus the target for `get`.

The fake list handler supports the filter fields the CLI sends and returns
one trigger per page, so the CLI's paging is exercised.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: atreyadbrx <atreya.misra@databricks.com>
@atreyadbrx
atreyadbrx force-pushed the dabs-ad-d4-dep-pr3-create branch from 31284b0 to 6568c9d Compare November 30, 2026 10:07
@atreyadbrx
atreyadbrx force-pushed the dabs-ad-d4-dep-pr4-get-list branch from 77d4c74 to 86128aa Compare November 30, 2026 10:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants