profile
viewpoint

ciarand/asciidocgo 2

Like asciidoctor, but in Go.

ciarand/433_assignment1 1

cesar and vigenere in python

ciarand/bootstrapping-with-ansible 1

Companion code for my Ansible screencast

ciarand/buoy 1

A simple vanilla JS micro-library.

ciarand/ciarand.github.io 1

My user page

ciarand/adn-fight 0

have two of your favorite ADN people (me and Rabryst) duke it out with NiceRank

ciarand/android-gcmnetworkmanager 0

Quickstart sample for the GcmNetworkManager API

ciarand/ansi-to-html 0

An ANSI to HTML5 converter

ciarand/ansible 0

Ansible is a radically simple IT orchestration engine that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

issue commentfirebase/firebase-js-sdk

@grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0 ? How do I fix this ?

Sometimes it can be tricky to make sure there aren't conflicting versions of node/npm, perhaps try some of the suggestions in the last comment here: https://stackoverflow.com/questions/57086717/how-can-i-fix-this-grpc-grpc-js-only-works-on-node-8-13-0-10-10-0 or look around to see how to make sure your npm and Node are using the version you think they are.

If none of that is any good, can you try the most recent Node 10.x.x?

lopeselio

comment created time in 2 minutes

pull request commentfirebase/firebase-functions

Add ingress settings support

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

<!-- cla_yes -->

marcelgoya

comment created time in 4 minutes

pull request commentfirebase/firebase-functions

Add ingress settings support

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

<!-- cla_yes -->

marcelgoya

comment created time in 4 minutes

pull request commentfirebase/firebase-functions

Add ingress settings support

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

<!-- need_author_cla -->

marcelgoya

comment created time in 5 minutes

pull request commentfirebase/firebase-functions

Add ingress settings support

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

<!-- need_author_cla -->

marcelgoya

comment created time in 5 minutes

push eventfirebase/firebase-ios-sdk

Sebastian Schmidt

commit sha 1a2e9b1e32d3023d6d6e00747684d1c2ee6aae42

WIP: Remove Targets without parsing

view details

push time in 6 minutes

push eventfirebase/firebase-ios-sdk

Sebastian Schmidt

commit sha efad95b56152f88349d1d26248fd001d8001dcd3

WIP: Remove Targets without parsing

view details

push time in 7 minutes

create barnchfirebase/firebase-ios-sdk

branch : mrschmidt/targetremoval

created branch time in 8 minutes

issue openedfirebase/firebase-tools

Batch operation limits are not enforced in emulator

<!-- DO NOT DELETE validate_template=true template_path=.github/ISSUE_TEMPLATE/bug_report.md -->

Description

There's a limit of 500 operations when submitting a batch operation on Firestore. However, the emulator doesn't enforce this limit and will allow batch operations containing many more than 500 writes, for instance.

Especially because it's unclear when something counts against this limit (e.g. creating a Timestamp), this inevitably will lead to surprises in production as local tests don't fail on the emulator.

[REQUIRED] Environment info

<!-- What version of the Firebase CLI (firebase-tools) are you using? Note that your issue may already be fixed in the latest versions. The latest version can be found at https://github.com/firebase/firebase-tools/releases -->

<!-- Output of firebase --version -->

firebase-tools: 8.16.1

<!-- e.g. macOS, Windows, Ubuntu -->

Platform: Windows 10

[REQUIRED] Test case

<!-- Provide a minimal, complete, and verifiable example (http://stackoverflow.com/help/mcve) -->

exports.test = functions.https.onRequest((req, res) => {
    var batch = db.batch();
    for (var i = 0; i < 500; i++) {
        var ref = db.collection("collection")
            .doc("doc" + i);
        batch.set(ref, {
                timestamp: admin.firestore.FieldValue.serverTimestamp()
            });
    }
    batch.commit()
        .then(function () {
            console.log("success");
            res.status(200).send('ok');
        })
        .catch(err => {
            console.error("failure", err)
            res.status(500).send('failure');
        });
});

[REQUIRED] Steps to reproduce

<!-- Provide the steps needed to reproduce the issue with the above test case. -->

  1. Start a Firestore and Firebase Functions emulator.
  2. Invoke the HTTPS request.

[REQUIRED] Expected behavior

<!-- What is the expected behavior? -->

  1. The function should fail with response code 500, because the batch limit is exceeded, noting from the documentation:

    A batched write can contain up to 500 operations. Each operation in the batch counts separately towards your Cloud Firestore usage. Within a write operation, field transforms like serverTimestamp, arrayUnion, and increment each count as an additional operation.

[REQUIRED] Actual behavior

<!-- Run the command with --debug flag, and include the logs below. -->

  1. The function succeeds on the emulator, despite exceeding the 500 operation limit. However, the function will fail in production.

created time in 8 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

+// Copyright 2020 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+//      http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import Foundation+import FirebaseCore++enum DownloadStatus {+  case notStarted+  case inProgress+  case completed+}++/// Progress and completion handlers for a model download.+class DownloadHandlers: NSObject {+  typealias ProgressHandler = (Float) -> Void+  typealias Completion = (Result<CustomModel, DownloadError>) -> Void++  var progressHandler: ProgressHandler?+  var completion: Completion++  init(progressHandler: ProgressHandler?, completion: @escaping Completion) {+    self.progressHandler = progressHandler+    self.completion = completion+  }+}++/// Manager for model downloads.+class ModelDownloadManager: NSObject {+  let app: FirebaseApp+  var modelInfo: ModelInfo+  var taskHandlers: [URLSessionDownloadTask: DownloadHandlers] = [:]++  private(set) var downloadStatus: DownloadStatus = .notStarted++  private lazy var downloadSession = URLSession(configuration: .ephemeral,+                                                delegate: self,+                                                delegateQueue: nil)++  init(app: FirebaseApp, modelInfo: ModelInfo) {+    self.app = app+    self.modelInfo = modelInfo+  }++  /// Associate progress and completion handlers with download task.+  private func setHandlers(for downloadTask: URLSessionDownloadTask, handlers: DownloadHandlers) {+    taskHandlers[downloadTask] = handlers+  }++  /// Get download handlers for the given download task.+  private func getHandlers(for downloadTask: URLSessionDownloadTask) -> DownloadHandlers? {+    return taskHandlers[downloadTask]+  }++  /// Asynchronously download model file to device.+  func startModelDownload(url: URL, progressHandler: DownloadHandlers.ProgressHandler? = nil,+                          completion: @escaping DownloadHandlers.Completion) {+    let downloadTask = downloadSession.downloadTask(with: url)+    let downloadHandlers = DownloadHandlers(+      progressHandler: progressHandler,+      completion: completion+    )+    setHandlers(for: downloadTask, handlers: downloadHandlers)+    downloadTask.resume()+    downloadStatus = .inProgress+  }+}++/// Extension to handle delegate methods.+extension ModelDownloadManager: URLSessionDownloadDelegate {+  func urlSession(_ session: URLSession,+                  downloadTask: URLSessionDownloadTask,+                  didFinishDownloadingTo location: URL) {+    guard let handlers = getHandlers(for: downloadTask) else { return }

The progress handler is optional, but the completion handler is required. The way I was thinking about it is - the model object is generated just in time to pass it along to the completion, and if there is no handler, there is no point creating a model object. Open to other suggestions as well.

manjanac

comment created time in 11 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

+// Copyright 2020 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+//      http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import Foundation+import FirebaseCore++enum DownloadStatus {+  case notStarted+  case inProgress+  case completed+}++/// Progress and completion handlers for a model download.+class DownloadHandlers: NSObject {+  typealias ProgressHandler = (Float) -> Void+  typealias Completion = (Result<CustomModel, DownloadError>) -> Void++  var progressHandler: ProgressHandler?+  var completion: Completion++  init(progressHandler: ProgressHandler?, completion: @escaping Completion) {+    self.progressHandler = progressHandler+    self.completion = completion+  }+}++/// Manager for model downloads.+class ModelDownloadManager: NSObject {+  let app: FirebaseApp+  var modelInfo: ModelInfo+  var taskHandlers: [URLSessionDownloadTask: DownloadHandlers] = [:]++  private(set) var downloadStatus: DownloadStatus = .notStarted++  private lazy var downloadSession = URLSession(configuration: .ephemeral,+                                                delegate: self,+                                                delegateQueue: nil)++  init(app: FirebaseApp, modelInfo: ModelInfo) {+    self.app = app+    self.modelInfo = modelInfo+  }++  /// Associate progress and completion handlers with download task.+  private func setHandlers(for downloadTask: URLSessionDownloadTask, handlers: DownloadHandlers) {+    taskHandlers[downloadTask] = handlers+  }++  /// Get download handlers for the given download task.+  private func getHandlers(for downloadTask: URLSessionDownloadTask) -> DownloadHandlers? {+    return taskHandlers[downloadTask]+  }++  /// Asynchronously download model file to device.+  func startModelDownload(url: URL, progressHandler: DownloadHandlers.ProgressHandler? = nil,+                          completion: @escaping DownloadHandlers.Completion) {+    let downloadTask = downloadSession.downloadTask(with: url)+    let downloadHandlers = DownloadHandlers(+      progressHandler: progressHandler,+      completion: completion+    )+    setHandlers(for: downloadTask, handlers: downloadHandlers)+    downloadTask.resume()+    downloadStatus = .inProgress+  }+}++/// Extension to handle delegate methods.+extension ModelDownloadManager: URLSessionDownloadDelegate {+  func urlSession(_ session: URLSession,+                  downloadTask: URLSessionDownloadTask,+                  didFinishDownloadingTo location: URL) {+    guard let handlers = getHandlers(for: downloadTask) else { return }+    downloadStatus = .completed+    let savedURL = ModelFileManager.modelsDirectory+      .appendingPathComponent(downloadedModelFileName)+    do {+      try ModelFileManager.moveFile(at: location, to: savedURL)+    } catch {+      handlers.completion(.failure(.internalError(description: error.localizedDescription)))+      return+    }++    modelInfo.path = savedURL.absoluteString

For the model file to be downloaded, I need the model download URL to already be stored in the modelInfo object (along with name, size, and hash). The path property (which is the local path of the model file on device) is the only one that should be set when the actual model file is downloaded. Ideally these are sequential operations, and all these properties are backed by UserDefaults. However, let's chat through any concerns and I'm open to suggestions to changing this!

manjanac

comment created time in 12 minutes

Pull request review commentfirebase/firebase-ios-sdk

Swift pods don't need ---use-libraries.

 jobs:         flags: [           '--use-modular-headers',           # Tests are skipped since the Swift tests need modules.-          '--skip-tests --use-libraries'+          '--skip-tests'

Good call, I was able to simplify it further since there was only one flag left and just added it directly in the command.

ryanwilson

comment created time in 16 minutes

delete branch firebase/firebase-admin-node

delete branch : hkj-apns-payload

delete time in 16 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

+// Copyright 2020 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+//      http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import Foundation+import FirebaseCore++enum DownloadStatus {+  case notStarted+  case inProgress+  case completed+}++/// Progress and completion handlers for a model download.+class DownloadHandlers: NSObject {+  typealias ProgressHandler = (Float) -> Void+  typealias Completion = (Result<CustomModel, DownloadError>) -> Void++  var progressHandler: ProgressHandler?+  var completion: Completion++  init(progressHandler: ProgressHandler?, completion: @escaping Completion) {+    self.progressHandler = progressHandler+    self.completion = completion+  }+}++/// Manager for model downloads.+class ModelDownloadManager: NSObject {+  let app: FirebaseApp+  var modelInfo: ModelInfo+  var taskHandlers: [URLSessionDownloadTask: DownloadHandlers] = [:]++  private(set) var downloadStatus: DownloadStatus = .notStarted++  private lazy var downloadSession = URLSession(configuration: .ephemeral,+                                                delegate: self,+                                                delegateQueue: nil)++  init(app: FirebaseApp, modelInfo: ModelInfo) {+    self.app = app+    self.modelInfo = modelInfo+  }++  /// Associate progress and completion handlers with download task.+  private func setHandlers(for downloadTask: URLSessionDownloadTask, handlers: DownloadHandlers) {+    taskHandlers[downloadTask] = handlers+  }++  /// Get download handlers for the given download task.+  private func getHandlers(for downloadTask: URLSessionDownloadTask) -> DownloadHandlers? {+    return taskHandlers[downloadTask]+  }++  /// Asynchronously download model file to device.+  func startModelDownload(url: URL, progressHandler: DownloadHandlers.ProgressHandler? = nil,+                          completion: @escaping DownloadHandlers.Completion) {+    let downloadTask = downloadSession.downloadTask(with: url)+    let downloadHandlers = DownloadHandlers(+      progressHandler: progressHandler,+      completion: completion+    )+    setHandlers(for: downloadTask, handlers: downloadHandlers)+    downloadTask.resume()+    downloadStatus = .inProgress+  }+}++/// Extension to handle delegate methods.+extension ModelDownloadManager: URLSessionDownloadDelegate {+  func urlSession(_ session: URLSession,+                  downloadTask: URLSessionDownloadTask,+                  didFinishDownloadingTo location: URL) {+    guard let handlers = getHandlers(for: downloadTask) else { return }+    downloadStatus = .completed+    let savedURL = ModelFileManager.modelsDirectory+      .appendingPathComponent(downloadedModelFileName)+    do {+      try ModelFileManager.moveFile(at: location, to: savedURL)+    } catch {+      handlers.completion(.failure(.internalError(description: error.localizedDescription)))+      return+    }++    modelInfo.path = savedURL.absoluteString+    guard let model = buildModel() else {+      handlers.completion(.failure(.internalError(description: "Incomplete model info.")))+      return+    }+    handlers.completion(.success(model))+  }++  func urlSession(_ session: URLSession,+                  downloadTask: URLSessionDownloadTask,+                  didWriteData bytesWritten: Int64,+                  totalBytesWritten: Int64,+                  totalBytesExpectedToWrite: Int64) {+    guard let handlers = getHandlers(for: downloadTask) else { return }+    let calculatedProgress = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite)+    handlers.progressHandler?(calculatedProgress)+  }+}++/// Extension to handle post-download operations.+extension ModelDownloadManager {+  var downloadedModelFileName: String {+    return "fbml_model__\(app.name)__\(modelInfo.name)"+  }++  /// Build custom model object from model info.+  func buildModel() -> CustomModel? {+    /// Build custom model only if the model file is already on device.+    guard let path = modelInfo.path else { return nil }+    let model = CustomModel(+      name: modelInfo.name,+      size: modelInfo.size,+      path: path,+      hash: modelInfo.modelHash+    )+    return model+  }++  /// Get the local path to model on device.+  func getLocalModelPath(model: CustomModel) -> URL? {

True. I stubbed it out for future use.

manjanac

comment created time in 16 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

 // limitations under the License.  import Foundation+import FirebaseCore

Good point, I took it out.

manjanac

comment created time in 16 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

+// Copyright 2020 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+//      http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import Foundation++class ModelFileManager: NSObject {

Done.

manjanac

comment created time in 16 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

 final class ModelDownloaderTests: XCTestCase {     XCTAssertEqual(modelInfoRetriever.modelInfo?.size, 562_336)   } +  /// Test to download model file - makes an actual network call.+  // TODO: Move this into a separate integration test and add unit test with mocks.+  func testStartModelDownload() {+    let testApp = FirebaseApp.app()!+    let functionName = #function+    let testModelName = "\(functionName)-test-model"+    let modelInfoRetriever = ModelInfoRetriever(+      app: testApp,+      modelName: testModelName+    )+    modelInfoRetriever.modelInfo = ModelInfo(

Typically, the only way that modelInfo is set is after downloading the info from server. I wanted to test the model file download functionality without making another call for model info, so this is a workaround until I separate out the integration and unit tests. Good point though, I will lock down ModelInfo from being externally modifiable in a future PR.

manjanac

comment created time in 17 minutes

push eventfirebase/firebase-ios-sdk

Ryan Wilson

commit sha eea647b9456b210486861ce7ed672e910b89e14c

Simplify workflow.

view details

push time in 17 minutes

push eventfirebase/firebase-admin-node

Hiranya Jayathilaka

commit sha a98a3cc275f9fee0474ff1905d2217a600d5f57e

fix(fcm): Support arbitrary custom values in the ApnsPayload (#1097)

view details

push time in 17 minutes

PR merged firebase/firebase-admin-node

fix(fcm): Support arbitrary custom values in the ApnsPayload

ApnsPayload can contain any valid JSON values.

Resolves #1023

+2 -2

1 comment

2 changed files

hiranya911

pr closed time in 17 minutes

issue closedfirebase/firebase-admin-node

Incorrect typings for ApnsPayload

ApnsPayload is typed as:

export interface ApnsPayload {

  /**
   * The `aps` dictionary to be included in the message.
   */
  aps: Aps;
  [customData: string]: object;
}

However, that prevents from passing string values as custom data.

Note that according to Apple

Your custom keys must have values with primitive types, such as dictionary, array, string, number, or Boolean. Custom keys are available in the userInfo dictionary of the UNNotificationContent object delivered to your app.

So I think the correct types should be something like either:

[customData: string]: any;

or

[customData: string]: JSON;

interface JSON {
    [x: string]: string|number|boolean|Date|JSON|JSONArray;
}
interface JsonArray extends Array<string|number|boolean|Date|JSON|JSONArray> { }

closed time in 17 minutes

sk-

pull request commentfirebase/firebase-admin-node

fix(fcm): Support arbitrary custom values in the ApnsPayload

Already covered in https://github.com/firebase/firebase-admin-node/blob/0d7238040a115099c969021fd9d876788b61d88b/test/unit/messaging/messaging.spec.ts#L3267-L3304

hiranya911

comment created time in 17 minutes

issue commentfirebase/firebase-functions

500 Server Error at random times with random subset of functions and cloud function logs empty.

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
dsg38

comment created time in 21 minutes

issue openedfirebase/firebase-functions

500 Server Error at random times with random subset of functions and cloud function logs empty.

<!-- DO NOT DELETE validate_template=true template_path=.github/ISSUE_TEMPLATE/---report-a-bug.md -->

Related issues

https://stackoverflow.com/questions/60975200/firebase-http-cloud-function-500-server-error-try-again https://issuetracker.google.com/issues/117181234 https://stackoverflow.com/questions/62269389/cloud-functions-responds-with-500-but-firebase-logs-empty

[REQUIRED] Version info

<!-- What versions of the following libraries are you using? Note that your issue may already be fixed in the latest versions. -->

node: v10.20.1

firebase-functions: 3.11.0

firebase-tools: 8.16.2

firebase-admin: 9.3.0

[REQUIRED] Test case

A random subset of my ~120 deployed cloud functions fail at random times with a 500 server error. There is no trace in the cloud function logs of these status 500 failed invocations:

<title>500 Server Error</title>
</head>

<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body>

I have a cron job running that pings each of the functions to check they are still reachable on the following schedule:

  • every 5 minutes, every day, between 11:00 UTC and 04:00 UTC.

In just the past few hours these are the counts of the the number of functions that are reporting 500 errors (I've dropped out the rows when zero fail). Don't want to read too much into this, but it does look like there's a pattern with failures occurring on the hour and for a couple of subsequent 5 min intervals, before things return to normal:

createdDatetime,numFail
2020-11-24 14:00:18.624000+00:00,1
2020-11-24 15:05:16.452000+00:00,67
2020-11-24 15:10:19.521000+00:00,62
2020-11-24 16:00:38.829000+00:00,21
2020-11-24 16:05:24.326000+00:00,80
2020-11-24 16:10:16.677000+00:00,74
2020-11-24 17:00:26.638000+00:00,6
2020-11-24 17:05:27.180000+00:00,77
2020-11-24 17:10:24.747000+00:00,73
2020-11-24 18:00:54.138000+00:00,1
2020-11-24 18:05:22.029000+00:00,73
2020-11-24 18:10:24.093000+00:00,73
2020-11-24 19:00:44.363000+00:00,6
2020-11-24 19:05:23.759000+00:00,83
2020-11-24 19:10:19.689000+00:00,80
2020-11-24 20:00:53.804000+00:00,1
2020-11-24 20:05:20.530000+00:00,88
2020-11-24 20:10:23.785000+00:00,88

The issuetracker issue I reference above has been closed with the google employee stating that this is expected behaviour. NB: They imply that this is due to rapid scaling up - this is not happening in my case - we have very low level usage across all of these functions.

In one of the stackoverflow comments, Doug Stevenson says "...I suggest simply ramping up your load more slowly and see if that helps.". Do you think this is the issue? If so, how would I implement this when the function usage is driven by our app users?

There has been no outage / downtime reported in the firebase or GCP status for cloud functions at those times (as far as I know).

<!-- Provide a minimal, complete, and verifiable example (http://stackoverflow.com/help/mcve) -->

[REQUIRED] Steps to reproduce

<!-- Provide the steps needed to reproduce the issue given the above test case. -->

[REQUIRED] Expected behavior

Functions not to randomly fail at random times with 500 error.

These failed executions to show up as errors in the logs.

[REQUIRED] Actual behavior

Functions randomly fail at random times with 500 error.

These failed executions do not show up as errors in the logs.

<!-- Please copy and paste any error logs from https://console.firebase.google.com/project/_/functions/logs. If you're experiencing a deployment issue, please copy and paste the entirety of firebase-debug.log -->

Were you able to successfully deploy your functions?

Yes

created time in 21 minutes

Pull request review commentfirebase/firebase-ios-sdk

Download model file

+// Copyright 2020 Google LLC+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+//      http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++import Foundation+import FirebaseCore++enum DownloadStatus {+  case notStarted+  case inProgress+  case completed+}++/// Progress and completion handlers for a model download.+class DownloadHandlers: NSObject {+  typealias ProgressHandler = (Float) -> Void+  typealias Completion = (Result<CustomModel, DownloadError>) -> Void++  var progressHandler: ProgressHandler?+  var completion: Completion++  init(progressHandler: ProgressHandler?, completion: @escaping Completion) {+    self.progressHandler = progressHandler+    self.completion = completion+  }+}++/// Manager for model downloads.+class ModelDownloadManager: NSObject {+  let app: FirebaseApp+  var modelInfo: ModelInfo+  var taskHandlers: [URLSessionDownloadTask: DownloadHandlers] = [:]++  private(set) var downloadStatus: DownloadStatus = .notStarted++  private lazy var downloadSession = URLSession(configuration: .ephemeral,+                                                delegate: self,+                                                delegateQueue: nil)++  init(app: FirebaseApp, modelInfo: ModelInfo) {+    self.app = app+    self.modelInfo = modelInfo+  }++  /// Associate progress and completion handlers with download task.+  private func setHandlers(for downloadTask: URLSessionDownloadTask, handlers: DownloadHandlers) {+    taskHandlers[downloadTask] = handlers+  }++  /// Get download handlers for the given download task.+  private func getHandlers(for downloadTask: URLSessionDownloadTask) -> DownloadHandlers? {+    return taskHandlers[downloadTask]+  }++  /// Asynchronously download model file to device.+  func startModelDownload(url: URL, progressHandler: DownloadHandlers.ProgressHandler? = nil,+                          completion: @escaping DownloadHandlers.Completion) {+    let downloadTask = downloadSession.downloadTask(with: url)+    let downloadHandlers = DownloadHandlers(+      progressHandler: progressHandler,+      completion: completion+    )+    setHandlers(for: downloadTask, handlers: downloadHandlers)+    downloadTask.resume()+    downloadStatus = .inProgress

The two download handlers are for progress tracking and completion. This mimics the signature of the public API (ModelDownloader). I don't think we're expecting multiple concurrent downloads, is that what you mean?

manjanac

comment created time in 21 minutes

pull request commentfirebase/firebase-js-sdk

Remove SimpleQueryEngine

⚠️ No Changeset found

Latest commit: 1540e288f3238fc68deea00d75a7469282dc8c16

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.

<details><summary>This PR includes no changesets</summary>

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

</details>

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

schmidt-sebastian

comment created time in 23 minutes

PR opened firebase/firebase-js-sdk

Remove SimpleQueryEngine

Hey there! So you want to contribute to a Firebase SDK? Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here. If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help us make Firebase APIs better, please propose your change in an issue so that we can discuss it together.
+217 -382

0 comment

7 changed files

pr created time in 23 minutes

create barnchfirebase/firebase-js-sdk

branch : mrschmidt/removesimplequeryengine

created branch time in 23 minutes

PR opened firebase/firebase-admin-node

fix(fcm): Support arbitrary custom values in the ApnsPayload

ApnsPayload can contain any valid JSON values.

Resolves #1023

+2 -2

0 comment

2 changed files

pr created time in 30 minutes

create barnchfirebase/firebase-admin-node

branch : hkj-apns-payload

created branch time in 31 minutes

more