Skip to content

Initial implementation of "direct" deployment backend #2926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

denik
Copy link
Contributor

@denik denik commented May 22, 2025

Changes

Add new deployment method: “direct” which deploys without terraform. It can be enabled with new env var DATABRICKS_CLI_DEPLOYMENT set to “direct”. There is partial support for jobs, pipelines, schemas and apps.

This is not intended for end users at this moment, it's a first PR in a series.

Compared to previous iteration #2791 the resources are implemented using type-safe SDK clients, not calling HTTP endpoints directly.

Why

This is going to be first developed into feature matching "terraform" and then (after deprecation period) become the only method of deployment of DABs. This deployment method addresses issues with relying on terraform such as license of terraform, having to download terraform binary and provider from the internet and in general will give us more control over deployment.

Tests

All acceptance tests by default are now run with two settings of DATABRICKS_CLI_DEPLOYMENT: “terraform” and “direct”. Some tests override this by disabling direct method.

Running all tests within a single github job caused the job time to grow non-linearly, so I’ve split each job in two - one for terraform and one for direct deployment, using ENVFILTER option to testrunner, see #2944

@denik denik temporarily deployed to test-trigger-is May 22, 2025 13:48 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 22, 2025 14:04 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 22, 2025 14:09 — with GitHub Actions Inactive
This was referenced May 22, 2025
@denik denik temporarily deployed to test-trigger-is May 22, 2025 14:37 — with GitHub Actions Inactive
github-merge-queue bot pushed a commit that referenced this pull request May 23, 2025
## Changes
- Support editing pipelines in testserver.
- Rewrite pipeline code to match best practice in testserver (separate
file in libs/testserver and separate block in handlers.go).

## Why
Enables new acceptance tests, I'm using this in terraform-removal branch
#2926

## Tests
New edit functionality is tested via
#2926
@denik denik force-pushed the denik/remove-terraform2 branch from 0107675 to 0d353f4 Compare May 23, 2025 12:09
@denik denik temporarily deployed to test-trigger-is May 23, 2025 12:09 — with GitHub Actions Inactive
github-merge-queue bot pushed a commit that referenced this pull request May 23, 2025
## Changes
A new helper to update diags from multiple threads. Also includes
shortcuts for frequently used Error and Errorf.

## Why
Simpler and less error-prone code in mutators.
Using this in #2926

## Tests
Existing tests.
@denik denik force-pushed the denik/remove-terraform2 branch from 0d353f4 to 1c15208 Compare May 23, 2025 14:37
@denik denik temporarily deployed to test-trigger-is May 23, 2025 14:37 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 23, 2025 14:58 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 23, 2025 15:05 — with GitHub Actions Inactive
@denik denik had a problem deploying to test-trigger-is May 26, 2025 07:02 — with GitHub Actions Failure
@denik denik force-pushed the denik/remove-terraform2 branch 2 times, most recently from 42ff5c9 to e1b1e62 Compare May 26, 2025 08:40
@denik denik temporarily deployed to test-trigger-is May 26, 2025 08:40 — with GitHub Actions Inactive
@denik denik force-pushed the denik/remove-terraform2 branch from e1b1e62 to 343e13d Compare May 26, 2025 08:46
@denik denik temporarily deployed to test-trigger-is May 26, 2025 08:46 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 26, 2025 09:12 — with GitHub Actions Inactive
@denik denik had a problem deploying to test-trigger-is May 26, 2025 09:19 — with GitHub Actions Failure
@denik denik temporarily deployed to test-trigger-is May 26, 2025 09:30 — with GitHub Actions Inactive
denik added a commit that referenced this pull request May 26, 2025
## Changes
- Update testserver pipeline to populate fields same way as real server
does it.
- Add new pipeline server that exercises Create and Update.
- Add new script read_id.py to get id from the state.

## Why
Using this test in #2926

## Tests
New acceptance local + integration test.
@denik denik force-pushed the denik/remove-terraform2 branch from 1f0fd3f to 46e42b5 Compare May 27, 2025 09:26
@denik denik temporarily deployed to test-trigger-is May 27, 2025 09:26 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 27, 2025 09:27 — with GitHub Actions Inactive
@denik denik force-pushed the denik/remove-terraform2 branch from f969bed to 2a7df40 Compare June 3, 2025 13:44
@denik denik temporarily deployed to test-trigger-is June 3, 2025 13:44 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 3, 2025 14:00 — with GitHub Actions Inactive
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.

1 participant