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

Import fails when processing the type emailProvider and creating a custom email provider action in the same execution #950

Open
6 tasks done
jeanfdmelo opened this issue Aug 29, 2024 · 0 comments
Labels

Comments

@jeanfdmelo
Copy link

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

When importing the emailProvider configuration and creating a custom email provider action via a0deploy import, the operation fails during the processChanges stage when processing the emailProvider type.

Expectation

The processing of the emailProvider type does not fail during a0deploy import if the required action is also created in the same import.

Workaround
To overcome this, we first create the action and then add the emailProvider configuration.

  1. Run a0deploy import without the emailProvider property in tenant.yml. This will create the action.
  2. Then, run a0deploy import again, this time with the emailProvider property in place. Since the action has already been created, the processing of emailProvider will no longer fail."

However, we expect this to work in a single execution.

Reproduction

1 - Given the tenant.yml configuration has the emailProvider type being enabled and the custom email provider action being created in the same import.

tenant.yml

emailProvider:
  name: custom
  credentials: {}
  enabled: true
actions:
  - name: Custom Email Provider
  (...)
triggers:
  custom-email-provider:
    - action_name: Custom Email Provider
      display_name: Custom Email Provider

2 - When import is executed

a0deploy import --input_file tenant.yaml

3 - Then command fails with the error message:

Problem running command import during stage processChanges when processing type emailProvider
No deployed action of type custom-email-provider was found

Deploy CLI version

7.24.2

Node version

20.14.0

@jeanfdmelo jeanfdmelo added the bug label Aug 29, 2024
@jeanfdmelo jeanfdmelo changed the title Import fails when processing the type emailProvider because it takes precedence over the creation of the required custom-email-provider action Import fails when processing the type emailProvider and creating a custom email provider action in the same execution Aug 29, 2024
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