Skip to content

Have CI deploy rules/functions to test project as needed #6531

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

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented Aug 15, 2022

Infrequently, someone may change one of the project config files in the config/ directory (database rules, firestore rules, or cloud functions) which needs to be pushed to the backend.

yarn test:setup can be used to push any changes to the test project the developer is using during development, but the CI tests run specifically against the jscore-sandbox project, and the same rules/functions need to be pushed to that project for CI tests to pass.

This detects if any of those files have changed and tries to deploy them efficiently to the backend using the only option (so if only firestore rules have changed, it only deploys firestore rules). If firebase.json changes, that is considered to require deploying everything.

This needs to complete before any tests run, but since the build step of any test workflow often takes a very long time, it should finish before any tests begin.

@hsubox76 hsubox76 requested a review from dwyfrequency as a code owner August 15, 2022 19:21
@changeset-bot
Copy link

changeset-bot bot commented Aug 15, 2022

⚠️ No Changeset found

Latest commit: b11d297

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 15, 2022

Size Report 1

Affected Products

  • @firebase/analytics

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?20.1 kB? (?)
    esm5?24.7 kB? (?)
    main?26.0 kB? (?)
    module?20.1 kB? (?)
  • @firebase/analytics-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?2.57 kB? (?)
    esm5?2.80 kB? (?)
    main?3.24 kB? (?)
    module?2.57 kB? (?)
  • @firebase/api-documenter

    TypeBase (474025c)Merge (cf6761c)Diff
    main?3.95 kB? (?)
  • @firebase/app

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?14.1 kB? (?)
    esm5?18.4 kB? (?)
    main?19.3 kB? (?)
    module?14.1 kB? (?)
  • @firebase/app-check

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?25.2 kB? (?)
    esm5?29.9 kB? (?)
    main?31.1 kB? (?)
    module?25.2 kB? (?)
  • @firebase/app-check-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?2.27 kB? (?)
    esm5?2.48 kB? (?)
    main?2.94 kB? (?)
    module?2.27 kB? (?)
  • @firebase/app-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?5.28 kB? (?)
    esm5?6.13 kB? (?)
    lite?4.06 kB? (?)
    main?6.73 kB? (?)
    module?5.28 kB? (?)
  • @firebase/auth

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?155 kB? (?)
    cordova?183 kB? (?)
    esm5?203 kB? (?)
    main?148 kB? (?)
    module?155 kB? (?)
    react-native?168 kB? (?)
  • @firebase/auth-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?20.2 kB? (?)
    esm5?27.1 kB? (?)
    main?29.6 kB? (?)
    module?20.2 kB? (?)
  • @firebase/auth/cordova

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?183 kB? (?)
    module?183 kB? (?)
  • @firebase/auth/internal

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?166 kB? (?)
    esm5?216 kB? (?)
    main?184 kB? (?)
    module?166 kB? (?)
  • @firebase/auth/react-native

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?168 kB? (?)
    module?168 kB? (?)
  • @firebase/component

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?6.54 kB? (?)
    esm5?8.61 kB? (?)
    main?8.99 kB? (?)
    module?6.54 kB? (?)
  • @firebase/database

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?248 kB? (?)
    esm5?276 kB? (?)
    main?281 kB? (?)
    module?248 kB? (?)
  • @firebase/database-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?18.0 kB? (?)
    esm5?21.1 kB? (?)
    main?21.8 kB? (?)
    module?18.0 kB? (?)
  • @firebase/database-compat/standalone

    TypeBase (474025c)Merge (cf6761c)Diff
    main?370 kB? (?)
  • @firebase/firestore

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?264 kB? (?)
    esm5?327 kB? (?)
    main?525 kB? (?)
    module?264 kB? (?)
    react-native?264 kB? (?)
  • @firebase/firestore-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?20.5 kB? (?)
    esm5?27.6 kB? (?)
    main?20.9 kB? (?)
    module?20.5 kB? (?)
    react-native?20.5 kB? (?)
  • @firebase/firestore-lite

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?80.7 kB? (?)
    esm5?96.5 kB? (?)
    main?136 kB? (?)
    module?80.7 kB? (?)
    react-native?80.9 kB? (?)
  • @firebase/functions

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?9.39 kB? (?)
    esm5?11.5 kB? (?)
    main?12.4 kB? (?)
    module?9.39 kB? (?)
  • @firebase/functions-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?1.79 kB? (?)
    esm5?1.98 kB? (?)
    main?2.34 kB? (?)
    module?1.79 kB? (?)
  • @firebase/installations

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?17.8 kB? (?)
    esm5?22.9 kB? (?)
    main?23.8 kB? (?)
    module?17.8 kB? (?)
  • @firebase/installations-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?945 B? (?)
    esm5?1.16 kB? (?)
    main?1.49 kB? (?)
    module?945 B? (?)
  • @firebase/logger

    TypeBase (474025c)Merge (cf6761c)Diff
    esm5?4.65 kB? (?)
    main?5.32 kB? (?)
    module?3.25 kB? (?)
  • @firebase/messaging

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?21.3 kB? (?)
    esm5?26.7 kB? (?)
    main?27.4 kB? (?)
    module?21.3 kB? (?)
  • @firebase/messaging-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?2.08 kB? (?)
    esm5?2.51 kB? (?)
    main?2.90 kB? (?)
    module?2.08 kB? (?)
  • @firebase/messaging-sw

    TypeBase (474025c)Merge (cf6761c)Diff
    main?30.1 kB? (?)
    module?23.3 kB? (?)
  • @firebase/performance

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?29.1 kB? (?)
    esm5?30.8 kB? (?)
    main?31.2 kB? (?)
    module?29.1 kB? (?)
  • @firebase/performance-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?1.10 kB? (?)
    esm5?1.38 kB? (?)
    main?1.69 kB? (?)
    module?1.10 kB? (?)
  • @firebase/remote-config

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?19.2 kB? (?)
    esm5?24.0 kB? (?)
    main?25.2 kB? (?)
    module?19.2 kB? (?)
  • @firebase/remote-config-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?1.85 kB? (?)
    esm5?2.76 kB? (?)
    main?3.09 kB? (?)
    module?1.85 kB? (?)
  • @firebase/rules-unit-testing

    TypeBase (474025c)Merge (cf6761c)Diff
    main?17.6 kB? (?)
  • @firebase/storage

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?54.5 kB? (?)
    esm5?60.5 kB? (?)
    main?57.4 kB? (?)
    module?54.5 kB? (?)
  • @firebase/storage-compat

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?5.67 kB? (?)
    esm5?8.41 kB? (?)
    main?8.82 kB? (?)
    module?5.67 kB? (?)
  • @firebase/util

    TypeBase (474025c)Merge (cf6761c)Diff
    browser?21.0 kB? (?)
    esm5?22.3 kB? (?)
    main?27.3 kB? (?)
    module?21.0 kB? (?)
  • @firebase/webchannel-wrapper

    TypeBase (474025c)Merge (cf6761c)Diff
    esm5?44.7 kB? (?)
    main?50.8 kB? (?)
    module?43.2 kB? (?)
  • bundle

    43 size changes

    TypeBase (474025c)Merge (cf6761c)Diff
    analytics (logEvent)?41.9 kB? (?)
    app-check (CustomProvider)?35.5 kB? (?)
    app-check (ReCaptchaEnterpriseProvider)?37.7 kB? (?)
    app-check (ReCaptchaV3Provider)?37.7 kB? (?)
    auth (Anonymous)?66.4 kB? (?)
    auth (EmailAndPassword)?70.5 kB? (?)
    auth (GoogleFBTwitterGitHubPopup)?90.4 kB? (?)
    auth (GooglePopup)?90.1 kB? (?)
    auth (GoogleRedirect)?90.3 kB? (?)
    auth (Phone)?76.6 kB? (?)
    database (Append to a list of data)?145 kB? (?)
    database (Filtering data)?144 kB? (?)
    database (Listen for child events)?160 kB? (?)
    database (Listen for value events + Detach listeners)?160 kB? (?)
    database (Listen for value events)?160 kB? (?)
    database (Read data once)?159 kB? (?)
    database (Save data as transactions)?162 kB? (?)
    database (Sort data)?145 kB? (?)
    database (Write data)?144 kB? (?)
    firestore (Persistence)?274 kB? (?)
    firestore (Query Cursors)?211 kB? (?)
    firestore (Query)?212 kB? (?)
    firestore (Read data once)?200 kB? (?)
    firestore (Realtime updates)?203 kB? (?)
    firestore (Transaction)?184 kB? (?)
    firestore (Write data)?184 kB? (?)
    firestore-lite (Query Cursors)?68.2 kB? (?)
    firestore-lite (Query)?71.4 kB? (?)
    firestore-lite (Read data once)?55.8 kB? (?)
    firestore-lite (Transaction)?80.3 kB? (?)
    firestore-lite (Write data)?65.5 kB? (?)
    functions (call)?29.3 kB? (?)
    messaging (send + receive)?45.3 kB? (?)
    performance (trace)?49.7 kB? (?)
    remote-config (getAndFetch)?44.3 kB? (?)
    storage (getBytes)?37.6 kB? (?)
    storage (getDownloadURL)?39.7 kB? (?)
    storage (getMetadata)?39.1 kB? (?)
    storage (list + listAll)?38.6 kB? (?)
    storage (updateMetadata)?39.4 kB? (?)
    storage (uploadBytes)?43.9 kB? (?)
    storage (uploadBytesResumable)?53.4 kB? (?)
    storage (uploadString)?44.2 kB? (?)

  • firebase

    31 size changes

    TypeBase (474025c)Merge (cf6761c)Diff
    firebase-analytics-compat.js?25.8 kB? (?)
    firebase-analytics.js?24.9 kB? (?)
    firebase-app-check-compat.js?22.9 kB? (?)
    firebase-app-check.js?21.7 kB? (?)
    firebase-app-compat.js?27.8 kB? (?)
    firebase-app.js?87.7 kB? (?)
    firebase-auth-compat.js?125 kB? (?)
    firebase-auth-cordova.js?137 kB? (?)
    firebase-auth-react-native.js?148 kB? (?)
    firebase-auth.js?116 kB? (?)
    firebase-compat.js?738 kB? (?)
    firebase-database-compat.js?166 kB? (?)
    firebase-database.js?153 kB? (?)
    firebase-firestore-compat.js?314 kB? (?)
    firebase-firestore-lite.js?86.1 kB? (?)
    firebase-firestore.js?312 kB? (?)
    firebase-functions-compat.js?8.12 kB? (?)
    firebase-functions.js?6.93 kB? (?)
    firebase-installations-compat.js?13.2 kB? (?)
    firebase-installations.js?12.5 kB? (?)
    firebase-messaging-compat.js?38.2 kB? (?)
    firebase-messaging-sw.js?26.0 kB? (?)
    firebase-messaging.js?24.8 kB? (?)
    firebase-performance-compat.js?30.7 kB? (?)
    firebase-performance-standalone-compat.es2017.js?87.6 kB? (?)
    firebase-performance-standalone-compat.js?65.4 kB? (?)
    firebase-performance.js?30.7 kB? (?)
    firebase-remote-config-compat.js?27.3 kB? (?)
    firebase-remote-config.js?26.4 kB? (?)
    firebase-storage-compat.js?38.2 kB? (?)
    firebase-storage.js?36.7 kB? (?)

  • functions

    TypeBase (474025c)Merge (cf6761c)Diff
    main?46 B? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/x2BFmoU0hc.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 15, 2022

Size Analysis Report 1

This report is too large (1,411,597 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/ReOjj7r83d.html

Copy link
Contributor

@dwyfrequency dwyfrequency left a comment

Choose a reason for hiding this comment

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

LGTM

Make "only" flags a string

Formatting pass

Add deploy step to Firestore workflows and Firefox job

Test functions deploy

Fix order

npm install functions if needed

Fix functions install path

Move to a separate workflow.

Test firestore rule change

Add functions

Revert test changes

Move comment
@hsubox76 hsubox76 merged commit 85b2320 into master Aug 25, 2022
@hsubox76 hsubox76 deleted the ch-test-setup branch August 25, 2022 16:49
@firebase firebase locked and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants