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

CLI version v1.223.10 breaking change causes deployment GitHub action to fail because of missing smtp setting in config file #2899

Open
khera opened this issue Nov 19, 2024 · 1 comment

Comments

@khera
Copy link

khera commented Nov 19, 2024

Describe the bug
A clear and concise description of what the bug is.

Using a GitHub action to push migrations to the hosted instance fails with the current CLI, because it is now fatal to not have an smtp host defined. The local CLI development defaults to in bucket, so this is not set in my config file.

To Reproduce
Steps to reproduce the behavior:

Using the following GitHub actions:

jobs:
    supabase-deploy:
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v4
            - name: Prep Supabase CLI
              uses: supabase/setup-cli@v1
              with:
                version: latest
            - run: supabase link --project-ref ${{ inputs.PROJECT_ID }}
            - run: supabase db push

pulls the latest version of the cli, which is v1.223.10 currently. My project locally is still using CLI v1.219.2 where everything works. When running the link command, it fails with this error:

Missing required field in config: auth.email.smtp.host
Try rerunning the command with --debug to troubleshoot the error.

Then it exits.

There's no reason to have the local CLI development configuration set this variable, as it uses inbucket.

Expected behavior
A clear and concise description of what you expected to happen.

The deploy should succeed like it always has with my config file, or the version should be bumped for the breaking change.

Screenshots
If applicable, add screenshots to help explain your problem.

System information
Rerun the failing command with --create-ticket flag.

  • Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
  • Version of OS: [e.g. Ubuntu 22.04] Github default worker OS
  • Version of CLI: [e.g. v1.60.0] v1.223.10 or whatever GitHub action pulls for latest.
  • Version of Docker: [e.g. v25.0.3] n/a
  • Versions of services: [output from supabase services command] nothing is running in my action but the CLI.

Additional context
If applicable, add any other context about the problem here.

  • Browser [e.g. chrome, safari] safari
  • Version of supabase-js [e.g. v2.22.0] 2.46.1
  • Version of Node.js [e.g. v16.20.0] whatever Github actions is using
@khera
Copy link
Author

khera commented Nov 19, 2024

Clarification: it seems that if any auth.email.smtp settings are made, you now require all (host, port, user, pass) of them to be set.

My current configuration is

[auth.email.smtp]
admin_email = "[email protected]"
sender_name = "MyProject DEV"

Now it is demanding I set all the other fields, but there's no guidance as to what those should be to work with inbucket in the sample config.toml in a new project. I set the following, but the auth service cannot still send any email, it returns 500 error status.

host = "localhost"
port = 54325
user = "email"
pass = "anything"

I also tried host = "host.docker.internal"

It would be helpful to add those notes in the config.toml in a new project, and to have a "migrate" function of the CLI to bring my config file up to current, keeping existing settings I changed.

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

No branches or pull requests

1 participant