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

Actions export uses absolute path that is not portable between development environments #899

Open
6 tasks done
yossarian21 opened this issue Mar 18, 2024 · 0 comments
Open
6 tasks done
Labels

Comments

@yossarian21
Copy link

yossarian21 commented Mar 18, 2024

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

This relates to #873 but is an issue on the export side. I'm using directory exports. When my action is exported, it writes an absolute path to the code in the Action manifest:

{
  "name": "Prompt for MFA",
  "code": "/app/auth0/infra/actions/Prompt for MFA/code.js",
  "runtime": "node18-actions",
  "status": "built",
  "dependencies": [],
  "secrets": [],
  "supported_triggers": [
    {
      "id": "post-login",
      "version": "v3"
    }
  ],
  "deployed": true
}

But this path is different on other developer machines (so if someone else runs the export, the path changes unexpectedly, and they can only run the import if they're using the same source code path) and our build environment (so our deployment pipeline fails because it can't find the file).

I am providing an absolute path as the output_folder; e.g. /app/auth0/infra is the path that was provided to the export command.

Expectation

The export should write the code as a relative path; ideally, relative to the output_folder provided to the CLI.

I would be willing to submit a PR for this change if you want it. Should it be configurable?

Reproduction

  1. Given I have an Auth0 tenant with an Action configured
  2. When I run the export command
  3. Then the Action manifest contains an absolute path to the code file
  4. And the path is not portable to other machines/build environments

Deploy CLI version

7.21.0

Node version

18.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant