supabase / setup-cli

A GitHub action for interacting with your Supabase projects using the CLI.
MIT License
120 stars 16 forks source link

Error response from daemon: toomanyrequests: Data limit exceeded #128

Closed probablykasper closed 1 year ago

probablykasper commented 1 year ago

Bug report

Describe the bug

I sometimes get this error when running supabase start:

Pulling images... (1/13)
Error response from daemon: toomanyrequests: Data limit exceeded
Retrying after 4s: public.ecr.aws/supabase/postgres:14.1.0.89
Error response from daemon: toomanyrequests: Data limit exceeded
Retrying after [8](https://github.com/WebLime-agency/limey/actions/runs/4030771953/jobs/6929665577#step:6:9)s: public.ecr.aws/supabase/postgres:14.1.0.8[9](https://github.com/WebLime-agency/limey/actions/runs/4030771953/jobs/6929665577#step:6:10)
Error: Error response from daemon: toomanyrequests: Data limit exceeded
Try rerunning the command with --debug to troubleshoot the error.
Error: Process completed with exit code 1.

I'm assuming it's a Docker Hub rate limiting. If there's no way to get around the rate limit, maybe caching could be used to get around it.

To Reproduce

Use the ci.yml from the Supabase "Managing environments" docs, and run it handful of times:

name: CI

on:
  pull_request:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3

      - uses: supabase/setup-cli@v1

      - name: Start Supabase local development setup
        run: supabase start

      - name: Verify generated types are up-to-date
        run: |
          supabase gen types typescript --local > types.ts
          if [ "$(git diff --ignore-space-at-eol types.ts | wc -l)" -gt "0" ]; then
            echo "Detected uncommitted changes after build. See status below:"
            git diff
            exit 1
          fi
sweatybridge commented 1 year ago

Could you check the CLI version used in your CI workflow? If you are on 1.28.0 and above, the env var SUPABASE_INTERNAL_IMAGE_REGISTRY=ghcr.io should be automatically set by this action to use the GHCR mirror instead. It has much higher rate limits than ECR when ran from GHA.

      - uses: supabase/setup-cli@v1
        with:
          version: latest

      - name: Start Supabase local development setup
        run: supabase start
probablykasper commented 1 year ago

I don't have any version specified, since that's how it's set up in the Supabase CLI docs, so it should be 1.28.3

sweatybridge commented 1 year ago

That seems odd. Could you share with me the expanded action logs to confirm if the env var is set? For eg.

Screenshot 2023-01-30 at 12 39 13 PM

probablykasper commented 1 year ago

No environment variable there:

image
probablykasper commented 1 year ago

Thank you! :DD