Skip to content

Commit

Permalink
Gitlab job fix - added backoff to retry on failure (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
nstawski authored Jun 12, 2023
1 parent 5cd3ec4 commit 4bdc6bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ otlp = ["opentelemetry-exporter-otlp-proto-grpc"]
jaeger = ["opentelemetry-exporter-jaeger-thrift"]

[tool.poetry.dev-dependencies]
backoff = ">=2.1.2,<2.2.0"
flake8 = "~3.7"
mypy = "0.971"
black = {version = "22.6.0", python = ">=3.7.0"}
Expand Down
5 changes: 5 additions & 0 deletions scripts/create_gh_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# limitations under the License.

from os import path
from time import sleep
from urllib3.exceptions import HTTPError

import backoff
import click
import keepachangelog
from github_release import gh_release_create
Expand Down Expand Up @@ -55,6 +58,7 @@ def print_release_details(**kwargs):
default=True,
help="Print out the release details instead of actually creating one",
)
@backoff.on_exception(backoff.expo, HTTPError, max_time=60)
def main(dry_run):
versions = get_versions()

Expand All @@ -72,6 +76,7 @@ def main(dry_run):
action = print_release_details
if not dry_run:
action = gh_release_create
sleep(5)
action(
repo_name="signalfx/splunk-otel-python",
tag_name=git_tag,
Expand Down

0 comments on commit 4bdc6bb

Please sign in to comment.