Skip to content

Commit

Permalink
chore: v0.13.1 bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Aug 31, 2021
1 parent f6fcbb2 commit a0b2829
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## v0.13.1 (2021-08-30)

* Corrected a container naming bug that could make compose containers fail their healthchecks due to mismatched container names
* Small enhancements and cleanup throughout the project

## v0.13.0 (2021-08-26)

* Corrects encoding of test logs, binary data should no longer show in the output (closes #4)
Expand Down
6 changes: 4 additions & 2 deletions harvey/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Global:
DOCKER_VERSION = 'v1.41' # Docker API version
# TODO: Figure out how to sync this version number with the one in `setup.py`
HARVEY_VERSION = '0.13.0' # Harvey release
HARVEY_VERSION = '0.13.1' # Harvey release
PROJECTS_PATH = 'projects'
PROJECTS_LOG_PATH = 'logs/projects'
HARVEY_LOG_PATH = 'logs/harvey'
Expand Down Expand Up @@ -71,8 +71,10 @@ def docker_project_name(webhook):
NOTE: (From the Docker API docs) - Because Docker container names must be unique, you cannot scale a
service beyond 1 container if you have specified a custom name. Attempting to do so results in an error.
TODO: Investigate why some container names have a `_1` appended and others don't (Docker's default behavior?)
"""
project_name = f'harvey_{Global.repo_owner_name(webhook)}_{Global.repo_name(webhook)}_1'
project_name = f'harvey_{Global.repo_owner_name(webhook)}_{Global.repo_name(webhook)}'

# We strip non-alphanumeric characters in the name because Docker does the same
strip_non_alphanumeric = re.compile('[^a-zA-Z0-9_-]')
Expand Down
5 changes: 3 additions & 2 deletions harvey/stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ def run_container_healthcheck(webhook, retry_attempt=0):
if container_state and container_state['Running'] is True:
container_healthy = True
elif retry_attempt < max_retries:
# TODO: This is a great spot for logging what container is failing and what attempt it is
# TODO: This is a great spot for logging what container is failing, what attempt it's on,
# and why it's failing with some helpful data
retry_attempt += 1
time.sleep(5)
time.sleep(3)
DeployStage.run_container_healthcheck(webhook, retry_attempt)

return container_healthy
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

setuptools.setup(
name='harvey-ci',
version='0.13.0',
version='0.13.1',
description='Your personal CI/CD and Docker orchestration platform.',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_repo_commit_id(mock_webhook):
def test_docker_project_name(mock_webhook):
result = Global.docker_project_name(mock_webhook)

assert result == 'harvey_test_owner_test-repo-name_1'
assert result == 'harvey_test_owner_test-repo-name'


def test_github_webhook_ip_ranges():
Expand Down

0 comments on commit a0b2829

Please sign in to comment.