Skip to content

Commit

Permalink
fix git version fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-v committed Jan 28, 2023
1 parent dfaabe5 commit a6f0395
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.git
# .git
.cache
static
hoover/search/static
Expand Down
8 changes: 8 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ name: build
depends_on:
- static-tests

clone:
depth: 5000

steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags

# - name: GH CR docker push branch
# image: plugins/docker
# settings:
Expand Down
14 changes: 11 additions & 3 deletions hoover/search/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,17 @@ def span(self, *args, **kwds):
finally:
if we_are_first:
log.debug('destroying tracer for module %s...', self.name)
trace.get_tracer_provider().force_flush()
trace.get_tracer_provider().shutdown()
local.tracer = None
try:
trace.get_tracer_provider().force_flush()
trace.get_tracer_provider().shutdown()
# the ProxyTracerProvider we get when no tracing is configured
# doesn't have these methods.
except AttributeError:
pass
except Exception as e:
log.warning('tracer shutdown exception: ' + str(e))
finally:
local.tracer = None

def wrap_function(self):
"""Returns a function wrapper that has a telemetry span around the function.
Expand Down

0 comments on commit a6f0395

Please sign in to comment.