https://pulumi.com logo
Title
s

straight-arm-50771

02/16/2023, 8:34 PM
Getting consistent 403s on
pulumi refresh
when it tries to download plugins. This is in GitHub actions, ubuntu:22 runners which come w/Pulumi CLI loaded. Even the retry logic isn't enough most of the time. Took 4 re-runs (each w/5 retries!) to get past it this morning. GitHub Actions run step:
- name: Refresh Kubernetes
  shell: bash
  run: |
    cd kubernetes/
    pulumi stack select our-org/${GOOGLE_PROJECT}
    n=1
    max=5
    while true; do
      pulumi refresh -y --non-interactive && break || {
        if [ "$n" -lt 5 ]; then
          echo "Failed attempt $n/$max"
          n=$((n+1))
          sleep 30
        else  
          echo "[ERROR] Retries exhausted"; exit 1
        fi
      }
    done
Error:
error: could not load plugin for kubernetes provider 'urn:pulumi:my-stack::kubernetes::gcp:container/cluster:Cluster$pulumi:providers:kubernetes::provider': Could not automatically download and install resource plugin 'pulumi-resource-kubernetes', install the plugin using `pulumi plugin install resource kubernetes`.
Underlying error: 403 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-kubernetes/releases/latest>
Some days it works first try, most of the time it gives us issues.
b

billowy-army-68599

02/16/2023, 10:17 PM
if you don’t set a GITHUB token the github api will rate limit you
have you set a token in your pipeline?
can be as simple as:
env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
(in github actions)
s

straight-arm-50771

02/16/2023, 10:30 PM
I'll try that, thank you!