Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preinstalled versions not being detected #618

Closed
ethanmdavidson opened this issue Feb 13, 2023 · 3 comments
Closed

Preinstalled versions not being detected #618

ethanmdavidson opened this issue Feb 13, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ethanmdavidson
Copy link
Contributor

TL;DR

When using the new version constraint feature from #612, the SDK is still being downloaded despite the preinstalled version matching the given constraints.

Expected behavior

If the preinstalled CLI version matches the version constraint, the action will use that CLI version and skip the install step.

Observed behavior

The action is still downloading the CLI.

Action YAML

name: Create Mirror
on:
  workflow_dispatch:
    inputs:
      orgId:
        description: 'Comma delimited list of org account ids'
        default: '1'
        required: true
# can't run this job multiple times concurrently
concurrency: 'create_mirror'
jobs:
  createMirror:
    runs-on: ubuntu-latest
    permissions:
      # id-token permission is required for gcloud auth action
      contents: 'read'
      id-token: 'write'
    timeout-minutes: 120
    steps:
      - name: checkout
        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

        #added for troubleshooting
      - name: check gcloud preinstalled version
        run: gcloud version

      - id: auth
        name: Auth to GCP
        uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
        with:
          workload_identity_provider: '<redacted>'
          service_account: '<redacted>'

      - name: Set Up GCloud
        uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
        with:
          version: '>= 416.0.0'

      - name: Create and Upload Mirror
        run: |
          <redacted>

Log output

2023-02-13T15:16:28.0426260Z Requested labels: ubuntu-latest
2023-02-13T15:16:28.0426309Z Job defined at: LeagueApps/monolith/.github/workflows/create_mirror.yml@refs/heads/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0
2023-02-13T15:16:28.0426339Z Waiting for a runner to pick up this job...
2023-02-13T15:16:28.2385227Z Job is waiting for a hosted runner to come online.
2023-02-13T15:16:31.5219019Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2023-02-13T15:16:36.3231080Z ##[debug]Starting: createMirror
2023-02-13T15:16:36.3256005Z ##[debug]Cleaning runner temp folder: /home/runner/work/_temp
2023-02-13T15:16:36.3574625Z ##[debug]Starting: Set up job
2023-02-13T15:16:36.3575024Z Current runner version: '2.301.1'
2023-02-13T15:16:36.3597729Z ##[group]Operating System
2023-02-13T15:16:36.3598211Z Ubuntu
2023-02-13T15:16:36.3598453Z 22.04.1
2023-02-13T15:16:36.3598815Z LTS
2023-02-13T15:16:36.3599113Z ##[endgroup]
2023-02-13T15:16:36.3599446Z ##[group]Runner Image
2023-02-13T15:16:36.3599799Z Image: ubuntu-22.04
2023-02-13T15:16:36.3600103Z Version: 20230206.1
2023-02-13T15:16:36.3600619Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230206.1/images/linux/Ubuntu2204-Readme.md
2023-02-13T15:16:36.3601268Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230206.1
2023-02-13T15:16:36.3601705Z ##[endgroup]
2023-02-13T15:16:36.3602070Z ##[group]Runner Image Provisioner
2023-02-13T15:16:36.3602367Z 2.0.108.1
2023-02-13T15:16:36.3602838Z ##[endgroup]
2023-02-13T15:16:36.3603451Z ##[group]GITHUB_TOKEN Permissions
2023-02-13T15:16:36.3604074Z Contents: read
2023-02-13T15:16:36.3604397Z Metadata: read
2023-02-13T15:16:36.3604668Z ##[endgroup]
2023-02-13T15:16:36.3608279Z Secret source: Actions
2023-02-13T15:16:36.3608874Z ##[debug]Primary repository: LeagueApps/monolith
2023-02-13T15:16:36.3609311Z Prepare workflow directory
2023-02-13T15:16:36.3686457Z ##[debug]Creating pipeline directory: '/home/runner/work/monolith'
2023-02-13T15:16:36.3688852Z ##[debug]Creating workspace directory: '/home/runner/work/monolith/monolith'
2023-02-13T15:16:36.3689749Z ##[debug]Update context data
2023-02-13T15:16:36.3692108Z ##[debug]Evaluating job-level environment variables
2023-02-13T15:16:36.4355360Z ##[debug]Evaluating job container
2023-02-13T15:16:36.4359251Z ##[debug]Evaluating job service containers
2023-02-13T15:16:36.4361827Z ##[debug]Evaluating job defaults
2023-02-13T15:16:36.4437234Z Prepare all required actions
2023-02-13T15:16:36.4621404Z Getting action download info
2023-02-13T15:16:36.8595989Z Download action repository 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
2023-02-13T15:16:37.0935999Z ##[debug]Download 'https://api.github.com/repos/actions/checkout/tarball/ac593985615ec2ede58e132d2e21d2b1cbd6127c' to '/home/runner/work/_actions/_temp_3a69a409-fb81-4a9d-8eae-520ce66cfca8/b1efe950-8e92-470a-9fb7-d7474390159c.tar.gz'
2023-02-13T15:16:37.1832391Z ##[debug]Unwrap 'actions-checkout-ac59398' to '/home/runner/work/_actions/actions/checkout/ac593985615ec2ede58e132d2e21d2b1cbd6127c'
2023-02-13T15:16:37.1988859Z ##[debug]Archive '/home/runner/work/_actions/_temp_3a69a409-fb81-4a9d-8eae-520ce66cfca8/b1efe950-8e92-470a-9fb7-d7474390159c.tar.gz' has been unzipped into '/home/runner/work/_actions/actions/checkout/ac593985615ec2ede58e132d2e21d2b1cbd6127c'.
2023-02-13T15:16:37.2128362Z Download action repository 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' (SHA:ef5d53e30bbcd8d0836f4288f5e50ff3e086997d)
2023-02-13T15:16:37.5155470Z ##[debug]Download 'https://api.github.com/repos/google-github-actions/auth/tarball/ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' to '/home/runner/work/_actions/_temp_2ed4aed0-b218-4415-a0f5-23321968a313/6969ebe5-adb6-459d-a9b0-1f22900c7e4b.tar.gz'
2023-02-13T15:16:37.5298704Z ##[debug]Unwrap 'google-github-actions-auth-ef5d53e' to '/home/runner/work/_actions/google-github-actions/auth/ef5d53e30bbcd8d0836f4288f5e50ff3e086997d'
2023-02-13T15:16:37.5329857Z ##[debug]Archive '/home/runner/work/_actions/_temp_2ed4aed0-b218-4415-a0f5-23321968a313/6969ebe5-adb6-459d-a9b0-1f22900c7e4b.tar.gz' has been unzipped into '/home/runner/work/_actions/google-github-actions/auth/ef5d53e30bbcd8d0836f4288f5e50ff3e086997d'.
2023-02-13T15:16:37.5345111Z Download action repository 'google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587' (SHA:62d4898025f6041e16b1068643bfc5a696863587)
2023-02-13T15:16:37.8051487Z ##[debug]Download 'https://api.github.com/repos/google-github-actions/setup-gcloud/tarball/62d4898025f6041e16b1068643bfc5a696863587' to '/home/runner/work/_actions/_temp_7c397437-53f0-4ad9-82f9-fcd524268a5d/52169c92-0c37-475a-bf81-5cf98749e4f6.tar.gz'
2023-02-13T15:16:37.8384849Z ##[debug]Unwrap 'google-github-actions-setup-gcloud-62d4898' to '/home/runner/work/_actions/google-github-actions/setup-gcloud/62d4898025f6041e16b1068643bfc5a696863587'
2023-02-13T15:16:37.8437726Z ##[debug]Archive '/home/runner/work/_actions/_temp_7c397437-53f0-4ad9-82f9-fcd524268a5d/52169c92-0c37-475a-bf81-5cf98749e4f6.tar.gz' has been unzipped into '/home/runner/work/_actions/google-github-actions/setup-gcloud/62d4898025f6041e16b1068643bfc5a696863587'.
2023-02-13T15:16:37.8508128Z ##[debug]action.yml for action: '/home/runner/work/_actions/actions/checkout/ac593985615ec2ede58e132d2e21d2b1cbd6127c/action.yml'.
2023-02-13T15:16:37.9447497Z ##[debug]action.yml for action: '/home/runner/work/_actions/google-github-actions/auth/ef5d53e30bbcd8d0836f4288f5e50ff3e086997d/action.yml'.
2023-02-13T15:16:37.9498225Z ##[debug]action.yml for action: '/home/runner/work/_actions/google-github-actions/setup-gcloud/62d4898025f6041e16b1068643bfc5a696863587/action.yml'.
2023-02-13T15:16:37.9672696Z ##[debug]Set step '__actions_checkout' display name to: 'checkout'
2023-02-13T15:16:37.9675122Z ##[debug]Set step '__run' display name to: 'check gcloud preinstalled version'
2023-02-13T15:16:37.9676383Z ##[debug]Set step 'auth' display name to: 'Auth to GCP'
2023-02-13T15:16:37.9677495Z ##[debug]Set step '__google-github-actions_setup-gcloud' display name to: 'Set Up GCloud'
2023-02-13T15:16:37.9678657Z ##[debug]Set step '__run_2' display name to: 'Create and Upload Mirror'
2023-02-13T15:16:37.9679162Z Complete job name: createMirror
2023-02-13T15:16:37.9691901Z ##[debug]Collect running processes for tracking orphan processes.
2023-02-13T15:16:37.9915666Z ##[debug]Finishing: Set up job
2023-02-13T15:16:38.0128195Z ##[debug]Evaluating condition for step: 'checkout'
2023-02-13T15:16:38.0181110Z ##[debug]Evaluating: success()
2023-02-13T15:16:38.0187213Z ##[debug]Evaluating success:
2023-02-13T15:16:38.0215338Z ##[debug]=> true
2023-02-13T15:16:38.0222995Z ##[debug]Result: true
2023-02-13T15:16:38.0265851Z ##[debug]Starting: checkout
2023-02-13T15:16:38.0380948Z ##[debug]Register post job cleanup for action: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
2023-02-13T15:16:38.0662808Z ##[debug]Loading inputs
2023-02-13T15:16:38.0673462Z ##[debug]Evaluating: github.repository
2023-02-13T15:16:38.0674400Z ##[debug]Evaluating Index:
2023-02-13T15:16:38.0677032Z ##[debug]..Evaluating github:
2023-02-13T15:16:38.0678095Z ##[debug]..=> Object
2023-02-13T15:16:38.0693302Z ##[debug]..Evaluating String:
2023-02-13T15:16:38.0694008Z ##[debug]..=> 'repository'
2023-02-13T15:16:38.0698196Z ##[debug]=> 'LeagueApps/monolith'
2023-02-13T15:16:38.0699667Z ##[debug]Result: 'LeagueApps/monolith'
2023-02-13T15:16:38.0702200Z ##[debug]Evaluating: github.token
2023-02-13T15:16:38.0702486Z ##[debug]Evaluating Index:
2023-02-13T15:16:38.0702754Z ##[debug]..Evaluating github:
2023-02-13T15:16:38.0703010Z ##[debug]..=> Object
2023-02-13T15:16:38.0703258Z ##[debug]..Evaluating String:
2023-02-13T15:16:38.0703504Z ##[debug]..=> 'token'
2023-02-13T15:16:38.0704158Z ##[debug]=> '***'
2023-02-13T15:16:38.0704547Z ##[debug]Result: '***'
2023-02-13T15:16:38.0710010Z ##[debug]Loading env
2023-02-13T15:16:38.0799803Z ##[group]Run actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
2023-02-13T15:16:38.0800135Z with:
2023-02-13T15:16:38.0800375Z   repository: LeagueApps/monolith
2023-02-13T15:16:38.0800872Z   token: ***
2023-02-13T15:16:38.0801087Z   ssh-strict: true
2023-02-13T15:16:38.0801331Z   persist-credentials: true
2023-02-13T15:16:38.0801556Z   clean: true
2023-02-13T15:16:38.0801758Z   fetch-depth: 1
2023-02-13T15:16:38.0801962Z   lfs: false
2023-02-13T15:16:38.0802165Z   submodules: false
2023-02-13T15:16:38.0802414Z   set-safe-directory: true
2023-02-13T15:16:38.0802641Z ##[endgroup]
2023-02-13T15:16:38.3174285Z ##[debug]GITHUB_WORKSPACE = '/home/runner/work/monolith/monolith'
2023-02-13T15:16:38.3175228Z ##[debug]qualified repository = 'LeagueApps/monolith'
2023-02-13T15:16:38.3175878Z ##[debug]ref = 'refs/heads/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0'
2023-02-13T15:16:38.3176494Z ##[debug]commit = '42c1f411f7cf68ab606e19f63b776b7cc3c5ca17'
2023-02-13T15:16:38.3176934Z ##[debug]clean = true
2023-02-13T15:16:38.3177307Z ##[debug]fetch depth = 1
2023-02-13T15:16:38.3177690Z ##[debug]lfs = false
2023-02-13T15:16:38.3178067Z ##[debug]submodules = false
2023-02-13T15:16:38.3178466Z ##[debug]recursive submodules = false
2023-02-13T15:16:38.3205421Z ##[debug]GitHub Host URL = 
2023-02-13T15:16:38.3207172Z ::add-matcher::/home/runner/work/_actions/actions/checkout/ac593985615ec2ede58e132d2e21d2b1cbd6127c/dist/problem-matcher.json
2023-02-13T15:16:38.3314645Z ##[debug]Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
2023-02-13T15:16:38.3326400Z Syncing repository: LeagueApps/monolith
2023-02-13T15:16:38.3327426Z ::group::Getting Git version info
2023-02-13T15:16:38.3328641Z ##[group]Getting Git version info
2023-02-13T15:16:38.3329126Z Working directory is '/home/runner/work/monolith/monolith'
2023-02-13T15:16:38.3329654Z ##[debug]Getting git version
2023-02-13T15:16:38.3329904Z [command]/usr/bin/git version
2023-02-13T15:16:38.3415913Z git version 2.39.1
2023-02-13T15:16:38.3437864Z ##[debug]0
2023-02-13T15:16:38.3438280Z ##[debug]git version 2.39.1
2023-02-13T15:16:38.3438493Z ##[debug]
2023-02-13T15:16:38.3440834Z ##[debug]Set git useragent to: git/2.39.1 (github-actions-checkout)
2023-02-13T15:16:38.3441364Z ::endgroup::
2023-02-13T15:16:38.3441605Z ##[endgroup]
2023-02-13T15:16:38.3458264Z ::add-mask::***
2023-02-13T15:16:38.3460187Z Temporarily overriding HOME='/home/runner/work/_temp/0110a226-216f-4bab-9168-b3a59c7d4dcf' before making global git config changes
2023-02-13T15:16:38.3460703Z Adding repository directory to the temporary git global config as a safe directory
2023-02-13T15:16:38.3463682Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/monolith/monolith
2023-02-13T15:16:38.3500740Z ##[debug]0
2023-02-13T15:16:38.3502980Z ##[debug]
2023-02-13T15:16:38.3516531Z Deleting the contents of '/home/runner/work/monolith/monolith'
2023-02-13T15:16:38.3524420Z ::group::Initializing the repository
2023-02-13T15:16:38.3524740Z ##[group]Initializing the repository
2023-02-13T15:16:38.3531235Z [command]/usr/bin/git init /home/runner/work/monolith/monolith
2023-02-13T15:16:38.3599752Z hint: Using 'master' as the name for the initial branch. This default branch name
2023-02-13T15:16:38.3600475Z hint: is subject to change. To configure the initial branch name to use in all
2023-02-13T15:16:38.3601322Z hint: of your new repositories, which will suppress this warning, call:
2023-02-13T15:16:38.3601810Z hint: 
2023-02-13T15:16:38.3602559Z hint: 	git config --global init.defaultBranch <name>
2023-02-13T15:16:38.3603019Z hint: 
2023-02-13T15:16:38.3603761Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2023-02-13T15:16:38.3604406Z hint: 'development'. The just-created branch can be renamed via this command:
2023-02-13T15:16:38.3605085Z hint: 
2023-02-13T15:16:38.3605516Z hint: 	git branch -m <name>
2023-02-13T15:16:38.3607908Z Initialized empty Git repository in /home/runner/work/monolith/monolith/.git/
2023-02-13T15:16:38.3614693Z ##[debug]0
2023-02-13T15:16:38.3616928Z ##[debug]Initialized empty Git repository in /home/runner/work/monolith/monolith/.git/
2023-02-13T15:16:38.3617237Z ##[debug]
2023-02-13T15:16:38.3624767Z [command]/usr/bin/git remote add origin https://github.com/LeagueApps/monolith
2023-02-13T15:16:38.3668243Z ##[debug]0
2023-02-13T15:16:38.3668960Z ##[debug]
2023-02-13T15:16:38.3669873Z ::endgroup::
2023-02-13T15:16:38.3670091Z ##[endgroup]
2023-02-13T15:16:38.3670737Z ::group::Disabling automatic garbage collection
2023-02-13T15:16:38.3671050Z ##[group]Disabling automatic garbage collection
2023-02-13T15:16:38.3673321Z [command]/usr/bin/git config --local gc.auto 0
2023-02-13T15:16:38.3705019Z ##[debug]0
2023-02-13T15:16:38.3707187Z ##[debug]
2023-02-13T15:16:38.3709112Z ::endgroup::
2023-02-13T15:16:38.3709321Z ##[endgroup]
2023-02-13T15:16:38.3711127Z ::group::Setting up auth
2023-02-13T15:16:38.3711362Z ##[group]Setting up auth
2023-02-13T15:16:38.3721988Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2023-02-13T15:16:38.3751941Z ##[debug]1
2023-02-13T15:16:38.3754128Z ##[debug]
2023-02-13T15:16:38.3762358Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2023-02-13T15:16:38.4088865Z ##[debug]0
2023-02-13T15:16:38.4089887Z ##[debug]
2023-02-13T15:16:38.4091094Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2023-02-13T15:16:38.4109776Z ##[debug]1
2023-02-13T15:16:38.4122420Z ##[debug]
2023-02-13T15:16:38.4124015Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2023-02-13T15:16:38.4358269Z ##[debug]0
2023-02-13T15:16:38.4359184Z ##[debug]
2023-02-13T15:16:38.4360358Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2023-02-13T15:16:38.4375458Z ##[debug]0
2023-02-13T15:16:38.4375954Z ##[debug]
2023-02-13T15:16:38.4381695Z ::endgroup::
2023-02-13T15:16:38.4381930Z ##[endgroup]
2023-02-13T15:16:38.4382441Z ::group::Fetching the repository
2023-02-13T15:16:38.4382704Z ##[group]Fetching the repository
2023-02-13T15:16:38.4394933Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +42c1f411f7cf68ab606e19f63b776b7cc3c5ca17:refs/remotes/origin/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0
2023-02-13T15:16:38.7469747Z remote: Enumerating objects: 9721, done.        
2023-02-13T15:16:38.7470748Z remote: Counting objects:   0% (1/9721)        
2023-02-13T15:16:38.7471829Z remote: Counting objects:   1% (98/9721)        
2023-02-13T15:16:38.7472333Z remote: Counting objects:   2% (195/9721)        
<snip>   
2023-02-13T15:16:38.7580539Z remote: Counting objects:  98% (9527/9721)        
2023-02-13T15:16:38.7580968Z remote: Counting objects:  99% (9624/9721)        
2023-02-13T15:16:38.7582671Z remote: Counting objects: 100% (9721/9721)        
2023-02-13T15:16:38.7583169Z remote: Counting objects: 100% (9721/9721), done.        
2023-02-13T15:16:38.7680936Z remote: Compressing objects:   0% (1/8194)        
2023-02-13T15:16:38.7780282Z remote: Compressing objects:   1% (82/8194)        
<snip>     
2023-02-13T15:16:39.9849959Z remote: Compressing objects:  99% (8113/8194)        
2023-02-13T15:16:39.9854120Z remote: Compressing objects: 100% (8194/8194)        
2023-02-13T15:16:39.9854565Z remote: Compressing objects: 100% (8194/8194), done.        
2023-02-13T15:16:39.9968235Z Receiving objects:   0% (1/9721)
2023-02-13T15:16:40.0938255Z Receiving objects:   1% (98/9721)
<snip>
2023-02-13T15:16:41.7616187Z Receiving objects:  98% (9527/9721), 58.37 MiB | 38.91 MiB/s
2023-02-13T15:16:41.7757253Z Receiving objects:  99% (9624/9721), 58.37 MiB | 38.91 MiB/s
2023-02-13T15:16:41.7757912Z remote: Total 9721 (delta 2187), reused 6436 (delta 1260), pack-reused 0        
2023-02-13T15:16:41.7786314Z Receiving objects: 100% (9721/9721), 58.37 MiB | 38.91 MiB/s
2023-02-13T15:16:41.7786911Z Receiving objects: 100% (9721/9721), 75.76 MiB | 42.32 MiB/s, done.
2023-02-13T15:16:41.7802335Z Resolving deltas:   0% (0/2187)
2023-02-13T15:16:41.7811516Z Resolving deltas:   1% (22/2187)
2023-02-13T15:16:41.7816300Z Resolving deltas:   2% (45/2187)
<snip>
2023-02-13T15:16:41.9152170Z Resolving deltas:  99% (2166/2187)
2023-02-13T15:16:41.9152866Z Resolving deltas: 100% (2187/2187)
2023-02-13T15:16:41.9153265Z Resolving deltas: 100% (2187/2187), done.
2023-02-13T15:16:42.0294808Z From https://github.com/LeagueApps/monolith
2023-02-13T15:16:42.0318888Z  * [new ref]         42c1f411f7cf68ab606e19f63b776b7cc3c5ca17 -> origin/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0
2023-02-13T15:16:42.0320004Z ##[debug]0
2023-02-13T15:16:42.0320764Z ##[debug]
2023-02-13T15:16:42.0321296Z ::endgroup::
2023-02-13T15:16:42.0321514Z ##[endgroup]
2023-02-13T15:16:42.0322011Z ::group::Determining the checkout info
2023-02-13T15:16:42.0322283Z ##[group]Determining the checkout info
2023-02-13T15:16:42.0367041Z ::endgroup::
2023-02-13T15:16:42.0367255Z ##[endgroup]
2023-02-13T15:16:42.0367628Z ::group::Checking out the ref
2023-02-13T15:16:42.0367871Z ##[group]Checking out the ref
2023-02-13T15:16:42.0368698Z [command]/usr/bin/git checkout --progress --force -B dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0 refs/remotes/origin/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0
2023-02-13T15:16:42.8086655Z Switched to a new branch 'dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0'
2023-02-13T15:16:42.8087444Z branch 'dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0' set up to track 'origin/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0'.
2023-02-13T15:16:42.8113204Z ##[debug]0
2023-02-13T15:16:42.8114186Z ##[debug]branch 'dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0' set up to track 'origin/dependabot/github_actions/google-github-actions/setup-gcloud-1.1.0'.
2023-02-13T15:16:42.8114617Z ##[debug]
2023-02-13T15:16:42.8114985Z ::endgroup::
2023-02-13T15:16:42.8115209Z ##[endgroup]
2023-02-13T15:16:42.8148748Z ##[debug]0
2023-02-13T15:16:42.8149895Z ##[debug]commit 42c1f411f7cf68ab606e19f63b776b7cc3c5ca17
2023-02-13T15:16:42.8150244Z ##[debug]Author: Ethan Davidson <redacted>
2023-02-13T15:16:42.8150558Z ##[debug]Date:   Mon Feb 13 10:09:07 2023 -0500
2023-02-13T15:16:42.8150780Z ##[debug]
2023-02-13T15:16:42.8151035Z ##[debug]    test why preinstalled version isn't being found
2023-02-13T15:16:42.8151285Z ##[debug]
2023-02-13T15:16:42.8152411Z [command]/usr/bin/git log -1 --format='%H'
2023-02-13T15:16:42.8181563Z '42c1f411f7cf68ab606e19f63b776b7cc3c5ca17'
2023-02-13T15:16:42.8186264Z ##[debug]0
2023-02-13T15:16:42.8186848Z ##[debug]'42c1f411f7cf68ab606e19f63b776b7cc3c5ca17'
2023-02-13T15:16:42.8187090Z ##[debug]
2023-02-13T15:16:42.8193528Z ##[debug]Unsetting HOME override
2023-02-13T15:16:42.8202265Z ::remove-matcher owner=checkout-git::
2023-02-13T15:16:42.8225143Z ##[debug]Removed matchers: 'checkout-git'
2023-02-13T15:16:42.8298668Z ##[debug]Node Action run completed with exit code 0
2023-02-13T15:16:42.8432291Z ##[debug]Save intra-action state isPost = true
2023-02-13T15:16:42.8432743Z ##[debug]Save intra-action state setSafeDirectory = true
2023-02-13T15:16:42.8433147Z ##[debug]Save intra-action state repositoryPath = /home/runner/work/monolith/monolith
2023-02-13T15:16:42.8445103Z ##[debug]Finishing: checkout
2023-02-13T15:16:42.8453039Z ##[debug]Evaluating condition for step: 'check gcloud preinstalled version'
2023-02-13T15:16:42.8455247Z ##[debug]Evaluating: success()
2023-02-13T15:16:42.8455615Z ##[debug]Evaluating success:
2023-02-13T15:16:42.8456161Z ##[debug]=> true
2023-02-13T15:16:42.8456557Z ##[debug]Result: true
2023-02-13T15:16:42.8457570Z ##[debug]Starting: check gcloud preinstalled version
2023-02-13T15:16:42.8467056Z ##[debug]Loading inputs
2023-02-13T15:16:42.8503283Z ##[debug]Loading env
2023-02-13T15:16:42.8542378Z ##[group]Run gcloud version
2023-02-13T15:16:42.8542672Z �[36;1mgcloud version�[0m
2023-02-13T15:16:42.8599296Z shell: /usr/bin/bash -e {0}
2023-02-13T15:16:42.8599541Z ##[endgroup]
2023-02-13T15:16:42.8736481Z ##[debug]/usr/bin/bash -e /home/runner/work/_temp/59981fdc-da1f-4dd4-b9d5-8c51f338cc0f.sh
2023-02-13T15:16:43.8467430Z Google Cloud SDK 416.0.0
2023-02-13T15:16:43.8468267Z alpha 2023.01.30
2023-02-13T15:16:43.8468711Z beta 2023.01.30
2023-02-13T15:16:43.8469245Z bq 2.0.84
2023-02-13T15:16:43.8469803Z bundled-python3-unix 3.9.16
2023-02-13T15:16:43.8470053Z core 2023.01.30
2023-02-13T15:16:43.8470300Z gcloud-crc32c 1.0.0
2023-02-13T15:16:43.8470510Z gsutil 5.19
2023-02-13T15:16:43.9291022Z ##[debug]Finishing: check gcloud preinstalled version
2023-02-13T15:16:43.9295022Z ##[debug]Evaluating condition for step: 'Auth to GCP'
2023-02-13T15:16:43.9296483Z ##[debug]Evaluating: success()
2023-02-13T15:16:43.9296833Z ##[debug]Evaluating success:
2023-02-13T15:16:43.9297221Z ##[debug]=> true
2023-02-13T15:16:43.9297598Z ##[debug]Result: true
2023-02-13T15:16:43.9298240Z ##[debug]Starting: Auth to GCP
2023-02-13T15:16:43.9324491Z ##[debug]Register post job cleanup for action: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
2023-02-13T15:16:43.9333255Z ##[debug]Loading inputs
2023-02-13T15:16:43.9340116Z ##[debug]Loading env
2023-02-13T15:16:43.9344692Z ##[group]Run google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
2023-02-13T15:16:43.9344998Z with:
2023-02-13T15:16:43.9345383Z   workload_identity_provider: <redacted>
2023-02-13T15:16:43.9345935Z   service_account: <redacted>
2023-02-13T15:16:43.9346303Z   create_credentials_file: true
2023-02-13T15:16:43.9346554Z   export_environment_variables: true
2023-02-13T15:16:43.9346812Z   cleanup_credentials: true
2023-02-13T15:16:43.9347060Z   access_token_lifetime: 3600s
2023-02-13T15:16:43.9347398Z   access_token_scopes: https://www.googleapis.com/auth/cloud-platform
2023-02-13T15:16:43.9347699Z   retries: 0
2023-02-13T15:16:43.9347914Z   id_token_include_email: false
2023-02-13T15:16:43.9348136Z ##[endgroup]
2023-02-13T15:16:44.0071466Z ##[debug]Using workload identity provider "<redacted>"
2023-02-13T15:16:44.0074918Z ##[debug]ID token url is https://pipelines.actions.githubusercontent.com/<redacted>
2023-02-13T15:16:44.1188851Z ::add-mask::***
2023-02-13T15:16:44.1190784Z ##[debug]Creating credentials file
2023-02-13T15:16:44.1231178Z Created credentials file at "/home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json"
2023-02-13T15:16:44.1293687Z ##[debug]Node Action run completed with exit code 0
2023-02-13T15:16:44.1304891Z ##[debug]CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE='/home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json'
2023-02-13T15:16:44.1305601Z ##[debug]GOOGLE_APPLICATION_CREDENTIALS='/home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json'
2023-02-13T15:16:44.1306097Z ##[debug]GOOGLE_GHA_CREDS_PATH='/home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json'
2023-02-13T15:16:44.1306526Z ##[debug]CLOUDSDK_CORE_PROJECT='<redacted>'
2023-02-13T15:16:44.1306869Z ##[debug]CLOUDSDK_PROJECT='<redacted>'
2023-02-13T15:16:44.1307180Z ##[debug]GCLOUD_PROJECT='<redacted>'
2023-02-13T15:16:44.1307478Z ##[debug]GCP_PROJECT='<redacted>'
2023-02-13T15:16:44.1307788Z ##[debug]GOOGLE_CLOUD_PROJECT='<redacted>'
2023-02-13T15:16:44.1326501Z ##[debug]Set output credentials_file_path = /home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json
2023-02-13T15:16:44.1327103Z ##[debug]Set output project_id = <redacted>
2023-02-13T15:16:44.1327753Z ##[debug]Finishing: Auth to GCP
2023-02-13T15:16:44.1334214Z ##[debug]Evaluating condition for step: 'Set Up GCloud'
2023-02-13T15:16:44.1335442Z ##[debug]Evaluating: success()
2023-02-13T15:16:44.1335900Z ##[debug]Evaluating success:
2023-02-13T15:16:44.1336295Z ##[debug]=> true
2023-02-13T15:16:44.1336688Z ##[debug]Result: true
2023-02-13T15:16:44.1337272Z ##[debug]Starting: Set Up GCloud
2023-02-13T15:16:44.1354152Z ##[debug]Loading inputs
2023-02-13T15:16:44.1356117Z ##[debug]Loading env
2023-02-13T15:16:44.1361399Z ##[group]Run google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
2023-02-13T15:16:44.1361707Z with:
2023-02-13T15:16:44.1361894Z   version: >= 416.0.0
2023-02-13T15:16:44.1362111Z   skip_install: false
2023-02-13T15:16:44.1362315Z env:
2023-02-13T15:16:44.1362651Z   CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: /home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json
2023-02-13T15:16:44.1363119Z   GOOGLE_APPLICATION_CREDENTIALS: /home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json
2023-02-13T15:16:44.1363587Z   GOOGLE_GHA_CREDS_PATH: /home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json
2023-02-13T15:16:44.1363932Z   CLOUDSDK_CORE_PROJECT: <redacted>
2023-02-13T15:16:44.1364208Z   CLOUDSDK_PROJECT: <redacted>
2023-02-13T15:16:44.1364460Z   GCLOUD_PROJECT: <redacted>
2023-02-13T15:16:44.1364712Z   GCP_PROJECT: <redacted>
2023-02-13T15:16:44.1364974Z   GOOGLE_CLOUD_PROJECT: <redacted>
2023-02-13T15:16:44.1365209Z ##[endgroup]
2023-02-13T15:16:44.2607691Z ##[debug]isExplicit: 
2023-02-13T15:16:44.2611322Z ##[debug]explicit? false
2023-02-13T15:16:44.2614583Z ##[debug]evaluating 0 versions
2023-02-13T15:16:44.2615220Z ##[debug]match not found
2023-02-13T15:16:44.2616778Z ##[debug]no version of gcloud matching ">= 416.0.0" is installed
2023-02-13T15:16:44.2618802Z ##[debug]isExplicit: 
2023-02-13T15:16:44.2619318Z ##[debug]explicit? false
2023-02-13T15:16:44.3087644Z ##[debug]Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-417.0.1-linux-x86_64.tar.gz
2023-02-13T15:16:44.3090928Z ##[debug]Destination /home/runner/work/_temp/ed2b72c0-0340-485f-b256-ca204ecd1ef6
2023-02-13T15:16:45.2370634Z ##[debug]download complete
2023-02-13T15:16:45.2413819Z ##[debug]Checking tar --version
2023-02-13T15:16:45.2549088Z ##[debug]tar (GNU tar) 1.34
2023-02-13T15:16:45.2549429Z ##[debug]Copyright (C) 2021 Free Software Foundation, Inc.
2023-02-13T15:16:45.2549844Z ##[debug]License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
2023-02-13T15:16:45.2550255Z ##[debug]This is free software: you are free to change and redistribute it.
2023-02-13T15:16:45.2550631Z ##[debug]There is NO WARRANTY, to the extent permitted by law.
2023-02-13T15:16:45.2550890Z ##[debug]
2023-02-13T15:16:45.2551139Z ##[debug]Written by John Gilmore and Jay Fenlason.
2023-02-13T15:16:45.2565577Z [command]/usr/bin/tar xz -v --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/271d1741-c872-4a4d-ad43-2d74748f3ca2 -f /home/runner/work/_temp/ed2b72c0-0340-485f-b256-ca204ecd1ef6
2023-02-13T15:16:45.2613793Z google-cloud-sdk/.install/.download/
2023-02-13T15:16:45.2616293Z google-cloud-sdk/.install/anthoscli-linux-x86_64.manifest
2023-02-13T15:16:45.2616844Z google-cloud-sdk/.install/anthoscli-linux-x86_64.snapshot.json
2023-02-13T15:16:45.2617321Z google-cloud-sdk/.install/anthoscli.manifest
<snip>
2023-02-13T15:16:52.7079651Z google-cloud-sdk/rpm/mapping/component_mapping.yaml
2023-02-13T15:16:52.7080224Z ##[debug]Caching tool gcloud 417.0.1 x64
2023-02-13T15:16:52.7080680Z ##[debug]source dir: /home/runner/work/_temp/271d1741-c872-4a4d-ad43-2d74748f3ca2/google-cloud-sdk
2023-02-13T15:16:52.7081167Z ##[debug]destination /opt/hostedtoolcache/gcloud/417.0.1/x64
2023-02-13T15:16:59.7526252Z ##[debug]finished caching tool
2023-02-13T15:16:59.7536241Z ##[debug]Running command: gcloud --quiet auth login --force --cred-file /home/runner/work/monolith/monolith/gha-creds-0247386cd3588a72.json
2023-02-13T15:17:02.6244065Z Successfully authenticated
2023-02-13T15:17:02.6343372Z ##[debug]Node Action run completed with exit code 0
2023-02-13T15:17:02.6344721Z ##[debug]CLOUDSDK_METRICS_ENVIRONMENT='github-actions-setup-gcloud'
2023-02-13T15:17:02.6345123Z ##[debug]CLOUDSDK_METRICS_ENVIRONMENT_VERSION='1.1.0'
2023-02-13T15:17:02.6346462Z ##[debug]Finishing: Set Up GCloud
<snip>

Additional information

I added a step to run gcloud version, and it outputs 416.0.0, which means the correct CLI version is indeed preinstalled. However, tool-cache.ts is printing 'evaluating 0 versions', which implies it isn't seeing the preinstalled CLI at all.

@sethvargo
Copy link
Member

Hi @ethanmdavidson - to completely skip installation, use the skip_install parameter. The version constraint only applies to entries found in the "tool cache": https://www.npmjs.com/package/@actions/tool-cache. Unfortunately the GitHub pre-installed runners do not install gcloud into a toolcache. Worse, they use a package-manager-provided version, which cannot install components.

We could query gcloud on the path, but as I noted above, that version of gcloud could not install components. I opened actions/runner-images#7101

@ethanmdavidson
Copy link
Contributor Author

Okay, that makes sense. Thanks for the quick response!

@sethvargo
Copy link
Member

In light of actions/runner-images#7101, it looks like GitHub is going to remove gcloud and other tooling from the runner images.

@sethvargo sethvargo closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants