Skip to content

Commit 1861dd9

Browse files
authored
Small fixes and v5.3.0 prep (#219)
* Add request timeout to cache bootstrap from URL. * Only send Slack messages if not a fork (so CI doesn't fail for contributers). * Update README.md.
1 parent c47f071 commit 1861dd9

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.github_slack_token }}
4343
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook }}
44-
if: always()
44+
if: ${{ github.event.pull_request.head.repo.full_name != 'Unleash/unleash-client-python' }} && (success() || failure())
4545

4646
tox:
4747
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v5.3.0
2+
* (Minor) Add retries to GET /features. Thanks @janboll!
3+
* (Minor) Add global segments. Thanks @sighphyre!
4+
* (Minor) Documentation updates and tweaks. Thanks @inirudebwoy, @sighphyre, @thomasheartman !
5+
16
## v5.2.0
27
* (Minor) Add support for bootstrapping UnleashClient with an initial configuration.
38
* (Minor) Add flag to disable toggle polling from server. Thanks @povilasb!

UnleashClient/cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import requests
77
from fcache.cache import FileCache as _FileCache
8-
from UnleashClient.constants import FEATURES_URL
8+
from UnleashClient.constants import FEATURES_URL, REQUEST_TIMEOUT
99

1010

1111
class BaseCache(abc.ABC):
@@ -104,7 +104,7 @@ def bootstrap_from_url(self, initial_config_url: str, headers: Optional[dict] =
104104
:param initial_configuration_url: Url that returns document containing initial configuration. Must return JSON.
105105
:param headers: Headers to use when GETing the initial configuration URL.
106106
"""
107-
response = requests.get(initial_config_url, headers=headers)
107+
response = requests.get(initial_config_url, headers=headers, timeout=REQUEST_TIMEOUT)
108108
self.set(FEATURES_URL, response.json())
109109
self.bootstrapped = True
110110

0 commit comments

Comments
 (0)