Repository navigation
Conversation
denik
added this pull request to stack #7089
October 16, 2026 09:24
denik
removed this pull request from stack #7089
October 16, 2026 09:31
denik
force-pushed
the
denik/state-dir-not-a-file
branch
from
October 16, 2026 09:39
2be277b to
96dead2
Compare
denik
added this pull request to stack #7091
October 16, 2026 09:39
Collaborator
Integration test reportCommit: 12aa36b
Top 6 slowest tests (at least 2 minutes):
|
The workspace exports a directory as a ZIP archive even with direct_download=true, so since the state read stopped calling get-status first, a directory there failed with a JSON parse error on the archive. Recognize the ZIP header and say what is wrong. The test server now exports directories the same way. Co-authored-by: Isaac <no-reply@databricks.com>
denik
force-pushed
the
denik/state-dir-not-a-file
branch
from
October 16, 2026 10:57
96dead2 to
12aa36b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
When a remote state file fails to parse and starts with a ZIP header, report
not a file: the workspace has a directory at this path. The test server now exports a directory as a ZIP archive, as the real API does.Why
On a real workspace,
/workspace/export?direct_download=trueof a directory returns 200 with a ZIP archive rather than an error (checked on a real workspace; a missing path returns 404RESOURCE_DOES_NOT_EXIST). That is what the get-status guard from #449 protected against; since #7075 dropped it, a directory failed withparsing state: invalid character 'P'. This brings the clear message back without the extra request.Tests
New
acceptance/bundle/state/directory_at_state_path, a cloud test; passes locally and against a real workspace, fails without the fix.This pull request and its description were written by Isaac.