auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
248 stars 154 forks source link

CLI fails on import of dependencies #945

Open spencerkohan opened 3 months ago

spencerkohan commented 3 months ago

Checklist

Description

We are running into an error when we try to import json configurations for actions containing a new dependency

We are using the following command in our deployment pipeline:

 a0deploy import --input_file ./src/config --config_file

the dependencies of the config files have all been updated to use a new version of axios:

 "dependencies": [
    {
      "name": "axios",
      "version": "1.7.3"
    }
  ],

for some actions, this represents a new dependency, and for others it's just a version bump.

This command always fails with the following error:

2024-08-13T08:04:09.161Z - error: Problem running command import 118 2024-08-13T08:04:09.162Z - error: {"error":"server_error","error_description":"Compilation failed: Cannot find module 'axios'\nRequire stack:\n- /data/io/node18-actions/bd069169-68af-4c91-bbce-070f9d2d1f29/webtask.js"}

Given the fact the action is identified with a uuid, it's very difficult to know which action is actually triggering the error. From what I can understand, whatever this webtask.js process is cannot successfully access the dependency.

It's possible to make the import work by manually updating the dependencies ahead of time using the auth0 dashboard, but this is not a sustainable solution for deployments.

Expectation

I should be able to:

  1. add a new dependency to the aciton-config.json file,
  2. call a0deploy import to push it to the relevant tenant

And the result should be that the dependencies are successfully updated according to the config, and I can see them in the dashboard.

Reproduction

  1. Update the action.json config to add the new dependency
  2. Call a0deploy import --input_file ./src/config --config_file to import the updated config
  3. The command fails with an error

Deploy CLI version

7.24.1

Node version

18.20.4.