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

feat(totalPreviewChannelLimit): add option to manage preview channels to avoid hitting the channel quota #400

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

weilinzung
Copy link
Contributor

@weilinzung weilinzung commented Dec 10, 2024

Part of the solution for #60

  • I also would like to make another PR to solve the above issue once this is approved and merged, like the "removeChannel" would be useful.
  • Also, the existing "pre-commit" hooks don't work, I made improvements and fixed the issue

What’s Changed:

  1. Added totalPreviewChannelLimit Input Option:

    • Where: action.yml, README.md
    • I added a new input to control the number of preview channels Firebase Hosting will use. By setting the totalPreviewChannelLimit, you can avoid hitting the hosting quota limit (currently set at 50 channels).
      Once the limit is reached, older preview channels are automatically removed, preventing errors like "channel quota reached."
  2. New Function for Managing Preview Channels:

    • Where: src/deploy.ts
    • Introduced the getAllChannels function to list all active preview channels in the Firebase project, making it easier to track the quota.
    • Added removePreviews, which removes older preview channels when the totalPreviewChannelLimit is reached. It uses the removeChannel function to delete specific channels.
    • The removeChannel function allows the deletion of specific preview channels by their ID, helping manage the number of active channels.
  3. Docs Updates:

    • Where: README.md, action.yml
    • We updated the documentation to include the new totalPreviewChannelLimit option, explaining how to set it up and how it interacts with Firebase Hosting’s limits.

Why This Matters:

This change aims to give you more control over Firebase Hosting preview channels. Now, you can prevent hitting the 50-channel limit by automatically cleaning up older channels when necessary, saving you from unexpected errors in your deployment process.

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

Successfully merging this pull request may close these issues.

1 participant