Skip to content

Commit

Permalink
logging: version bump, remove retry on part upload
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-ya committed May 21, 2024
1 parent 57d20a8 commit a73dd85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion outpostcli/constants.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cli_version = "0.0.47"
cli_version = "0.0.48"
CLI_BINARY_NAME = "outpostcli"
12 changes: 7 additions & 5 deletions outpostcli/lfs/part.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import logging
from dataclasses import dataclass

import requests
from outpostkit.repository.lfs.logger import create_lfs_logger
from tenacity import retry, stop_after_attempt, wait_exponential
from tenacity import before_sleep_log, retry, stop_after_attempt, wait_exponential

from outpostcli.lfs.exc import ProxyLFSException, handle_request_errors
from outpostcli.lfs.file_slice import FileSlice
Expand All @@ -21,10 +22,11 @@ class PartInfo:


@handle_request_errors
@retry(
stop=stop_after_attempt(4), # Maximum number of retries
wait=wait_exponential(multiplier=1, min=1, max=60), # Exponential backoff
)
# @retry(
# stop=stop_after_attempt(4), # Maximum number of retries
# wait=wait_exponential(multiplier=1, min=4, max=60), # Exponential backoff
# before_sleep=before_sleep_log(_log, logging.INFO, exc_info=True),
# )
def retriable_upload_part(url: str, data: FileSlice):
r = requests.put(url, data=data)
r.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "outpostcli"
version = "0.0.47"
version = "0.0.48"
description = "CLI for Outpost"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="outpostcli",
version="0.0.47",
version="0.0.48",
py_modules=["outpostcli"],
install_requires=["Click", "outpostkit"],
entry_points={
Expand Down

0 comments on commit a73dd85

Please sign in to comment.