Skip to content

Commit b024b55

Browse files
authored
databricks-cli: build Replit fork from source, skip tests (#483)
2 parents 143c07c + ca55fab commit b024b55

1 file changed

Lines changed: 28 additions & 45 deletions

File tree

pkgs/modules/databricks-cli/default.nix

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
{ pkgs, lib, ... }:
22

33
let
4-
version = "0.286.0";
4+
# Replit fork of databricks/cli, based on upstream v0.299.0 plus the
5+
# `sync: add --concurrency and --retry-timeout flags` patch (#1) that
6+
# pid2's deploy path needs.
7+
#
8+
# See https://github.com/replit/databricks-cli/releases for tags. To bump:
9+
# rebase replit/databricks-cli `main` onto a newer upstream tag, retag
10+
# vX.Y.Z-replit.<n>, push, then update version + hash + vendorHash here.
11+
version = "0.299.0-replit.1";
512
databricks-cli = pkgs.buildGoModule {
613
pname = "databricks-cli";
714
inherit version;
815

916
src = pkgs.fetchFromGitHub {
10-
owner = "databricks";
11-
repo = "cli";
17+
owner = "replit";
18+
repo = "databricks-cli";
1219
rev = "v${version}";
13-
hash = "sha256-iCmxHjIYznqed6BMQKtuYHJNFPy+3XrNzSXfhtyzPJk=";
20+
hash = "sha256-mrsxKw9pIgP14SBQH4+OAGpBPfKINtVACXMR7qEhfLY=";
1421
};
1522

16-
vendorHash = "sha256-TNUI2VQVKnxTiKQg9Bj3qDK2w3oOjO0rdrtTlFIhTzA=";
23+
vendorHash = "sha256-IcKEzXfmReVCUzMyPC3Y2BRXWwGoB8Gdd3y5p6FtxI0=";
1724

1825
excludedPackages = [
1926
"bundle/internal"
@@ -36,49 +43,21 @@ let
3643
mv "$GOPATH/bin/cli" "$GOPATH/bin/databricks"
3744
'';
3845

39-
checkFlags =
40-
"-skip="
41-
+ (lib.concatStringsSep "|" [
42-
# Need network
43-
"TestConsistentDatabricksSdkVersion"
44-
"TestTerraformArchiveChecksums"
45-
"TestExpandPipelineGlobPaths"
46-
"TestRelativePathTranslationDefault"
47-
"TestRelativePathTranslationOverride"
48-
"TestWorkspaceVerifyProfileForHost"
49-
"TestWorkspaceVerifyProfileForHost/default_config_file_with_match"
50-
"TestWorkspaceResolveProfileFromHost"
51-
"TestWorkspaceResolveProfileFromHost/no_config_file"
52-
"TestBundleConfigureDefault"
53-
# Use uv venv which doesn't work with nix
54-
# https://github.com/astral-sh/uv/issues/4450
55-
"TestVenvSuccess"
56-
"TestPatchWheel"
57-
# Fails in nix sandbox due to missing home/cache directory
58-
"TestCacheDirEnvVar"
59-
]);
60-
61-
nativeCheckInputs = [
62-
pkgs.gitMinimal
63-
(pkgs.python3.withPackages (
64-
ps: with ps; [
65-
setuptools
66-
wheel
67-
]
68-
))
69-
];
70-
71-
preCheck = ''
72-
# Some tests depend on git and remote url
73-
git init
74-
git remote add origin https://github.com/databricks/cli.git
75-
'';
46+
# Tests are skipped in the nix sandbox. The Databricks CLI test suite
47+
# has a long tail of tests that try to resolve workspace clients, hit
48+
# the network, or otherwise depend on a working environment that the
49+
# nix sandbox does not provide. Each upstream bump tends to add new
50+
# offenders; rather than maintain an ever-growing -skip= regex (and
51+
# debug new entries on every rebase), we trust upstream's CI and skip
52+
# the whole checkPhase. Same pattern as `pkgs/modules/python/uv` and
53+
# the docker stack.
54+
doCheck = false;
7655

7756
meta = {
78-
description = "Databricks CLI";
57+
description = "Databricks CLI (Replit fork)";
7958
mainProgram = "databricks";
80-
homepage = "https://github.com/databricks/cli";
81-
changelog = "https://github.com/databricks/cli/releases/tag/v${version}";
59+
homepage = "https://github.com/replit/databricks-cli";
60+
changelog = "https://github.com/replit/databricks-cli/releases/tag/v${version}";
8261
license = lib.licenses.databricks;
8362
};
8463
};
@@ -91,6 +70,10 @@ in
9170
Databricks. It provides commands to manage Databricks resources
9271
such as workspaces, jobs, clusters, libraries, and Databricks
9372
apps from the command line.
73+
74+
This is the Replit fork (https://github.com/replit/databricks-cli),
75+
based on upstream v0.299.0 with the --concurrency and --retry-timeout
76+
flags added to `databricks sync` for faster, more reliable deploys.
9477
'';
9578
displayVersion = version;
9679

0 commit comments

Comments
 (0)