taers232c / GAMADV-XTD3

Command line tool to manage Google Workspace
733 stars 88 forks source link

Vault count errors not reported correctly #433

Open archierosenblum opened 2 months ago

archierosenblum commented 2 months ago

When getting vault counts for a large number of users with large mailboxes using gam 6.80.11, the errors come back as a separate json rows, and the rows with the email shows a count of 0 (which is not correct) and no data in the error field.

The users below have over 250k emails in the vault. The desired outcome is that error field next to the email would contain the contain the error, and there would be no json rows.

gam print vaultcounts todrive matter "id:<matter id>" corpus mail scope all_data everyone

image
taers232c commented 2 months ago

Send me a Meet/Zoom invitation and we'll investigate

Ross

Ross Scroggs @.***

On Aug 23, 2024, at 11:16 AM, Archie Rosenblum @.***> wrote:

When getting vault counts for a large number of users with large mailboxes using gam 6.80.11, the errors come back as a separate json rows, and the rows with the email shows a count of 0 (which is not correct) and no data in the error field.

The users below have over 250k emails in the vault. The desired outcome is that error field next to the email would contain the contain the error, and there would be no json rows.

gam print vaultcounts todrive matter "id:" corpus mail scope all_data everyone

image.png (view on web) https://github.com/user-attachments/assets/5eee67da-86a1-4356-9f47-c3baa3958826 — Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/433, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYLYCHKVWSIG7DQEL24LZS536NAVCNFSM6AAAAABNAUQ32CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DGNRUGA3TQOA. You are receiving this because you are subscribed to this thread.

taers232c commented 2 months ago

Archie,

I believe that this is fixed in 6.80.12

Ross

Ross Scroggs @.***

On Aug 23, 2024, at 11:16 AM, Archie Rosenblum @.***> wrote:

When getting vault counts for a large number of users with large mailboxes using gam 6.80.11, the errors come back as a separate json rows, and the rows with the email shows a count of 0 (which is not correct) and no data in the error field.

The users below have over 250k emails in the vault. The desired outcome is that error field next to the email would contain the contain the error, and there would be no json rows.

gam print vaultcounts todrive matter "id:" corpus mail scope all_data everyone

image.png (view on web) https://github.com/user-attachments/assets/5eee67da-86a1-4356-9f47-c3baa3958826 — Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/433, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYLYCHKVWSIG7DQEL24LZS536NAVCNFSM6AAAAABNAUQ32CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DGNRUGA3TQOA. You are receiving this because you are subscribed to this thread.

archierosenblum commented 2 months ago

Ross, thank you for looking into this issue. On 6.80.15, it is hitting an exception every time:

MacBookPro ~ % gam print vaultcounts todrive matter "id:7237529a-a849-46fc-9dd7-2ffc145b5cee" corpus mail scope all_data everyone
Getting all Vault Matter Artifacts for Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, may take some time on a large Vault Matter...
Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds
Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds
Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds
Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds
Getting all Users, may take some time on a large Google Workspace Account...
Got 11029 Users...
Got 11029 Users
Traceback (most recent call last):
  File "__init__.py", line 75827, in ProcessGAMCommand
  File "__init__.py", line 40905, in doPrintVaultCounts
UnboundLocalError: cannot access local variable 'account' where it is not associated with a value

I put this in the debugger, it looks like this statement has an error. It looks like "account" should be "email" and if I make that change locally, it works fine.

        if email in query_accounts:
          query_accounts.remove(account)
image
taers232c commented 2 months ago

Will be fixed shortly. My apologies.

Ross Scroggs @.***

On Aug 27, 2024, at 5:56 AM, Archie Rosenblum @.***> wrote:

Ross, thank you for looking into this issue. On 6.80.15, it is hitting an exception every time:

MacBookPro ~ % gam print vaultcounts todrive matter "id:4627529a-a849-46fc-9dd7-2ffc145b5cee" corpus mail scope all_data everyone Getting all Vault Matter Artifacts for Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, may take some time on a large Vault Matter... Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds Vault Operation: operations/count/a3f96b4a-969a-4ec7-aa8e-937e6449a6eb, Is not done, checking again in 15 seconds Getting all Users, may take some time on a large Google Workspace Account... Got 11029 Users... Got 11029 Users Traceback (most recent call last): File "init.py", line 75827, in ProcessGAMCommand File "init.py", line 40905, in doPrintVaultCounts UnboundLocalError: cannot access local variable 'account' where it is not associated with a value — Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/433#issuecomment-2312489182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL3T6H7MNL7XQKMDCF3ZTRZP7AVCNFSM6AAAAABNAUQ32CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSGQ4DSMJYGI. You are receiving this because you commented.

archierosenblum commented 2 months ago

Thank you very much!

taers232c commented 2 months ago

Archie,

What OS are you running on

Ross Scroggs @.***

On Aug 27, 2024, at 7:21 AM, Archie Rosenblum @.***> wrote:

Thank you very much!

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/433#issuecomment-2312713093, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL4LX4XXJSHC62GPBRLZTSDPNAVCNFSM6AAAAABNAUQ32CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSG4YTGMBZGM. You are receiving this because you commented.

taers232c commented 2 months ago

6.80.16 is available.