Skip to content

Commit f3fbfac

Browse files
committed
Merge branch 'release/2.28.1'
2 parents 9a252c0 + bb96057 commit f3fbfac

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

backslash/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.28.0'
1+
__version__ = '2.28.1'

backslash/client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def delete_comment(self, comment_id):
3636
self.api.call_function('delete_comment', {'comment_id': comment_id})
3737

3838
def report_session_start(self, logical_id=NOTHING,
39+
parent_logical_id=NOTHING,
3940
hostname=NOTHING,
4041
total_num_tests=NOTHING,
4142
user_email=NOTHING,
@@ -48,7 +49,7 @@ def report_session_start(self, logical_id=NOTHING,
4849
4950
:rtype: A session object representing the reported session
5051
"""
51-
returned = self.api.call_function('report_session_start', {
52+
params = {
5253
'hostname': hostname,
5354
'logical_id': logical_id,
5455
'total_num_tests': total_num_tests,
@@ -57,7 +58,14 @@ def report_session_start(self, logical_id=NOTHING,
5758
'keepalive_interval': keepalive_interval,
5859
'subjects': subjects,
5960
'infrastructure': infrastructure,
60-
})
61+
}
62+
if parent_logical_id is not None:
63+
supports_parent_logical_id = (self.api.info().endpoints.report_session_start.version >= 2)
64+
65+
if supports_parent_logical_id:
66+
params['parent_logical_id'] = parent_logical_id
67+
68+
returned = self.api.call_function('report_session_start', params)
6169
return returned
6270

6371
def query_sessions(self):

backslash/contrib/slash_plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ def deactivate(self):
9999
@handle_exceptions
100100
def session_start(self):
101101
metadata = self._get_initial_session_metadata()
102+
parent_logical_id = getattr(slash.context.session, 'parent_session_id', None)
102103
try:
103104
self.session = self.client.report_session_start(
104105
logical_id=slash.context.session.id,
106+
parent_logical_id=parent_logical_id,
105107
total_num_tests=slash.context.session.get_total_num_tests(),
106108
hostname=socket.getfqdn(),
107109
keepalive_interval=self._keepalive_interval,

0 commit comments

Comments
 (0)