Commit Graph

1883 Commits

Author SHA1 Message Date
Lennart Kats (databricks) ce7e64062b
Change warning about incomplete permissions section into a recommendation (#2043)
## Changes

Changes the warning about an incomplete / implicit permissions section
into a recommendation, and does a minor bit of cleanup.

## Tests
New unit test.
2025-02-24 09:39:03 +00:00
Lennart Kats (databricks) 6e18d94264
Refine `mode: production` diagnostic output (#2236)
## Changes

This refines the `mode: production` diagnostic output now that the
`Detail` property is rendered as output. This is a follow-up to
https://github.com/databricks/cli/pull/1712.
2025-02-24 08:33:13 +00:00
Lennart Kats (databricks) f99716b0a5
Remove `run_as` from the built-in templates (#2044)
## Changes

This removes the `run-as` property from the default templates. It's a
useful property but it still only works for jobs and it makes the
default databricks.yml a bit longer. It seems like users can just learn
about it from the docs and/or vary their deployment identity.

Depends on https://github.com/databricks/cli/pull/1712.
2025-02-24 08:31:46 +00:00
Shreyas Goenka 69f5b037e6
remove log line 2025-02-21 18:08:00 +01:00
Shreyas Goenka 68646a583d
remove leaking logs 2025-02-21 18:05:42 +01:00
Shreyas Goenka ae8ebaa757
add acc test for oauth' 2025-02-21 16:58:45 +01:00
Shreyas Goenka 5056070d11
remove user agent from telemetry tests 2025-02-21 16:48:30 +01:00
Shreyas Goenka 5ee52acacf
remove parent child selftest commands 2025-02-21 15:57:30 +01:00
Shreyas Goenka d7abb3bd97
remove daemon acceptance tests 2025-02-21 15:56:28 +01:00
Shreyas Goenka 96ade4eee6
merge 2025-02-21 15:55:30 +01:00
shreyas-goenka ddcfac5069
Add library for spawning a daemon (#2354)
## Changes
This PR adds a library for spawning a daemon process. Our needs are
different from those of a typical daemon process in that we want to
handle being orphaned gracefully. This is because, in the vast majority
of telemetry use cases, the main CLI process (i.e., the parent process)
will exit before the telemetry process has a chance to finish uploading
the logs.

To achieve this we "detach" the child process from the parent process,
which requires different flags for UNIX vs. non-unix systems.

Here are the properties that we want to ensure for our telemetry
child/daemon processes:
1. They do not block the parent process. 
Reason: The main CLI process should not be blocked on the telemetry
child process.
2. The child can read from stdin. The parent can write to stdin. 
Reason: Telemetry logs will be passed to the child process via stdin.
3. Output logs do not leak from the child process.
    Reason: Telemetry logs should not be visible to users of the CLI.

## Tests
Unit test
2025-02-21 13:49:47 +00:00
Shreyas Goenka 18748f7879
rename 2025-02-18 17:26:16 +01:00
Ilya Kuznetsov 874a05a27b
Add escaping for links and headers in docsgen (#2330)
## Changes

To avoid build warnings and errors in docs build we need to escape
symbols that are treated as syntax elements

## Tests
<!-- How is this tested? -->
2025-02-18 16:12:49 +00:00
Shreyas Goenka 3cfeb640e1
add skip functionality 2025-02-18 16:47:47 +01:00
Shreyas Goenka a98993abfc
- 2025-02-18 16:35:14 +01:00
Shreyas Goenka 520f06905b
use daemon 2025-02-18 16:30:50 +01:00
Shreyas Goenka f48fbb950b
merge daemon 2025-02-18 16:06:24 +01:00
Shreyas Goenka 8a0b359f8f
Merge remote-tracking branch 'origin' into async-logger-clean 2025-02-18 16:04:50 +01:00
Shreyas Goenka 12f1fbdece
- 2025-02-18 15:02:56 +01:00
Shreyas Goenka 86428dab79
- 2025-02-18 15:02:37 +01:00
Shreyas Goenka f504343774
- 2025-02-18 14:59:54 +01:00
Shreyas Goenka dfd26e37ae
- 2025-02-18 14:59:29 +01:00
Shreyas Goenka c59b11f7c1
- 2025-02-18 14:52:25 +01:00
Shreyas Goenka 608f0ad94f
- 2025-02-18 14:51:03 +01:00
Shreyas Goenka 8eb454da14
- 2025-02-18 14:50:02 +01:00
Shreyas Goenka f6bd82d68f
add readme 2025-02-18 14:49:24 +01:00
Shreyas Goenka e649fc056b
- 2025-02-18 14:34:13 +01:00
Shreyas Goenka 75f3008b66
- 2025-02-18 14:33:41 +01:00
Shreyas Goenka 11af4ba964
delay closing output log file 2025-02-18 14:32:16 +01:00
Shreyas Goenka 6f63e14cb7
- 2025-02-18 14:26:56 +01:00
Shreyas Goenka f6a02237cf
extend timeout to 1 minute 2025-02-18 14:13:01 +01:00
Shreyas Goenka 50308f25a1
- 2025-02-18 13:17:14 +01:00
Shreyas Goenka b130787318
- 2025-02-18 13:16:35 +01:00
Shreyas Goenka a4009ed6fa
use script to wait 2025-02-18 13:14:29 +01:00
Shreyas Goenka 07141ba7ad
skip wait test on windows 2025-02-18 10:44:10 +01:00
Shreyas Goenka 403c1b2a0c
- 2025-02-17 23:02:17 +01:00
Shreyas Goenka a9ccc3285b
-' 2025-02-17 19:48:58 +01:00
Shreyas Goenka 2c7126991b
- 2025-02-17 19:39:18 +01:00
Shreyas Goenka ecbbee1bb3
more test 2025-02-17 19:38:33 +01:00
Shreyas Goenka 42c526f40f
- 2025-02-17 19:28:20 +01:00
Shreyas Goenka 3c4443c13f
cleanup 2025-02-17 19:27:53 +01:00
Shreyas Goenka e970a129af
- 2025-02-17 19:26:06 +01:00
Shreyas Goenka d15ff75f3b
- 2025-02-17 19:24:51 +01:00
Shreyas Goenka de6ebdb44e
Merge remote-tracking branch 'origin' into daemon-library 2025-02-17 19:24:31 +01:00
Shreyas Goenka 533e7be51b
- 2025-02-17 19:24:11 +01:00
Shreyas Goenka 6148681ed1
implement 2025-02-17 19:23:02 +01:00
Lennart Kats (databricks) bc30d44097
Provide instructions for testing in the default-python template (#2355)
## Changes
Adds instructions for testing to the default-python template.

## Tests
- Unit & acceptance tests.
2025-02-17 12:38:03 +00:00
Denis Bilenko c0a56a93fb
acc: add a helper to diff with replacements (#2352)
## Changes

diff.py is like "diff -r -U2" but it applies replacements first to the
argument.

This allows comparing different output files and directories but ignore
differences that are going to be replaced by placeholders.

This is useful for tests that record large amount of files, specifically
"bundle init" with standard templates. In those tests, changing one
parameter results in a small diff so recording the full directory is not
helpful, because it's hard to see what changed there. I'm using it in
implementation of serverless mode for templates that need it: #2348 The
serverless templates are slightly different from classic, capturing the
diff helps to see exactly where.

Related small changes:
- Add [TESTROOT] replacement for absolute path to acceptance directory
in git repo.
- Add $TESTDIR env var for absolute path to a given test in git repo.

## Tests
- New test acceptance/selftest/diff to test the helper.
- Via #2348 which makes use of this feature.
2025-02-14 11:02:12 +00:00
Shreyas Goenka d86ccf6b49
Add library for spawning a daemon 2025-02-13 19:00:13 +01:00
Denis Bilenko 2d09636611
acc: do not show diff for missing output file (#2350)
It's not interesting since it just dumps what is in the repo. This is
especially annoying with bundle/templates tests with a lot of files.
2025-02-13 07:31:04 +00:00