Update projectId processing
Some checks are pending
Build and test GAM / build (Win64, build, 9, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 3, linux-aarch64, [self-hosted linux arm64]) (push) Waiting to run
Build and test GAM / build (aarch64, build, 5, linux-aarch64, [self-hosted linux arm64], yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 7, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-15) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 4, linux-x86_64, ubuntu-22.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 6, darwin64-x86_64, macos-13) (push) Waiting to run
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.9) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run

With `PROJECTID_PATTERN = re.compile(r'^[a-z][a-z0-9-]{4,99}[a-z0-9]$')`, the max projectid length is 101

Delete debugging prints
This commit is contained in:
Ross Scroggs
2024-12-03 20:12:27 -08:00
parent ff3f31cf9e
commit 25fdd76af0

View File

@@ -11472,7 +11472,6 @@ def _generateProjectSvcAcctId(prefix):
return f'{prefix}-{"".join(random.choice(LOWERNUMERIC_CHARS) for _ in range(5))}'
def _getLoginHintProjectInfo(createCmd):
print('a')
login_hint = None
create_key = True
appInfo = {'applicationTitle': '', 'supportEmail': ''}
@@ -11485,9 +11484,7 @@ def _getLoginHintProjectInfo(createCmd):
if login_hint and login_hint.find('@') == -1:
Cmd.Backup()
login_hint = None
print(1)
projectInfo['projectId'] = getString(Cmd.OB_STRING, optional=True, minLen=6, maxLen=999999).strip()
print(2)
projectInfo['projectId'] = getString(Cmd.OB_STRING, optional=True, minLen=6, maxLen=101).strip()
if projectInfo['projectId']:
_checkProjectId(projectInfo['projectId'])
checkForExtraneousArguments()
@@ -11499,7 +11496,7 @@ def _getLoginHintProjectInfo(createCmd):
elif myarg == 'nokey':
create_key = False
elif myarg == 'project':
projectInfo['projectId'] = getString(Cmd.OB_STRING, minLen=6, maxLen=9999)
projectInfo['projectId'] = getString(Cmd.OB_STRING, minLen=6, maxLen=101)
_checkProjectId(projectInfo['projectId'])
elif createCmd and myarg == 'parent':
projectInfo['parent'] = getString(Cmd.OB_STRING)
@@ -11515,7 +11512,6 @@ def _getLoginHintProjectInfo(createCmd):
break
else:
unknownArgumentExit()
print(4)
if not projectInfo['projectId']:
if createCmd:
projectInfo['projectId'] = _generateProjectSvcAcctId('gam-project')