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

functions: got "Quota Exceeded" error while trying to update Waiting to retry #125

Open
ortegoncarlos opened this issue Feb 3, 2022 · 2 comments

Comments

@ortegoncarlos
Copy link

ortegoncarlos commented Feb 3, 2022

Hello, thanks for this awsome project.

Im getting this "Quota Exceed Error" after we passed the 50 functions, it seems is the write requests per minute quota and it cannot be inncresed

Captura de Pantalla 2022-02-03 a la(s) 10 59 46 a m

Captura de Pantalla 2022-02-03 a la(s) 11 13 37 a m

Cloud Functions API | Write requests per minute |   | 50 | 21.6 % | 55 % |  
Firebase Management API | Firebase Apps per project |   | 30 | 3.33 % | 3.33 % |  

@ortegoncarlos ortegoncarlos changed the title functions: got "Quota Exceeded" error while trying to update projects/loopay-test/locations/us-central1/functions/timestamper-createdAt_Transactions. Waiting to retry functions: got "Quota Exceeded" error while trying to update Waiting to retry Feb 3, 2022
@ortegoncarlos
Copy link
Author

ortegoncarlos commented Feb 3, 2022

As a workaround I have two methods, the first one is to put every group in separate steps and the second method is to split it in separate jobs using matrix

separate steps

cons:very slow


       - name: run deploy functions bgchecker
        uses: w9jds/firebase-action@master
        with:
            args: deploy --only functions:bgchecker --project=staging --force
        env:
            FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_PROD }}

      - name: run deploy functions mailer
        uses: w9jds/firebase-action@master
        with:
            args: deploy --only functions:mailer --project=staging --force
        env:
            FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_PROD }}
      - name: run deploy functions:sync
        uses: w9jds/firebase-action@master
        with:
            args: deploy --only functions:sync --project=staging --force
        env:
            FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_PROD }}

separate Jobs

cons: some unestable and some functions throw this error "code":9,"message":"Invalid source token"
pro: Much DRY and cool

 build_and_deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        group: [
          bgchecker,
          mailer,
          sync,
          timestamper,
          fileReader,
          slack,
          alegra,]
    steps:
      - uses: actions/checkout@v2
      - name: Install Node
        uses: actions/setup-node@v1
        with:
          node-version: 12.8

      - name: npm dependencies
        run: |
          cd functions
          npm install

      - name: run deploy functions
        uses: w9jds/firebase-action@master
        with:
            args: deploy --only functions:${{matrix.group}} --project=staging --force
        env:
            FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_PROD }}

@jeffjenk
Copy link

This worked well, a couple of tweaks that helped for me:

  • adding fail-fast: false means the whole run won't be for nothing if one of the groups fail to finish and you can just run that one again from the console
  • You can tweak the cluster if you have a lot of groups by adding a max-parallel param
 build_and_deploy:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      max-parallel: 5
      matrix:
        group: [
          bgchecker,
          mailer,
          sync,
          timestamper,
          fileReader,
          slack,
          alegra,]

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

2 participants