Skip to content

Commit d041b2f

Browse files
committed
Merge remote-tracking branch 'origin/candidate-9.4.x' into candidate-9.6.x
Signed-off-by: Jake Smith <[email protected]> # Conflicts: # commons-hpcc/pom.xml # dfsclient/pom.xml # pom.xml # wsclient/pom.xml
2 parents a27f95b + dab96b2 commit d041b2f

File tree

5 files changed

+357
-25
lines changed

5 files changed

+357
-25
lines changed

.github/workflows/Jirabot.yml

+32-22
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,7 @@ jobs:
6161
issueName = issue['key']
6262
issueFields = issue['fields']
6363
64-
try:
65-
transitionId = jira.get_transition_id_to_status_name(issue_name, desiredStatus)
66-
jira.set_issue_status_by_transition_id(issue_name, transitionId)
67-
result += 'Workflow Transition To: ' + desiredStatus + '\n'
68-
except Exception as error:
69-
transitions = jira.get_issue_transitions(issueName)
70-
result += 'Error: Transitioning to: "' + desiredStatus + '" failed with: "' + str(error) + '" Valid transitions=' + str(transitions) + '\n'
71-
72-
prFieldName = propertyMap.get('pullRequestFieldName', 'customfield_10010')
73-
74-
if prFieldName in issueFields:
75-
currentPR = issueFields[prFieldName]
76-
else:
77-
print('Error: Unable to find pull request field with field name: ' + prFieldName)
78-
currentPR = None
79-
80-
if currentPR is None:
81-
jira.update_issue_field(issueName, {prFieldName: pull_url})
82-
result += 'Updated PR\n'
83-
elif currentPR is not None and currentPR != pull_url:
84-
result += 'Additional PR: ' + pull_url + '\n'
85-
64+
# Need to update user first in case we are starting from Unresourced
8665
if prAuthor:
8766
assignee = issueFields['assignee']
8867
if assignee is None:
@@ -105,6 +84,37 @@ jobs:
10584
result += 'Changing assignee from: ' + assigneeEmail + ' to: ' + prAuthorEmail + '\n'
10685
jira.assign_issue(issueName, prAuthorId)
10786
87+
# We should be able to transition directly to Merge Pending, keeping this for future reference
88+
transitionFlow = ['Merge Pending']
89+
# statusName = str(issueFields['status']['name'])
90+
# if statusName == 'Awaiting Information' or statusName == 'Unresourced':
91+
# transitionFlow = ['Accepted', 'Active', 'Merge Pending']
92+
# elif statusName != 'Active':
93+
# transitionFlow = ['Active', 'Merge Pending']
94+
95+
for desiredStatus in transitionFlow:
96+
try:
97+
transitionId = jira.get_transition_id_to_status_name(issueName, desiredStatus)
98+
jira.set_issue_status_by_transition_id(issueName, transitionId)
99+
result += 'Workflow Transition To: ' + desiredStatus + '\n'
100+
except Exception as error:
101+
transitions = jira.get_issue_transitions(issueName)
102+
result += 'Error: Transitioning to: "' + desiredStatus + '" failed with: "' + str(error) + '" Valid transitions=' + str(transitions) + '\n'
103+
104+
prFieldName = propertyMap.get('pullRequestFieldName', 'customfield_10010')
105+
106+
if prFieldName in issueFields:
107+
currentPR = issueFields[prFieldName]
108+
else:
109+
print('Error: Unable to find pull request field with field name: ' + prFieldName)
110+
currentPR = None
111+
112+
if currentPR is None:
113+
jira.update_issue_field(issueName, {prFieldName: pull_url})
114+
result += 'Updated PR\n'
115+
elif currentPR is not None and currentPR != pull_url:
116+
result += 'Additional PR: ' + pull_url + '\n'
117+
108118
return result
109119
110120
jirabot_user = os.environ['JIRABOT_USERNAME']

.github/workflows/JirabotMerge.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ jobs:
5656
import subprocess
5757
import time
5858
import sys
59+
import json
5960
from atlassian.jira import Jira
6061
6162
def extractVersion(versionStr):
6263
parts = versionStr.split('.')
6364
if len(parts) != 3:
64-
print('Invalid version: ' + version)
65+
print('Invalid version: ' + versionStr)
6566
sys.exit(1)
6667
if parts[2].lower() == 'x':
6768
parts[2] = '0'
@@ -142,7 +143,7 @@ jobs:
142143
project = jira.get_project(projectName)
143144
projectId = project['id']
144145
jira.add_version(projectName, projectId, fixVersion)
145-
catch Exception as error:
146+
except Exception as error:
146147
print('Error: Unable to add fix version: ' + fixVersion + ' with: ' + str(error))
147148
sys.exit(1)
148149

dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java

+3
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,9 @@ private int startFetch()
922922
{
923923
try
924924
{
925+
// Read handle before closing
926+
this.dis.readInt();
927+
925928
close();
926929
}
927930
catch (IOException e)

wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsStoreClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public String[] listNamespaces(String storename, boolean global) throws Exceptio
254254
String namespaces[] = null;
255255
ListNamespacesRequest request = new ListNamespacesRequest();
256256
request.setStoreName(storename);
257-
request.setUserSpecific(global);
257+
request.setUserSpecific(!global);
258258
try
259259
{
260260
ListNamespacesResponse response = ((WsstoreStub) stub).listNamespaces(request);

0 commit comments

Comments
 (0)