Skip to content

Commit 2caaa8f

Browse files
authored
Bug/290 fixed listing files in bucket fs for empty bucket location (#291)
* #290: Fixed listing files in BucketFS for empty bucket location * Prepare release 2.2.1
1 parent 17581a8 commit 2caaa8f

File tree

6 files changed

+53
-3
lines changed

6 files changed

+53
-3
lines changed

.scs-complete.bash

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
_scs_completion() {
2+
local IFS=$'\n'
3+
local response
4+
5+
response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _SCS_COMPLETE=bash_complete $1)
6+
7+
for completion in $response; do
8+
IFS=',' read type value <<< "$completion"
9+
10+
if [[ $type == 'dir' ]]; then
11+
COMPREPLY=()
12+
compopt -o dirnames
13+
elif [[ $type == 'file' ]]; then
14+
COMPREPLY=()
15+
compopt -o default
16+
elif [[ $type == 'plain' ]]; then
17+
COMPREPLY+=($value)
18+
fi
19+
done
20+
21+
return 0
22+
}
23+
24+
_scs_completion_setup() {
25+
complete -o nosort -F _scs_completion scs
26+
}
27+
28+
_scs_completion_setup;
29+

doc/changes/changelog.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/changes/changes_2.2.1.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 2.2.1 - 2025-10-24
2+
3+
## Summary
4+
5+
This release fixes a bug when checking access to an empty BucketFS in CLI command `scs check --connect`.
6+
7+
## Bugfixes
8+
9+
* #290: Fixed listing files in BucketFS for empty bucket location

exasol/nb_connector/cli/processing/bucketfs_access.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,19 @@ def random_file_name(other_than: list[str]) -> str:
2222
return result
2323

2424

25+
from collections.abc import Iterator
26+
27+
28+
def files_in(bfsloc: bfs.path.PathLike) -> list[bfs.path.PathLike]:
29+
try:
30+
return list(bfsloc.iterdir())
31+
except FileNotFoundError:
32+
return []
33+
34+
2535
def verify_bucketfs_access(scs: Secrets) -> None:
2636
bfs_root = open_bucketfs_location(scs)
27-
existing = [f.name for f in bfs_root.iterdir()]
37+
existing = [f.name for f in files_in(bfs_root)]
2838
file = bfs_root / random_file_name(other_than=existing)
2939
content = random_string(length=100)
3040
try:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "exasol-notebook-connector"
3-
version = "2.2.0"
3+
version = "2.2.1"
44
requires-python = ">=3.10,<3.13"
55
description = "Components, tools, APIs, and configurations in order to connect Jupyter notebooks to Exasol and various other systems."
66
packages = [{ include = "exasol" }, ]

version.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)