[robo] Work-around for conflicting reconsiders crashing: only look for user workspaces on the commit server, not on edges.

#ROBOMERGE-AUTHOR: james.hopkin
#ROBOMERGE-SOURCE: CL 19570697
#ROBOMERGE-BOT: (v937-19513599)

[CL 19570709 by james hopkin in ue5-main branch]
This commit is contained in:
james hopkin
2022-03-31 05:34:47 -04:00
parent f9e99a0d06
commit b89f196c3f
2 changed files with 8 additions and 2 deletions

View File

@@ -567,8 +567,12 @@ export class PerforceContext {
args.push('-a')
}
let opts: ExecZtagOpts = { multiline: true }
if (edgeServerAddress && edgeServerAddress !== 'commit') {
opts.edgeServerAddress = edgeServerAddress
}
let parsedClients = await this._execP4Ztag(null, args, { multiline: true, edgeServerAddress });
let parsedClients = await this._execP4Ztag(null, args, opts);
let workspaces = [];
for (let clientDef of parsedClients) {
if (clientDef.client) {

View File

@@ -828,7 +828,9 @@ class EdgeBotImpl extends PerforceStatefulBot {
// Find a suitable workspace from one of the owner's workspaces
else {
// use p4.find_workspaces to find a workspace (owned by the user) for this change if this is a stream branch
const workspaces: ClientSpec[] = await this.p4.find_workspaces(owner)
// not supporting edge servers yet - really need to send a separate shelf request instead
// so specify to only look for workspaces on the commit server
const workspaces: ClientSpec[] = await this.p4.find_workspaces(owner, 'commit')
if (workspaces.length > 0) {
// default to the first workspace