hi, i am trying to migrate from Pulumi Github Acti...
# general
f
hi, i am trying to migrate from Pulumi Github Actions v1 ( docker://pulumi/actions) to v3 ( pulumi/actions@v3) and I am getting the following error. I basically followed the template and works locally.
Copy code
pulumi:pulumi:Stack backend-staging  error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
      pulumi:pulumi:Stack backend-staging  1 message
   
  Diagnostics:
    pulumi:pulumi:Stack (backend-staging):
      error: It looks like the Pulumi SDK has not been installed. Have you run npm install or yarn install?
   
  
   stderr: error: failed to load language plugin nodejs: could not read plugin [/opt/hostedtoolcache/pulumi/3.10.1/x64/pulumi-language-nodejs] stdout: EOF
  
   err?: 
  
  (node:1638) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/tmp/automation-logs-preview-tYu3e4/eventlog.txt'
  (node:1638) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
  (node:1638) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
this is my new github action yaml
Copy code
jobs:
  preview:
    name: Preview
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 14.x
      - name: Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.DEPLOYBOT_AWS_ACCESS_KEY_ID }}
          aws-region: us-west-2
          aws-secret-access-key: ${{ secrets.DEPLOYBOT_AWS_SECRET_ACCESS_KEY }}
      - run: npm install
      - uses: pulumi/actions@v3
        with:
          command: preview
          stack-name: staging
          comment-on-pr: true
          github-token: ${{ secrets.GITHUB_TOKEN }}
          work-dir: backend-pulumi
        env:
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
this was my old one.
Copy code
jobs:
  preview:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - uses: <docker://pulumi/actions>
        with:
          args: preview
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYBOT_AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYBOT_AWS_SECRET_ACCESS_KEY }}
          PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
          PULUMI_CI: pr
          PULUMI_ROOT: backend-pulumi
the old one works
b
@fancy-manchester-67426 in your
npm install
step does it install your deps? do you have the pulumi sdk in your package.json?
f
this is my package.json
Copy code
{
  "name": "aws-typescript",
  "devDependencies": {
    "@types/node": "^8.0.0"
  },
  "dependencies": {
    "@pulumi/aws": "^3.0.0",
    "@pulumi/awsx": "^0.20.0",
    "@pulumi/docker": "^2.0.0",
    "@pulumi/pulumi": "^2.0.0"
  }
}
oh do i need a new sdk for this?
i thought the sdk was “@pulumi/pulumi”
b
I tnink you'll need the v3 version of the SDK for this ti work
if you could open an issue on github.com/pulumi/pulumi with this info I'll get someone to confirm
f
yeah i am running version v3.9.1 locally
i can try upgrading my pulumi package
b
sorry I meant you'll need to update your
package.json
to the latest version of the SDK:
Copy code
"@pulumi/pulumi": "^3.0.0"
f
ah gotcha. that probably is the issue