pulumi / pulumi-metabase

Apache License 2.0
2 stars 3 forks source link

Intermittent Pulumi up failure #3

Open greg-prospyr opened 1 year ago

greg-prospyr commented 1 year ago

What happened?

I've been getting the following error message lately during pulumi up in our CI:

err?: Error: Command failed with exit code 255: pulumi up --yes --skip-preview --parallel 2147483647 --exec-agent pulumi/actions@v3 --color auto --exec-kind auto.local --stack production --non-interactive
  error: could not load plugin for metabase provider 'urn:pulumi:production::infra::pulumi:providers:metabase::default_0_0_3': Could not automatically download and install resource plugin 'pulumi-resource-metabase' at version v0.0.3, install the plugin using `pulumi plugin install resource metabase v0.0.3`.
  Underlying error: error downloading plugin metabase to file: failed to download plugin: metabase-0.0.3: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-metabase-v0.0.3-linux-amd64.tar.gz

Steps to reproduce

my package.json contains: "@pulumi/metabase": "^0.0.3",

and the way we use the plugin is:

import * as pulumi from "@pulumi/pulumi";
import { ENVIRONMENT } from "./config";
import { getRelevantVpc } from "./vpc";
import * as metabase from "@pulumi/metabase";
const vpc = getRelevantVpc();

const metabaseService = new metabase.Metabase(
  `mb-${ENVIRONMENT?.slice(0, 3)}`,
  {
    vpcId: vpc.id,
    database: {
      engineVersion: "5.7.serverless_mysql_aurora.2.08.3",
    },
  }
);

export const url = metabaseService.dnsName;

Expected Behavior

pulumi up successfully

Actual Behavior

I've been getting the following error message lately during pulumi up in our CI:

err?: Error: Command failed with exit code 255: pulumi up --yes --skip-preview --parallel 2147483647 --exec-agent pulumi/actions@v3 --color auto --exec-kind auto.local --stack production --non-interactive
  error: could not load plugin for metabase provider 'urn:pulumi:production::infra::pulumi:providers:metabase::default_0_0_3': Could not automatically download and install resource plugin 'pulumi-resource-metabase' at version v0.0.3, install the plugin using `pulumi plugin install resource metabase v0.0.3`.
  Underlying error: error downloading plugin metabase to file: failed to download plugin: metabase-0.0.3: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-metabase-v0.0.3-linux-amd64.tar.gz

Output of pulumi about

CLI          
Version      3.40.1
Go Version   go1.19.1
Go Compiler  gc

Plugins
NAME        VERSION
aws         5.10.0
aws         4.28.0
aws-native  0.19.0
command     0.2.0
docker      3.1.0
github      4.9.0
metabase    0.0.3
nodejs      unknown
random      4.8.1
random      4.3.1
tls         4.1.0

Host     
OS       darwin
Version  12.6
Arch     arm64

This project is written in nodejs: executable='/Users/greg/.nvm/versions/node/v16.15.0/bin/node' version='v16.15.0'

Current Stack: localstack

Found no resources associated with localstack

Found no pending operations associated with localstack

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/greg-prospyr
User           greg-prospyr
Organizations  greg-prospyr, prospyr

Dependencies:
NAME                VERSION
@checkly/pulumi     1.1.2
@pulumi/aws         4.28.0
@pulumi/aws-native  0.19.0
@pulumi/awsx        0.30.0
@pulumi/command     0.2.0
@pulumi/github      4.9.0
@pulumi/metabase    0.0.3
@pulumi/pulumi      3.17.1
@pulumi/random      4.3.1
@pulumi/tls         4.1.0
mime                3.0.0
playwright          1.25.2
typescript          4.5.5
@types/mime         2.0.3
@types/node         14.17.33

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

thomas11 commented 1 year ago

Hi @greg-prospyr , thank you for the report! This looks like the same root cause than pulumi/actions#815. Is your CI Github Actions, per chance? Then you could try setting

env:
    PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

as advised in that issue, until there is a better fix.