firebase / firebase/firebase-admin-node

[FR] Let specify function region: `getFunctions(undefined, 'southamerica-east1')`

未关闭
#1,754 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
api: functions type: feature request
主要语言
TypeScript
星标
1.7k
派生
419
平均合并
3 天 10 小时
30 天内合并 PR
16

描述

**Is your feature request related to a problem? Please describe.**
Not applicable.

**Describe the solution you'd like**
I need to specify the region of the function that I'm calling when enqueuing a task with `firebase-admin`:
```js
await getFunctions().taskQueue('foo').enqueue({
id: '123',
})
```

**Describe alternatives you've considered**
None.

EDIT: Just found that it's possible to specify the region like the following snippet, but maybe still consider adding the region parameter to `getFunctions()` to make it similar to the JS SDK (as also suggested [here](https://github.com/firebase/firebase-admin-node/issues/1704#issuecomment-1127970126)) or at least mention this in the docs:
```js
await getFunctions().taskQueue('locations/southamerica-east1/functions/foo').enqueue({
id: '123',
})
```

**Additional context**
Firebase JS SDK works that way. You can pass the region as the second argument to `getFunctions()`: https://firebase.google.com/docs/reference/js/functions.md#getfunctions

贡献指南

打开贡献指南

调研方向

从 getFunctions 和 taskQueue 入口开始,然后检查现有的区域处理测试和文档。将 Firebase JS SDK 的 getFunctions 签名与 Admin Node.js API 进行比较;完成的标准是:要么支持所请求的区域参数并具有测试覆盖,要么明确说明文档化的 workaround。

由索引模型根据 Issue 内容生成。

评估

技术栈
firebase, typescript
领域
api, cloud
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。