Repository navigation
Description
Describe the issue
When uploading large amounts of wheels, the cli errors sporadically with http2 REFUSED_STREAM errors. When this happens the artifacts have been uploaded but the bundle files have not been updated to reference them. The old artifacts are deleted, so the bundle is left in a broken state.
It's difficult to reproduce since it's a transient http2 error. About one in 200-500 deploys hits this issue. It always appears on a GET request to /api/2.0/workspace/get-status. It may be an sdk issue with the retries on databricks.WorkspaceClient.
It seems like the deployment should be rolled back if it fails mid-deploy. Or the requests retried more gracefully. Maybe a configuration option for number of retries could be implemented?
Here's the edited output from a failed deployment.
Building project...
Building python_deps...
...
Lots of artifact uploads
Uploading ...-py3-none-any.whl...
Uploading ...-py3-none-any.whl...
Uploading ...-py3-none-any.whl...
Uploading ...-py3-none-any.whl...
Uploading ...-py3-none-any.whl...
Uploading ...-py3-none-any.whl...
...
Uploading bundle files to /Workspace/<CENSORED>.bundle/files...
Error: Get "https://<CENSORED>.cloud.databricks.com/api/2.0/workspace/get-status?path=<CENSORED>.bundle%2Ffiles": stream error: stream ID 287; REFUSED_STREAM; received from peerConfiguration
Put a lot of wheels in the directory. An example is a requirements file with 100+ dependencies. With the build looking something like this.
artifacts:
project:
type: whl
build: |
uv build . --wheel --out-dir dist
path: .
files:
- source: ./dist/*.whl
python_deps:
type: whl
path: .
# TODO: uncomment if deps need updated, takes forever to plan
build: |
python -m pip download \
-r requirements.txt \
--no-deps \
--only-binary :all: \
--platform manylinux_2_28_x86_64 \
--platform manylinux_2_27_x86_64 \
--platform manylinux_2_17_x86_64 \
--platform manylinux2014_x86_64 \
--python-version 3.12 \
--implementation cp \
--abi none \
--abi abi3 \
--abi "cp312" \
-d dist_deps
files:
- source: ./dist_deps/*Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
- Run
databricks bundle deploy ... - Get a stream error
- The bundle is now out of sync with the artifacts
Expected Behavior
Roll back the deploy or retry the request.
Actual Behavior
Prod is broken, need to redeploy to fix.
OS and CLI version
Linux, tested on 0.298.0 and latest 1.14.1
Is this a regression?
No
Debug Logs
This happens in CI, haven't been able to reproduce it with debug logs.
Activity
andrewnester commentedon Sep 2, 2026
We have a new feature called immutable folder which allows bundle to deploy to unique location and change the resources referencing the artifacts atomically, this would prevent this issue. Please give it a try.
#5254
jmahlik commentedon Sep 2, 2026
It does sound like that would solve the problem. I just gave it a shot. Unfortunately, the bundle is too large in this case. Looks like the size limit is 100MB but the bundle is about 250MB.
pietern commentedon Oct 9, 2026
@jmahlik A couple of questions:
Our SDK (via Go's stdlib) already retries on
REFUSED_STREAMbut in this case it seems like the server continues to return the same error, exhausting Go's own retries, and then failing. We're looking into adding another retry one level up where we can force the underlying connection to be recreated. Answers to the above questions would be helpful in dialing in on the root cause. Thanks!jmahlik commentedon Oct 12, 2026
About 30 seconds from artifact upload until uploads complete.
No for the cases where we see this failing. I've tested behind a proxy and works the same. Hard to reproduce the issue because it's sprious.
janniklasrose commentedon Oct 14, 2026
Hi @jmahlik, an update on our side:
This week's release will include #6149 which changes the underlying file import API and hopefully makes file uploads more stable.
#7014 is also in flight and adds retries on
bundle deploy.#7044 should fix the /get-status errors
Retry workspace get-status on transient failures during sync
Retry workspace get-status on transient failures during sync
retry: scope get-status transport retry to REFUSED_STREAM
Retry workspace get-status on transient failures during sync (databri…
andrewnester commentedon Oct 19, 2026
The fix was released in the latest CLI version, please give it a try and if the issue persists feel free to reopen the issue