Closed
Description
[REQUIRED] Environment info
firebase-tools: 12.2.1
Platform: Ubuntu 20.04.6 LTS
Node: 20.11.1
firebase-admin: ^12.0.0
firebase-functions: ^4.7.0
typescript: ^5.3.3
cloud functions 2nd gen
[REQUIRED] Test case
import { onSchedule } from 'firebase-functions/v2/scheduler';
import { defineString } from 'firebase-functions/params';
exports.testeCronjob = onSchedule(
{
schedule: defineString(`MY_CRONTAB`),
vpcConnector: defineString(`MY_VPC_CONNECTOR_NAME`),
vpcConnectorEgressSettings: defineString(`MY_VPC_CONNECTOR_EGRESS`),
},
myCronjobFunction,
);
[REQUIRED] Steps to reproduce
configure vpc connector with Parameterized configuration to set environment variable to set vpc connector egress settings.
And try to deploy.
[REQUIRED] Expected behavior
- No Typescrit error when trying to pass StringParam as input to ScheduleOptions.
- Load environment variables from
.env.projectId
- No deployment errors or warnings
[REQUIRED] Actual behavior
Error with several warning.
{"severity":"WARNING","message":"params.GLOBAL_ENVIRONMENT.value() invoked during function deployment, instead of during runtime."}
{"severity":"WARNING","message":"This is usually a mistake. In configs, use Params directly without calling .value()."}
{"severity":"WARNING","message":"example: { memory: memoryParam } not { memory: memoryParam.value() }"}
{"severity":"WARNING","message":"params.GLOBAL_ENVIRONMENT.value() invoked during function deployment, instead of during runtime."}
{"severity":"WARNING","message":"This is usually a mistake. In configs, use Params directly without calling .value()."}
{"severity":"WARNING","message":"example: { memory: memoryParam } not { memory: memoryParam.value() }"}
{"severity":"WARNING","message":"params.TEST_API_URL.value() invoked during function deployment, instead of during runtime."}
{"severity":"WARNING","message":"This is usually a mistake. In configs, use Params directly without calling .value()."}
{"severity":"WARNING","message":"example: { memory: memoryParam } not { memory: memoryParam.value() }"}
Error: Failed to parse build specification:
- FirebaseError string endpoints[testeCronjob].vpc.egressSettings failed validation