mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Updated gam <UserTypeEntity> archive messages <GroupItem>
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
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
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
7.02.02
|
||||||
|
|
||||||
|
Updated `gam <UserTypeEntity> archive messages <GroupItem>` to retry the following unexpected error
|
||||||
|
that occurs after many messages have been successfully archived.
|
||||||
|
`ERROR: 404: notFound - Unable to lookup group`
|
||||||
|
|
||||||
7.02.01
|
7.02.01
|
||||||
|
|
||||||
Added options `locked` and `unlocked` to `gam update cigroups` that allow locking/unlocking groups.
|
Added options `locked` and `unlocked` to `gam update cigroups` that allow locking/unlocking groups.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||||
__version__ = '7.02.01'
|
__version__ = '7.02.02'
|
||||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
#pylint: disable=wrong-import-position
|
#pylint: disable=wrong-import-position
|
||||||
@@ -34857,7 +34857,7 @@ def doUpdateCIGroups():
|
|||||||
entityActionFailedWarning([Ent.CLOUD_IDENTITY_GROUP, group], str(e), i, count)
|
entityActionFailedWarning([Ent.CLOUD_IDENTITY_GROUP, group], str(e), i, count)
|
||||||
continue
|
continue
|
||||||
# If a group currently isn't a security group or locked, and we want to add security and locked,
|
# If a group currently isn't a security group or locked, and we want to add security and locked,
|
||||||
# we have to do two commands to avoid a beta bug
|
# we have to do two commands to meet a beta requirement
|
||||||
ci_body.setdefault('labels', {})
|
ci_body.setdefault('labels', {})
|
||||||
if ((CIGROUP_SECURITY_LABEL not in cigInfo['labels']) and
|
if ((CIGROUP_SECURITY_LABEL not in cigInfo['labels']) and
|
||||||
(CIGROUP_LOCKED_LABEL not in cigInfo['labels']) and
|
(CIGROUP_LOCKED_LABEL not in cigInfo['labels']) and
|
||||||
@@ -34884,7 +34884,6 @@ def doUpdateCIGroups():
|
|||||||
throwReasons=GAPI.CIGROUP_UPDATE_THROW_REASONS,
|
throwReasons=GAPI.CIGROUP_UPDATE_THROW_REASONS,
|
||||||
retryReasons=GAPI.CIGROUP_RETRY_REASONS,
|
retryReasons=GAPI.CIGROUP_RETRY_REASONS,
|
||||||
name=name, body=ci_body, updateMask=','.join(list(ci_body.keys())))
|
name=name, body=ci_body, updateMask=','.join(list(ci_body.keys())))
|
||||||
if twoUpdates:
|
|
||||||
ci_body['labels'][CIGROUP_LOCKED_LABEL] = ''
|
ci_body['labels'][CIGROUP_LOCKED_LABEL] = ''
|
||||||
callGAPI(cipl.groups(), 'patch',
|
callGAPI(cipl.groups(), 'patch',
|
||||||
throwReasons=GAPI.CIGROUP_UPDATE_THROW_REASONS,
|
throwReasons=GAPI.CIGROUP_UPDATE_THROW_REASONS,
|
||||||
@@ -35152,7 +35151,7 @@ def doUpdateCIGroups():
|
|||||||
removeRoles = []
|
removeRoles = []
|
||||||
postUpdateRoles = []
|
postUpdateRoles = []
|
||||||
memberRoles = callGAPI(ci.groups().memberships(), 'get',
|
memberRoles = callGAPI(ci.groups().memberships(), 'get',
|
||||||
name=memberName, fields=f'name,preferredMemberKey,roles,type')
|
name=memberName, fields='name,preferredMemberKey,roles,type')
|
||||||
getCIGroupMemberRoleFixType(memberRoles)
|
getCIGroupMemberRoleFixType(memberRoles)
|
||||||
current_roles = [crole['name'] for crole in memberRoles['roles']]
|
current_roles = [crole['name'] for crole in memberRoles['roles']]
|
||||||
# When upgrading role, strip any expiryDetail from member before role changes
|
# When upgrading role, strip any expiryDetail from member before role changes
|
||||||
@@ -69680,8 +69679,9 @@ def archiveMessages(users):
|
|||||||
stream.write(base64.urlsafe_b64decode(str(message['raw'])))
|
stream.write(base64.urlsafe_b64decode(str(message['raw'])))
|
||||||
try:
|
try:
|
||||||
callGAPI(gm.archive(), 'insert',
|
callGAPI(gm.archive(), 'insert',
|
||||||
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.BAD_REQUEST, GAPI.INVALID,
|
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.BAD_REQUEST, GAPI.INVALID,
|
||||||
GAPI.FAILED_PRECONDITION, GAPI.FORBIDDEN],
|
GAPI.FAILED_PRECONDITION, GAPI.FORBIDDEN],
|
||||||
|
retryReasons=[GAPI.NOT_FOUND],
|
||||||
groupId=group, media_body=googleapiclient.http.MediaIoBaseUpload(stream, mimetype='message/rfc822', resumable=True))
|
groupId=group, media_body=googleapiclient.http.MediaIoBaseUpload(stream, mimetype='message/rfc822', resumable=True))
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
entityActionPerformed([Ent.USER, user, entityType, messageId], j, jcount)
|
entityActionPerformed([Ent.USER, user, entityType, messageId], j, jcount)
|
||||||
@@ -69690,6 +69690,9 @@ def archiveMessages(users):
|
|||||||
except GAPI.serviceNotAvailable:
|
except GAPI.serviceNotAvailable:
|
||||||
userGmailServiceNotEnabledWarning(user, i, count)
|
userGmailServiceNotEnabledWarning(user, i, count)
|
||||||
break
|
break
|
||||||
|
except GAPI.notFound as e:
|
||||||
|
_processMessageFailed(user, messageId, str(e), j, jcount)
|
||||||
|
break
|
||||||
except (GAPI.badRequest, GAPI.invalid, GAPI.failedPrecondition, GAPI.forbidden,
|
except (GAPI.badRequest, GAPI.invalid, GAPI.failedPrecondition, GAPI.forbidden,
|
||||||
googleapiclient.errors.MediaUploadSizeError) as e:
|
googleapiclient.errors.MediaUploadSizeError) as e:
|
||||||
_processMessageFailed(user, messageId, str(e), j, jcount)
|
_processMessageFailed(user, messageId, str(e), j, jcount)
|
||||||
|
|||||||
Reference in New Issue
Block a user