google-github-actions / setup-gcloud

A GitHub Action for installing and configuring the gcloud CLI.

Home Page:https://cloud.google.com/sdk/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pre compiled crcmod is missing from google-github-actions/setup-gcloud

dasmanas opened this issue · comments

TL;DR

Problem Statement

gsutil rsync is failing when client is checking the integrity of the transferred object pushed to the bucket. Command used is
gsutil -m -o "GSUtil:parallel_process_count=1" rsync -r <syncdir> gs://<cloud_bucket>. Here is logs from the failed process.

WARNING: gsutil rsync uses hashes when modification time is not available at
both the source and destination. Your crcmod installation isn't using the
module's C extension, so checksumming will run very slowly. If this is your
first rsync since updating gsutil, this rsync can take significantly longer than
usual. For help installing the extension, please see "gsutil help crcmod".

Building synchronization state...
Starting synchronization...
Copying file://syncdir/index.html [Content-Type=text/html]...
/ [0 files][    0.0 B/ 12.5 KiB]                                                
Copying file://syncdir/latest/index.html [Content-Type=text/html]...
/ [0 files][    0.0 B/ 24.5 KiB]                                                
module 'sys' has no attribute 'maxint'
Copying file://syncdir/latest/x86_64/index.html [Content-Type=text/html]...
/ [0/3 files][ 12.5 KiB/ 89.8 KiB]  13% Done                                    
/ [1/3 files][ 89.8 KiB/ 89.8 KiB]  99% Done                                    
/ [2/3 files][ 89.8 KiB/ 89.8 KiB]  99% Done                                    
/ [3/3 files][ 89.8 KiB/ 89.8 KiB] 100% Done                                    
Operation completed over 3 objects/89.8 KiB.                                     
CommandException: 1 files/objects could not be copied/removed.
Error: Process completed with exit code 1.

Further investigation with gsutil version -l shows compiled crcmod: False. Had to install pip3 install -U crcmod to resolve the issue.

Suggestion

It would be nice to include precompiled crcmod as part of google-github-actions/setup-gcloud.

Reference

pyrsia/pyrsia#1275

Expected behavior

No response

Observed behavior

No response

Action YAML

- id: build-osx-google-auth
      name: Google Auth
      uses: 'google-github-actions/auth@v1'
      with:
        workload_identity_provider: 'projects/***/locations/global/workloadIdentityPools/***-pool/providers/github-provider'
        service_account: '***-ghaction@***.iam.gserviceaccount.com'

- id: build-osx-setup-cloud-sdk
      name: Set up Cloud SDK
      uses: 'google-github-actions/setup-gcloud@v1'

Log output

No response

Additional information

No response

Duplicate of #416