Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get and pass traceparent to osbs tasks #266

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
engine: docker

- name: fedora
version: 32
version: 36
python: 3
engine: docker

- name: fedora
version: 33
version: 37
python: 3
engine: docker

Expand Down
19 changes: 17 additions & 2 deletions koji_containerbuild/plugins/builder_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,10 @@ def osbs(self):
conf_section = DEFAULT_CONF_BINARY_SECTION
elif self.method in BuildSourceContainerTask.Methods:
conf_section = DEFAULT_CONF_SOURCE_SECTION

os_conf = Configuration(conf_section=conf_section)
self._osbs = OSBS(os_conf)
# figure out where to get this from brew otel
traceparent = ''
self._osbs = OSBS(os_conf, traceparent=traceparent)
if not self._osbs:
msg = 'Could not successfully instantiate `osbs`'
raise ContainerError(msg)
Expand Down Expand Up @@ -1011,6 +1012,13 @@ def handler(self, src, target, opts=None):
userdata=opts.get('userdata', None),
)

# need brew instrumentation to be completed to know where we will get this from
traceparent = ''
if traceparent:
kwargs.update({
'traceparent': traceparent,
})

result = self.createContainer(**kwargs)

self.logger.debug("Result: %r", result)
Expand Down Expand Up @@ -1190,6 +1198,13 @@ def handler(self, target, opts=None):
userdata=opts.get('userdata', None),
)

# need brew instrumentation to be completed to know where we will get this from
traceparent = ''
if traceparent:
kwargs.update({
'traceparent': traceparent,
})

result = self.createSourceContainer(**kwargs)

self.logger.debug("Result: %r", result)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
jsonschema
six
koji>=1.26
otel-extensions