Skip to content

Commit

Permalink
version bump (#403)
Browse files Browse the repository at this point in the history
* version bump

* handle zero-byte json as not found error

---------

Co-authored-by: John Readey <[email protected]>
  • Loading branch information
jreadey and John Readey authored Dec 3, 2024
1 parent 6f8d445 commit 0106277
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 36 deletions.
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion hsds/basenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .util.k8sClient import getDnLabelSelector, getPodIps
from . import hsds_logger as log

HSDS_VERSION = "0.9.0.beta1"
HSDS_VERSION = "0.9.1"


def getVersion():
Expand Down
9 changes: 8 additions & 1 deletion hsds/util/storUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import numcodecs as codecs
import bitshuffle
from json import JSONDecodeError
from aiohttp.web_exceptions import HTTPInternalServerError
from aiohttp.web_exceptions import HTTPInternalServerError, HTTPNotFound

from .. import hsds_logger as log
from .s3Client import S3Client
Expand Down Expand Up @@ -425,6 +425,13 @@ async def getStorJSONObj(app, key, bucket=None):

data = await client.get_object(key, bucket=bucket)

if len(data) == 0:
# treat a zero-byte file as not found for JSON
# seems with posix drivers we can sometimes get a file result
# before any data gets written to it
log.warn(f"zero bytes returned for key: {key} bucket:{bucket}")
raise HTTPNotFound()

try:
json_dict = json.loads(data.decode("utf8"))
except UnicodeDecodeError:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
version = "0.8.5"
version = "0.9.1"

dependencies = [
"aiohttp == 3.9.4",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ azure-storage-blob
cryptography
h5py>=3.6.0
numcodecs
numpy
numpy>=2.0.0rc1
psutil
pyjwt
pytz
Expand Down

0 comments on commit 0106277

Please sign in to comment.