[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Kotlin implementation for Https callable functions #5009

Merged
merged 6 commits into from
May 16, 2023
Merged

Conversation

sam-gc
Copy link
Contributor
@sam-gc sam-gc commented May 16, 2023

No description provided.

@github-actions
Copy link
Contributor
github-actions bot commented May 16, 2023
Javadoc Changes:
--- /Users/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/functions/ktx/package-summary.html	2023-05-16 19:40:02.000000000 +0000
+++ /Users/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/functions/ktx/package-summary.html	2023-05-16 19:36:01.000000000 +0000
@@ -35,6 +35,20 @@
               <p>Returns the <code><a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a></code> instance of a given <code><a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.ktx.Firebase).functions(kotlin.String)">regionOrCustomDomain</a></code>.</p>
             </td>
           </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableReference.html">HttpsCallableReference</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a>.<a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.functions.FirebaseFunctions).getHttpsCallable(kotlin.String,kotlin.Function1)">getHttpsCallable</a>(name:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>,&nbsp;init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableOptions.Builder.html">HttpsCallableOptions.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div>
+              <p>Returns a reference to the Callable HTTPS trigger with the given name and call options.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableReference.html">HttpsCallableReference</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a>.<a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.functions.FirebaseFunctions).getHttpsCallableFromUrl(java.net.URL,kotlin.Function1)">getHttpsCallableFromUrl</a>(url:&nbsp;<a href="https://developer.android.com/reference/kotlin/java/net/URL.html">URL</a>,&nbsp;init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableOptions.Builder.html">HttpsCallableOptions.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div>
+              <p>Returns a reference to the Callable HTTPS trigger with the given URL and call options.</p>
+            </td>
+          </tr>
         </tbody>
       </table>
     </div>
@@ -72,6 +86,16 @@
       <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ktx/Firebase.html">Firebase</a>.<a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.ktx.Firebase).functions(kotlin.String)">functions</a>(regionOrCustomDomain:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a></pre>
       <p>Returns the <code><a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a></code> instance of a given <code><a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.ktx.Firebase).functions(kotlin.String)">regionOrCustomDomain</a></code>.</p>
     </div>
+    <div class="api-item"><a name="(com.google.firebase.functions.FirebaseFunctions).getHttpsCallable(kotlin.String, kotlin.Function1)"></a><a name="-com.google.firebase.functions.FirebaseFunctions-.getHttpsCallable-kotlin.String-kotlin.Function1-"></a><a name="gethttpscallable"></a>
+      <h3 class="api-name" id="(com.google.firebase.functions.FirebaseFunctions).getHttpsCallable(kotlin.String,kotlin.Function1)">getHttpsCallable</h3>
+      <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a>.<a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.functions.FirebaseFunctions).getHttpsCallable(kotlin.String,kotlin.Function1)">getHttpsCallable</a>(name:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>,&nbsp;init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableOptions.Builder.html">HttpsCallableOptions.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableReference.html">HttpsCallableReference</a></pre>
+      <p>Returns a reference to the Callable HTTPS trigger with the given name and call options.</p>
+    </div>
+    <div class="api-item"><a name="(com.google.firebase.functions.FirebaseFunctions).getHttpsCallableFromUrl(java.net.URL, kotlin.Function1)"></a><a name="-com.google.firebase.functions.FirebaseFunctions-.getHttpsCallableFromUrl-java.net.URL-kotlin.Function1-"></a><a name="gethttpscallablefromurl"></a>
+      <h3 class="api-name" id="(com.google.firebase.functions.FirebaseFunctions).getHttpsCallableFromUrl(java.net.URL,kotlin.Function1)">getHttpsCallableFromUrl</h3>
+      <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/FirebaseFunctions.html">FirebaseFunctions</a>.<a href="/docs/reference/kotlin/com/google/firebase/functions/ktx/package-summary.html#(com.google.firebase.functions.FirebaseFunctions).getHttpsCallableFromUrl(java.net.URL,kotlin.Function1)">getHttpsCallableFromUrl</a>(url:&nbsp;<a href="https://developer.android.com/reference/kotlin/java/net/URL.html">URL</a>,&nbsp;init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableOptions.Builder.html">HttpsCallableOptions.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/functions/HttpsCallableReference.html">HttpsCallableReference</a></pre>
+      <p>Returns a reference to the Callable HTTPS trigger with the given URL and call options.</p>
+    </div>
     <h2>Extension properties</h2>
     <div class="api-item"><a name="(com.google.firebase.ktx.Firebase).getFunctions()"></a><a name="(com.google.firebase.ktx.Firebase).setFunctions()"></a><a name="-com.google.firebase.ktx.Firebase-.getFunctions--"></a><a name="-com.google.firebase.ktx.Firebase-.setFunctions--"></a>
       <h3 class="api-name" id="(com.google.firebase.ktx.Firebase).functions()">functions</h3>

@google-oss-bot
Copy link
Contributor
1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor
google-oss-bot commented May 16, 2023

@github-actions
Copy link
Contributor
github-actions bot commented May 16, 2023

Unit Test Results

  6 files  ±  0    6 suites  ±0   25s ⏱️ -19s
11 tests +  5  11 ✔️ +  5  0 💤 ±0  0 ±0 
22 runs  +10  22 ✔️ +10  0 💤 ±0  0 ±0 

Results for commit 77fd50a. ± Comparison against base commit 4f4ede7.

This pull request removes 1 and adds 6 tests. Note that renamed tests count towards both.
com.google.firebase.functions.FunctionsRegistrarTest ‑ getComponents_publishesLibVersionComponent
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should build callable with FAC settings (when false)
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should build callable with FAC settings (when true)
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should not use limited-use tokens by default
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl callable with FAC settings (when false)
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl callable with FAC settings (when true)
com.google.firebase.functions.ktx.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl should not use limited-use tokens by default

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-functions_ktx:
error: Added method com.google.firebase.functions.ktx.FunctionsKt.getHttpsCallable(com.google.firebase.functions.FirebaseFunctions,String,kotlin.jvm.functions.Function1<? super com.google.firebase.functions.HttpsCallableOptions.Builder,kotlin.Unit>) [AddedMethod]
error: Added method com.google.firebase.functions.ktx.FunctionsKt.getHttpsCallableFromUrl(com.google.firebase.functions.FirebaseFunctions,java.net.URL,kotlin.jvm.functions.Function1<? super com.google.firebase.functions.HttpsCallableOptions.Builder,kotlin.Unit>) [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor
google-oss-bot commented May 16, 2023

Size Report 1

Affected Products

  • firebase-functions-ktx

    TypeBase (4f4ede7)Merge (3d95744)Diff
    aar5.69 kB6.23 kB+538 B (+9.5%)
    apk (release)2.19 MB2.19 MB+392 B (+0.0%)

Test Logs

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

@sam-gc sam-gc requested a review from rlazo May 16, 2023 19:18
@sam-gc sam-gc marked this pull request as ready for review May 16, 2023 19:18
@google-oss-bot
Copy link
Contributor
google-oss-bot commented May 16, 2023

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-fn

    DeviceStatisticsDistributions
    oriole-32
    Percentile4f4ede73d95744DiffSignificant (?)
    p1066.8 ±7 μs68.0 ±6 μs+1.26 μs (+1.9%)NO
    p2570.4 ±8 μs71.1 ±7 μs+673 ns (+1.0%)NO
    p5078.5 ±12 μs79.3 ±12 μs+771 ns (+1.0%)NO
    p7597.3 ±27 μs94.6 ±26 μs-2.76 μs (-2.8%)NO
    p90115 ±39 μs118 ±57 μs+2.90 μs (+2.5%)NO

    20 test runs in comparison
    CommitTest Runs
    4f4ede7
    • 2023-05-16_17:08:34.083322_mRTZ
    • 2023-05-16_17:08:34.087277_GNRe
    • 2023-05-16_17:08:34.087313_Uefq
    • 2023-05-16_17:08:34.087327_XvKA
    • 2023-05-16_17:08:34.087340_BrTq
    • 2023-05-16_17:08:34.087350_MARa
    • 2023-05-16_17:08:34.087361_BBFe
    • 2023-05-16_17:08:34.087371_Jvps
    • 2023-05-16_17:08:34.087381_tUxz
    • 2023-05-16_17:08:34.087392_Wrnq
    3d95744
    • 2023-05-16_19:49:14.918677_hxvi
    • 2023-05-16_19:49:14.924058_vzvz
    • 2023-05-16_19:49:14.924086_rgEQ
    • 2023-05-16_19:49:14.924096_BGhm
    • 2023-05-16_19:49:14.924104_MtNh
    • 2023-05-16_19:49:14.924110_vZxV
    • 2023-05-16_19:49:14.924117_alSX
    • 2023-05-16_19:49:14.924124_xDwK
    • 2023-05-16_19:49:14.924131_gaQE
    • 2023-05-16_19:49:14.924138_xjoX
    redfin-30
    Percentile4f4ede73d95744DiffSignificant (?)
    p10139 ±19 μs141 ±17 μs+1.65 μs (+1.2%)NO
    p25145 ±19 μs150 ±16 μs+5.40 μs (+3.7%)NO
    p50154 ±19 μs163 ±16 μs+9.20 μs (+6.0%)NO
    p75168 ±22 μs183 ±17 μs+14.9 μs (+8.9%)NO
    p90190 ±28 μs211 ±26 μs+21.7 μs (+11.4%)NO

    20 test runs in comparison
    CommitTest Runs
    4f4ede7
    • 2023-05-16_17:08:34.083322_mRTZ
    • 2023-05-16_17:08:34.087277_GNRe
    • 2023-05-16_17:08:34.087313_Uefq
    • 2023-05-16_17:08:34.087327_XvKA
    • 2023-05-16_17:08:34.087340_BrTq
    • 2023-05-16_17:08:34.087350_MARa
    • 2023-05-16_17:08:34.087361_BBFe
    • 2023-05-16_17:08:34.087371_Jvps
    • 2023-05-16_17:08:34.087381_tUxz
    • 2023-05-16_17:08:34.087392_Wrnq
    3d95744
    • 2023-05-16_19:49:14.918677_hxvi
    • 2023-05-16_19:49:14.924058_vzvz
    • 2023-05-16_19:49:14.924086_rgEQ
    • 2023-05-16_19:49:14.924096_BGhm
    • 2023-05-16_19:49:14.924104_MtNh
    • 2023-05-16_19:49:14.924110_vZxV
    • 2023-05-16_19:49:14.924117_alSX
    • 2023-05-16_19:49:14.924124_xDwK
    • 2023-05-16_19:49:14.924131_gaQE
    • 2023-05-16_19:49:14.924138_xjoX
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile4f4ede73d95744DiffSignificant (?)
    p10192 ±4 ms197 ±4 ms+5.54 ms (+2.9%)NO
    p25197 ±4 ms203 ±5 ms+5.72 ms (+2.9%)NO
    p50205 ±5 ms211 ±5 ms+6.26 ms (+3.1%)NO
    p75213 ±5 ms220 ±5 ms+6.90 ms (+3.2%)NO
    p90221 ±6 ms235 ±9 ms+13.7 ms (+6.2%)NO

    20 test runs in comparison
    CommitTest Runs
    4f4ede7
    • 2023-05-16_17:08:34.083322_mRTZ
    • 2023-05-16_17:08:34.087277_GNRe
    • 2023-05-16_17:08:34.087313_Uefq
    • 2023-05-16_17:08:34.087327_XvKA
    • 2023-05-16_17:08:34.087340_BrTq
    • 2023-05-16_17:08:34.087350_MARa
    • 2023-05-16_17:08:34.087361_BBFe
    • 2023-05-16_17:08:34.087371_Jvps
    • 2023-05-16_17:08:34.087381_tUxz
    • 2023-05-16_17:08:34.087392_Wrnq
    3d95744
    • 2023-05-16_19:49:14.918677_hxvi
    • 2023-05-16_19:49:14.924058_vzvz
    • 2023-05-16_19:49:14.924086_rgEQ
    • 2023-05-16_19:49:14.924096_BGhm
    • 2023-05-16_19:49:14.924104_MtNh
    • 2023-05-16_19:49:14.924110_vZxV
    • 2023-05-16_19:49:14.924117_alSX
    • 2023-05-16_19:49:14.924124_xDwK
    • 2023-05-16_19:49:14.924131_gaQE
    • 2023-05-16_19:49:14.924138_xjoX
    redfin-30
    Percentile4f4ede73d95744DiffSignificant (?)
    p10233 ±5 ms251 ±3 ms+18.7 ms (+8.0%)MAYBE
    p25238 ±5 ms257 ±3 ms+19.1 ms (+8.0%)MAYBE
    p50245 ±5 ms264 ±2 ms+19.7 ms (+8.1%)MAYBE
    p75253 ±5 ms273 ±3 ms+19.9 ms (+7.9%)MAYBE
    p90262 ±6 ms285 ±5 ms+23.5 ms (+9.0%)MAYBE

    20 test runs in comparison
    CommitTest Runs
    4f4ede7
    • 2023-05-16_17:08:34.083322_mRTZ
    • 2023-05-16_17:08:34.087277_GNRe
    • 2023-05-16_17:08:34.087313_Uefq
    • 2023-05-16_17:08:34.087327_XvKA
    • 2023-05-16_17:08:34.087340_BrTq
    • 2023-05-16_17:08:34.087350_MARa
    • 2023-05-16_17:08:34.087361_BBFe
    • 2023-05-16_17:08:34.087371_Jvps
    • 2023-05-16_17:08:34.087381_tUxz
    • 2023-05-16_17:08:34.087392_Wrnq
    3d95744
    • 2023-05-16_19:49:14.918677_hxvi
    • 2023-05-16_19:49:14.924058_vzvz
    • 2023-05-16_19:49:14.924086_rgEQ
    • 2023-05-16_19:49:14.924096_BGhm
    • 2023-05-16_19:49:14.924104_MtNh
    • 2023-05-16_19:49:14.924110_vZxV
    • 2023-05-16_19:49:14.924117_alSX
    • 2023-05-16_19:49:14.924124_xDwK
    • 2023-05-16_19:49:14.924131_gaQE
    • 2023-05-16_19:49:14.924138_xjoX

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

@sam-gc sam-gc merged commit fce5c40 into master May 16, 2023
@sam-gc sam-gc deleted the sam-gc/fac-kt branch May 16, 2023 19:38
@firebase firebase locked and limited conversation to collaborators Jun 16, 2023
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