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

fix filter check to allow firestore targets #4722

Merged
merged 6 commits into from
Jul 8, 2022
Merged

fix filter check to allow firestore targets #4722

merged 6 commits into from
Jul 8, 2022

Conversation

bkendall
Copy link
Contributor

@bkendall bkendall commented Jul 8, 2022

Description

Fixes #4698

--only firestore:rules was not working (or :indexes) because the check only allowed hosting or functions to specify targets like that. This check was fixed when it was rewritten to actually return errors, but it didn't include firestore in the allowed list for targets.

Scenarios Tested

  • firebase deploy --only firestore:rules
  • firebase deploy --except firestore:rules
  • firebase deploy --only hosting
  • firebase deploy --only hosting:main

@bkendall bkendall requested review from joehan and taeold July 8, 2022 14:22
@bkendall bkendall enabled auto-merge (squash) July 8, 2022 15:42
@bkendall bkendall merged commit bb64f99 into master Jul 8, 2022
@bkendall bkendall deleted the bk-fix-filter branch July 8, 2022 16:00
@@ -38,13 +38,13 @@ export async function checkValidTargetFilters(options: Options): Promise<void> {
return reject(new FirebaseError("Cannot specify both --only and --except"));
}
const nonFilteredTypes = VALID_DEPLOY_TARGETS.filter(
(t) => !["hosting", "functions"].includes(t)
(t) => !["hosting", "functions", "firestore"].includes(t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bkendall, just want to chime in. Does it also support storage?

Our pipeline also deploy storage rules with --only

firebase deploy --only storage:rules 

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.

Can no longer only deploy firestore rules or firestore indexes
3 participants