firebase-tools-with-isolate 15.28.2 → 15.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api.js +4 -2
- package/lib/apphosting/config.js +10 -8
- package/lib/apphosting/localbuilds.js +8 -0
- package/lib/apphosting/yaml.js +27 -0
- package/lib/bin/cli.js +1 -1
- package/lib/bin/mcp.js +8 -3
- package/lib/commands/ext-export.js +52 -14
- package/lib/commands/ext-migrate.js +70 -4
- package/lib/commands/ext-uninstall.js +2 -28
- package/lib/commands/functions-delete.js +6 -67
- package/lib/commands/functions-kits-install.js +7 -0
- package/lib/commands/functions-kits-uninstall.js +30 -86
- package/lib/crashlytics/onboarding.js +23 -2
- package/lib/deploy/apphosting/deploy.js +2 -1
- package/lib/deploy/apphosting/prepare.js +12 -3
- package/lib/deploy/apphosting/release.js +3 -0
- package/lib/deploy/apphosting/util.js +3 -1
- package/lib/deploy/extensions/secrets.js +10 -0
- package/lib/deploy/functions/delete.js +105 -0
- package/lib/deploy/functions/release/executor.js +14 -8
- package/lib/deploy/functions/release/fabricator.js +42 -20
- package/lib/deploy/functions/release/sourceTokenScraper.js +16 -2
- package/lib/emulator/downloadableEmulatorInfo.json +24 -24
- package/lib/emulator/tasksEmulator.js +2 -2
- package/lib/emulator/types.js +3 -1
- package/lib/extensions/askUserForParam.js +9 -8
- package/lib/extensions/export.js +47 -10
- package/lib/extensions/extensionsHelper.js +29 -2
- package/lib/extensions/manifest.js +5 -4
- package/lib/extensions/migrate.js +176 -2
- package/lib/extensions/paramHelper.js +78 -25
- package/lib/extensions/secretsUtils.js +3 -0
- package/lib/extensions/updateHelper.js +3 -1
- package/lib/functions/kits/install.js +322 -70
- package/lib/gcp/apikeys.js +89 -0
- package/lib/gcp/resourceManager.js +31 -22
- package/lib/gcp/run.js +2 -2
- package/lib/gcp/storage.js +3 -2
- package/lib/logger.js +83 -9
- package/lib/mcp/onemcp/index.js +19 -0
- package/lib/mcp/onemcp/onemcp_server.js +12 -7
- package/lib/mcp/tools/apphosting/fetch_logs.js +1 -0
- package/lib/mcp/tools/apphosting/list_backends.js +1 -0
- package/lib/mcp/tools/apptesting/tests.js +2 -0
- package/lib/mcp/tools/auth/get_users.js +1 -0
- package/lib/mcp/tools/auth/set_sms_region_policy.js +1 -0
- package/lib/mcp/tools/auth/update_user.js +1 -0
- package/lib/mcp/tools/core/create_android_sha.js +1 -0
- package/lib/mcp/tools/core/create_app.js +1 -0
- package/lib/mcp/tools/core/create_project.js +1 -0
- package/lib/mcp/tools/core/deploy.js +1 -0
- package/lib/mcp/tools/core/deploy_status.js +1 -0
- package/lib/mcp/tools/core/get_environment.js +1 -0
- package/lib/mcp/tools/core/get_project.js +1 -0
- package/lib/mcp/tools/core/get_sdk_config.js +1 -0
- package/lib/mcp/tools/core/get_security_rules.js +1 -0
- package/lib/mcp/tools/core/init.js +1 -0
- package/lib/mcp/tools/core/list_apps.js +1 -0
- package/lib/mcp/tools/core/list_projects.js +1 -0
- package/lib/mcp/tools/core/login.js +1 -0
- package/lib/mcp/tools/core/logout.js +1 -0
- package/lib/mcp/tools/core/read_resources.js +1 -0
- package/lib/mcp/tools/core/update_environment.js +1 -0
- package/lib/mcp/tools/core/validate_security_rules.js +1 -0
- package/lib/mcp/tools/crashlytics/events.js +2 -0
- package/lib/mcp/tools/crashlytics/issues.js +2 -0
- package/lib/mcp/tools/crashlytics/notes.js +3 -0
- package/lib/mcp/tools/crashlytics/reports.js +1 -0
- package/lib/mcp/tools/dataconnect/compile.js +1 -0
- package/lib/mcp/tools/dataconnect/execute.js +34 -19
- package/lib/mcp/tools/dataconnect/index.js +1 -1
- package/lib/mcp/tools/dataconnect/list_services.js +1 -0
- package/lib/mcp/tools/firestore/query_collection.js +1 -0
- package/lib/mcp/tools/functions/get_logs.js +1 -0
- package/lib/mcp/tools/functions/list_functions.js +1 -0
- package/lib/mcp/tools/index.js +3 -1
- package/lib/mcp/tools/messaging/send_message.js +1 -0
- package/lib/mcp/tools/realtime_database/get_data.js +1 -0
- package/lib/mcp/tools/realtime_database/set_data.js +1 -0
- package/lib/mcp/tools/remoteconfig/get_template.js +1 -0
- package/lib/mcp/tools/remoteconfig/update_template.js +1 -0
- package/lib/mcp/tools/storage/get_download_url.js +1 -0
- package/lib/prompt.js +10 -1
- package/lib/throttler/throttler.js +2 -11
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +26 -0
- package/package.json +5 -5
- package/templates/init/functions/typescript/index-kit-migration.ts +21 -2
- package/templates/init/functions/typescript/index-kit.ts +1 -0
- package/templates/init/functions/typescript/package-kit.json +21 -0
|
@@ -2,27 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const requireConfig_1 = require("../requireConfig");
|
|
5
|
+
const requireAuth_1 = require("../requireAuth");
|
|
5
6
|
const command_1 = require("../command");
|
|
6
7
|
const config_1 = require("../functions/kits/config");
|
|
7
8
|
const path_1 = require("path");
|
|
8
9
|
const error_1 = require("../error");
|
|
9
10
|
const prompt_1 = require("../prompt");
|
|
10
|
-
const functional_1 = require("../functional");
|
|
11
11
|
const posix_1 = require("path/posix");
|
|
12
12
|
const projectUtils_1 = require("../projectUtils");
|
|
13
13
|
const utils_1 = require("../utils");
|
|
14
|
-
const backend = require("../deploy/functions/backend");
|
|
15
|
-
const planner = require("../deploy/functions/release/planner");
|
|
16
|
-
const executor = require("../deploy/functions/release/executor");
|
|
17
|
-
const fabricator = require("../deploy/functions/release/fabricator");
|
|
18
|
-
const functionsDeployHelper_1 = require("../deploy/functions/functionsDeployHelper");
|
|
19
|
-
const functionsConfig = require("../functionsConfig");
|
|
20
|
-
const getProjectNumber_1 = require("../getProjectNumber");
|
|
21
|
-
const reporter = require("../deploy/functions/release/reporter");
|
|
22
14
|
const logger_1 = require("../logger");
|
|
15
|
+
const delete_1 = require("../deploy/functions/delete");
|
|
23
16
|
exports.command = new command_1.Command("functions:kits:uninstall")
|
|
24
17
|
.description("uninstall a function kit or kit instance from your project")
|
|
25
18
|
.before(requireConfig_1.requireConfig)
|
|
19
|
+
.before(requireAuth_1.requireAuth)
|
|
26
20
|
.option("--kit <kitId>", "")
|
|
27
21
|
.option("--instance <instanceId>", "")
|
|
28
22
|
.action(async (options) => {
|
|
@@ -78,19 +72,15 @@ async function handleInstance(options, config) {
|
|
|
78
72
|
const instanceConfigDirPath = kitForInstance.instances[instanceId];
|
|
79
73
|
const conservativeDeletion = nonstandardKitLayout(kitForInstance);
|
|
80
74
|
logger_1.logger.debug(`Kit ${kitForInstance.kit} uninstall mode: conservativeDeletion=${conservativeDeletion}`);
|
|
81
|
-
const projectsWithConfigs = [];
|
|
82
75
|
const configDirContents = config.lsProjectDir(instanceConfigDirPath);
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
projectsWithConfigs.push(fileName.slice(".env.".length));
|
|
89
|
-
}
|
|
90
|
-
if (projectsWithConfigs.length > 0 && !projectsWithConfigs.includes(projectId)) {
|
|
76
|
+
const envFileNames = configDirContents
|
|
77
|
+
.filter((f) => f.isFile() && f.name.startsWith(".env."))
|
|
78
|
+
.map((f) => f.name.slice(".env.".length));
|
|
79
|
+
const projectNamesInEnvs = envFileNames.map((envName) => options.rc ? options.rc.resolveAlias(envName) : envName);
|
|
80
|
+
if (projectNamesInEnvs.length > 0 && !projectNamesInEnvs.includes(projectId)) {
|
|
91
81
|
throw new error_1.FirebaseError(`Instance at ${instanceConfigDirPath} contains no .env file for current project`);
|
|
92
82
|
}
|
|
93
|
-
if (
|
|
83
|
+
if (envFileNames.length === 0 || envFileNames.length === 1) {
|
|
94
84
|
if (Object.keys(kitForInstance.instances).length > 1) {
|
|
95
85
|
await uninstallInstance(options, config, instanceId, instanceConfigDirPath, conservativeDeletion);
|
|
96
86
|
return;
|
|
@@ -107,7 +97,15 @@ async function handleInstance(options, config) {
|
|
|
107
97
|
await uninstallKit(options, config, kitForInstance);
|
|
108
98
|
return;
|
|
109
99
|
}
|
|
110
|
-
|
|
100
|
+
let filesystemNameForProject = projectId;
|
|
101
|
+
const envFilesWhichAliasToProject = envFileNames.filter((name) => (options.rc?.resolveAlias(name) || name) === projectId);
|
|
102
|
+
if (envFilesWhichAliasToProject.length > 1) {
|
|
103
|
+
throw new error_1.FirebaseError(`Instance ${instanceId} contains multiple .env files which ambiguously resolve to the current project ${envFilesWhichAliasToProject.map((s) => ".env." + s).join(", ")}`);
|
|
104
|
+
}
|
|
105
|
+
if (envFilesWhichAliasToProject.length === 1) {
|
|
106
|
+
filesystemNameForProject = envFilesWhichAliasToProject[0];
|
|
107
|
+
}
|
|
108
|
+
await uninstallProjectInstance(options, config, filesystemNameForProject, instanceId, instanceConfigDirPath);
|
|
111
109
|
}
|
|
112
110
|
async function uninstallInstance(options, config, instanceId, instanceConfigDirPath, onlyDeleteEmpty) {
|
|
113
111
|
const configDirContents = config.lsProjectDir(instanceConfigDirPath);
|
|
@@ -116,8 +114,8 @@ async function uninstallInstance(options, config, instanceId, instanceConfigDirP
|
|
|
116
114
|
if (!fileName.startsWith(".env.")) {
|
|
117
115
|
continue;
|
|
118
116
|
}
|
|
119
|
-
const
|
|
120
|
-
await uninstallProjectInstance(options, config,
|
|
117
|
+
const projectIdOrAlias = fileName.slice(".env.".length);
|
|
118
|
+
await uninstallProjectInstance(options, config, projectIdOrAlias, instanceId, instanceConfigDirPath);
|
|
121
119
|
}
|
|
122
120
|
if (!onlyDeleteEmpty || configDirEmpty(config, instanceConfigDirPath)) {
|
|
123
121
|
config.deleteProjectDir(instanceConfigDirPath);
|
|
@@ -140,70 +138,16 @@ async function uninstallInstance(options, config, instanceId, instanceConfigDirP
|
|
|
140
138
|
config.set("functions", functionsConfig);
|
|
141
139
|
config.writeProjectFile("firebase.json", config.src);
|
|
142
140
|
}
|
|
143
|
-
async function uninstallProjectInstance(options, config,
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
codebase: "",
|
|
154
|
-
projectId: context.projectId,
|
|
155
|
-
filters: context.filters,
|
|
156
|
-
deleteAll: true,
|
|
157
|
-
});
|
|
158
|
-
const allEpToDelete = Object.values(plan.regionalChangesets)
|
|
159
|
-
.map((changes) => changes.endpointsToDelete)
|
|
160
|
-
.reduce(functional_1.reduceFlat, [])
|
|
161
|
-
.sort(backend.compareFunctions);
|
|
162
|
-
if (allEpToDelete.length > 0) {
|
|
163
|
-
const deleteList = allEpToDelete.map((func) => `\t${(0, functionsDeployHelper_1.getFunctionLabel)(func)}`).join("\n");
|
|
164
|
-
const confirmDeletion = await (0, prompt_1.confirm)({
|
|
165
|
-
message: "You are about to delete the following Cloud Functions:\n" +
|
|
166
|
-
deleteList +
|
|
167
|
-
"\n Are you sure?",
|
|
168
|
-
default: false,
|
|
169
|
-
force: options.force,
|
|
170
|
-
nonInteractive: options.nonInteractive,
|
|
171
|
-
});
|
|
172
|
-
if (!confirmDeletion) {
|
|
173
|
-
throw new error_1.FirebaseError("Command aborted.");
|
|
174
|
-
}
|
|
175
|
-
const functionExecutor = new executor.QueueExecutor({
|
|
176
|
-
retries: 30,
|
|
177
|
-
backoff: 20000,
|
|
178
|
-
concurrency: 40,
|
|
179
|
-
maxBackoff: 40000,
|
|
180
|
-
});
|
|
181
|
-
const appEngineLocation = functionsConfig.getAppEngineLocation(config);
|
|
182
|
-
try {
|
|
183
|
-
const fab = new fabricator.Fabricator({
|
|
184
|
-
functionExecutor,
|
|
185
|
-
runFunctionExecutor: functionExecutor,
|
|
186
|
-
appEngineLocation,
|
|
187
|
-
executor: new executor.QueueExecutor({}),
|
|
188
|
-
sources: {},
|
|
189
|
-
projectNumber: await (0, getProjectNumber_1.getProjectNumber)({ projectId: context.projectId }),
|
|
190
|
-
projectId: context.projectId,
|
|
191
|
-
});
|
|
192
|
-
const summary = await fab.applyPlan({ default: plan });
|
|
193
|
-
await reporter.logAndTrackDeployStats(summary);
|
|
194
|
-
reporter.printErrors(summary);
|
|
195
|
-
if (summary.results.some((r) => r.error)) {
|
|
196
|
-
throw new error_1.FirebaseError("Some functions deletions failed. Not modifying firebase.json.");
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
200
|
-
throw new error_1.FirebaseError("Failed to delete functions", {
|
|
201
|
-
original: err,
|
|
202
|
-
exit: 1,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
141
|
+
async function uninstallProjectInstance(options, config, envName, instanceId, kitInstancePath) {
|
|
142
|
+
const projectId = options.rc?.resolveAlias(envName) || envName;
|
|
143
|
+
const envFilePath = (0, path_1.join)(kitInstancePath, `.env.${envName}`);
|
|
144
|
+
if (!config.projectFileExists(envFilePath)) {
|
|
145
|
+
throw new error_1.FirebaseError(`Expected to clean up project kit instance .env file at ${envFilePath}, but it doesn't exist.`);
|
|
146
|
+
}
|
|
147
|
+
const epFilters = [{ codebase: instanceId }];
|
|
148
|
+
const deployContext = { projectId: projectId, filters: epFilters };
|
|
149
|
+
const deletionCount = await (0, delete_1.deleteFunctionsByEndpointFilters)(deployContext, options);
|
|
150
|
+
if (deletionCount === 0) {
|
|
207
151
|
logger_1.logger.info(`No deployed functions found for instance ${instanceId}. This is normal if firebase deploy was never run.`);
|
|
208
152
|
}
|
|
209
153
|
config.deleteProjectFile(envFilePath);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CRASHLYTICS_TELEMETRY_RESOURCE_TYPE = exports.CRASHLYTICS_TELEMETRY_SINK_ID = exports.CRASHLYTICS_TELEMETRY_BUCKET_ID = void 0;
|
|
3
|
+
exports.CRASHLYTICS_TELEMETRY_SERVICE = exports.CRASHLYTICS_TELEMETRY_RESOURCE_TYPE = exports.CRASHLYTICS_TELEMETRY_SINK_ID = exports.CRASHLYTICS_TELEMETRY_BUCKET_ID = void 0;
|
|
4
4
|
exports.onboardCrashlyticsWeb = onboardCrashlyticsWeb;
|
|
5
5
|
const ensureApiEnabled_1 = require("../ensureApiEnabled");
|
|
6
6
|
const error_1 = require("../error");
|
|
@@ -8,9 +8,12 @@ const cloudbilling_1 = require("../gcp/cloudbilling");
|
|
|
8
8
|
const cloudlogging_1 = require("../gcp/cloudlogging");
|
|
9
9
|
const firebasetelemetry_1 = require("./firebasetelemetry");
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
|
+
const apikeys_1 = require("../gcp/apikeys");
|
|
12
|
+
const apps_1 = require("../management/apps");
|
|
11
13
|
exports.CRASHLYTICS_TELEMETRY_BUCKET_ID = "firebase-telemetry";
|
|
12
14
|
exports.CRASHLYTICS_TELEMETRY_SINK_ID = "firebase-telemetry-routing";
|
|
13
15
|
exports.CRASHLYTICS_TELEMETRY_RESOURCE_TYPE = "firebasetelemetry.googleapis.com/App";
|
|
16
|
+
exports.CRASHLYTICS_TELEMETRY_SERVICE = "firebasetelemetry.googleapis.com";
|
|
14
17
|
async function onboardCrashlyticsWeb(projectId, appId, options = {}) {
|
|
15
18
|
const billingEnabled = await (0, cloudbilling_1.checkBillingEnabled)(projectId);
|
|
16
19
|
if (!billingEnabled && options.nonInteractive) {
|
|
@@ -22,10 +25,28 @@ async function onboardCrashlyticsWeb(projectId, appId, options = {}) {
|
|
|
22
25
|
}
|
|
23
26
|
(0, utils_1.logLabeledBullet)("crashlytics", "Enabling required telemetry APIs...");
|
|
24
27
|
await Promise.all([
|
|
25
|
-
(0, ensureApiEnabled_1.ensure)(projectId,
|
|
28
|
+
(0, ensureApiEnabled_1.ensure)(projectId, exports.CRASHLYTICS_TELEMETRY_SERVICE, "crashlytics", false),
|
|
26
29
|
(0, ensureApiEnabled_1.ensure)(projectId, "firebasetelemetryadmin.googleapis.com", "crashlytics", false),
|
|
27
30
|
]);
|
|
28
31
|
(0, utils_1.logLabeledSuccess)("crashlytics", "Telemetry APIs enabled.");
|
|
32
|
+
const appConfig = await (0, apps_1.getAppConfig)(appId, apps_1.AppPlatform.WEB);
|
|
33
|
+
if ("apiKey" in appConfig && appConfig.apiKey) {
|
|
34
|
+
(0, utils_1.logLabeledBullet)("crashlytics", "Ensuring Crashlytics Telemetry API is permitted in API key restrictions...");
|
|
35
|
+
try {
|
|
36
|
+
await (0, apikeys_1.updateAppApiKeyRestriction)({
|
|
37
|
+
apiKey: appConfig.apiKey,
|
|
38
|
+
service: exports.CRASHLYTICS_TELEMETRY_SERVICE,
|
|
39
|
+
});
|
|
40
|
+
(0, utils_1.logLabeledSuccess)("crashlytics", "API key restrictions updated for Crashlytics Telemetry.");
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
(0, utils_1.logLabeledWarning)("crashlytics", err instanceof Error ? err.message : String(err));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
(0, utils_1.logLabeledWarning)("crashlytics", `No API key found for this app. If you configure an API key later, ` +
|
|
48
|
+
`please rerun this command or manually add '${exports.CRASHLYTICS_TELEMETRY_SERVICE}' to its allowed APIs in the Google Cloud Console if the key is restricted.`);
|
|
49
|
+
}
|
|
29
50
|
(0, utils_1.logLabeledBullet)("crashlytics", `Setting up Cloud Logging bucket '${exports.CRASHLYTICS_TELEMETRY_BUCKET_ID}'...`);
|
|
30
51
|
const bucket = await (0, cloudlogging_1.createOrUpdateLogBucket)(projectId, exports.CRASHLYTICS_TELEMETRY_BUCKET_ID, "global", true);
|
|
31
52
|
(0, utils_1.logLabeledSuccess)("crashlytics", "Cloud Logging bucket configured.");
|
|
@@ -11,6 +11,7 @@ const utils_1 = require("../../utils");
|
|
|
11
11
|
const util = require("./util");
|
|
12
12
|
const experiments = require("../../experiments");
|
|
13
13
|
const logger_1 = require("../../logger");
|
|
14
|
+
const constants_1 = require("../../apphosting/constants");
|
|
14
15
|
async function default_1(context, options) {
|
|
15
16
|
if (Object.entries(context.backendConfigs).length === 0) {
|
|
16
17
|
return;
|
|
@@ -79,7 +80,7 @@ async function default_1(context, options) {
|
|
|
79
80
|
const { bucket, object } = await gcs.uploadObject({
|
|
80
81
|
file: zippedSourcePath,
|
|
81
82
|
stream: fs.createReadStream(zippedSourcePath),
|
|
82
|
-
}, bucketName, isLocalBuild ? gcs.ContentType.TAR : gcs.ContentType.ZIP);
|
|
83
|
+
}, bucketName, isLocalBuild ? gcs.ContentType.TAR : gcs.ContentType.ZIP, isLocalBuild ? constants_1.CLOUD_RUN_SIZE_LIMIT_BYTES : undefined);
|
|
83
84
|
(0, utils_1.logLabeledBullet)("apphosting", `Uploaded at gs://${bucket}/${object}`);
|
|
84
85
|
context.backendStorageUris[cfg.backendId] =
|
|
85
86
|
`gs://${bucketName}/${path.basename(zippedSourcePath)}`;
|
|
@@ -130,6 +130,7 @@ async function default_1(context, options) {
|
|
|
130
130
|
}
|
|
131
131
|
const buildEnv = {};
|
|
132
132
|
const runtimeEnv = {};
|
|
133
|
+
const runConfigs = {};
|
|
133
134
|
for (const cfg of Object.values(context.backendConfigs)) {
|
|
134
135
|
if (!cfg.localBuild) {
|
|
135
136
|
continue;
|
|
@@ -154,7 +155,7 @@ async function default_1(context, options) {
|
|
|
154
155
|
const appDir = path.join(rootDir, cfg.rootDir || "");
|
|
155
156
|
(0, localbuilds_1.validateLocalBuildNodeVersion)(backend, appDir);
|
|
156
157
|
(0, utils_1.logLabeledBullet)("apphosting", `Starting local build for backend ${cfg.backendId}`);
|
|
157
|
-
await injectEnvVarsFromApphostingConfig(configs.filter((c) => c.backendId === cfg.backendId), options, buildEnv, runtimeEnv);
|
|
158
|
+
await injectEnvVarsFromApphostingConfig(configs.filter((c) => c.backendId === cfg.backendId), options, buildEnv, runtimeEnv, runConfigs);
|
|
158
159
|
await injectAutoInitEnvVars(cfg, backends, buildEnv, runtimeEnv);
|
|
159
160
|
const location = context.backendLocations[cfg.backendId];
|
|
160
161
|
await injectAngularEnvVars(cfg, rootDir, projectId, location, buildEnv, runtimeEnv);
|
|
@@ -165,6 +166,7 @@ async function default_1(context, options) {
|
|
|
165
166
|
const { outputFiles, buildConfig } = await (0, localbuilds_1.localBuild)(projectId, localBuildScratchDir, buildEnv[cfg.backendId] || {}, {
|
|
166
167
|
nonInteractive: options.nonInteractive,
|
|
167
168
|
allowLocalBuildSecrets: !!options.allowLocalBuildSecrets,
|
|
169
|
+
rootDir: cfg.rootDir,
|
|
168
170
|
});
|
|
169
171
|
context.backendLocalBuilds[cfg.backendId] = {
|
|
170
172
|
outputFiles,
|
|
@@ -172,6 +174,7 @@ async function default_1(context, options) {
|
|
|
172
174
|
buildConfig: {
|
|
173
175
|
...buildConfig,
|
|
174
176
|
env: mergeEnvVars(buildConfig.env || [], runtimeEnv[cfg.backendId] || {}),
|
|
177
|
+
...(runConfigs[cfg.backendId] ? { runConfig: runConfigs[cfg.backendId] } : {}),
|
|
175
178
|
},
|
|
176
179
|
};
|
|
177
180
|
}
|
|
@@ -181,13 +184,13 @@ async function default_1(context, options) {
|
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
}
|
|
184
|
-
async function injectEnvVarsFromApphostingConfig(configs, options, buildEnv, runtimeEnv) {
|
|
187
|
+
async function injectEnvVarsFromApphostingConfig(configs, options, buildEnv, runtimeEnv, runConfigs) {
|
|
185
188
|
for (const cfg of configs) {
|
|
186
189
|
const rootDir = options.projectRoot || process.cwd();
|
|
187
190
|
const appDir = path.join(rootDir, cfg.rootDir || "");
|
|
188
191
|
let yamlConfig = yaml_1.AppHostingYamlConfig.empty();
|
|
189
192
|
try {
|
|
190
|
-
yamlConfig = await (0, config_1.getAppHostingConfiguration)(appDir);
|
|
193
|
+
yamlConfig = await (0, config_1.getAppHostingConfiguration)(appDir, false);
|
|
191
194
|
}
|
|
192
195
|
catch (e) {
|
|
193
196
|
(0, utils_1.logLabeledWarning)("apphosting", `Failed to read apphosting.yaml, may be missing environment variables and other configs`);
|
|
@@ -195,6 +198,12 @@ async function injectEnvVarsFromApphostingConfig(configs, options, buildEnv, run
|
|
|
195
198
|
const { build, runtime } = (0, config_1.splitEnvVars)(yamlConfig.env);
|
|
196
199
|
buildEnv[cfg.backendId] = { ...buildEnv[cfg.backendId], ...build };
|
|
197
200
|
runtimeEnv[cfg.backendId] = { ...runtimeEnv[cfg.backendId], ...runtime };
|
|
201
|
+
if (runConfigs && yamlConfig.runConfig) {
|
|
202
|
+
const apiRunConfig = (0, yaml_1.toApiRunConfig)(yamlConfig.runConfig);
|
|
203
|
+
if (apiRunConfig) {
|
|
204
|
+
runConfigs[cfg.backendId] = { ...runConfigs[cfg.backendId], ...apiRunConfig };
|
|
205
|
+
}
|
|
206
|
+
}
|
|
198
207
|
}
|
|
199
208
|
}
|
|
200
209
|
async function injectAutoInitEnvVars(cfg, backends, buildEnv, runtimeEnv) {
|
|
@@ -30,6 +30,9 @@ async function default_1(context, options) {
|
|
|
30
30
|
rootDirectory,
|
|
31
31
|
runCommand: localBuild.buildConfig?.runCommand,
|
|
32
32
|
env: localBuild.buildConfig?.env,
|
|
33
|
+
...(localBuild.buildConfig?.runConfig
|
|
34
|
+
? { runConfig: localBuild.buildConfig.runConfig }
|
|
35
|
+
: {}),
|
|
33
36
|
},
|
|
34
37
|
}
|
|
35
38
|
: {
|
|
@@ -30,7 +30,9 @@ async function createLocalBuildTarArchive(config, rootDir, outputFiles, sizeLimi
|
|
|
30
30
|
ignoreStrings: ["firebase-debug.log", "firebase-debug.*.log"],
|
|
31
31
|
supportGitIgnore: false,
|
|
32
32
|
});
|
|
33
|
-
|
|
33
|
+
for (const rdrf of rdrFiles) {
|
|
34
|
+
allFiles.push(path.relative(rootDir, rdrf.name));
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
else {
|
|
36
38
|
allFiles.push(path.relative(rootDir, absolutePath));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleSecretParams = handleSecretParams;
|
|
4
4
|
exports.checkSpecForSecrets = checkSpecForSecrets;
|
|
5
|
+
exports.secretHasExtensionsLabel = secretHasExtensionsLabel;
|
|
5
6
|
exports.transferSecretToKits = transferSecretToKits;
|
|
6
7
|
const clc = require("colorette");
|
|
7
8
|
const secretUtils = require("../../extensions/secretsUtils");
|
|
@@ -140,6 +141,15 @@ async function getSecretInfo(projectId, secretName, version) {
|
|
|
140
141
|
}
|
|
141
142
|
return secretInfo;
|
|
142
143
|
}
|
|
144
|
+
async function secretHasExtensionsLabel(projectId, secretName) {
|
|
145
|
+
try {
|
|
146
|
+
const have = await secretManager.getSecret(projectId, secretName);
|
|
147
|
+
return secretUtils.SECRET_LABEL in have.labels;
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
throw new error_1.FirebaseError(`Error when retrieving current state of migrating secret ${projectId}/${secretName}: ${err instanceof Error ? err.message : String(err)}`, { original: err instanceof Error ? err : undefined });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
143
153
|
async function transferSecretToKits(projectId, secretName) {
|
|
144
154
|
const newLabels = {};
|
|
145
155
|
try {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteFunctionsByEndpointFilters = deleteFunctionsByEndpointFilters;
|
|
4
|
+
const backend = require("./backend");
|
|
5
|
+
const planner = require("./release/planner");
|
|
6
|
+
const executor = require("./release/executor");
|
|
7
|
+
const fabricator = require("./release/fabricator");
|
|
8
|
+
const functionsDeployHelper_1 = require("./functionsDeployHelper");
|
|
9
|
+
const getProjectNumber_1 = require("../../getProjectNumber");
|
|
10
|
+
const reporter = require("./release/reporter");
|
|
11
|
+
const prompt = require("../../prompt");
|
|
12
|
+
const functionsConfig = require("../../functionsConfig");
|
|
13
|
+
const error_1 = require("../../error");
|
|
14
|
+
const projectConfig_1 = require("../../functions/projectConfig");
|
|
15
|
+
async function deleteFunctionsByEndpointFilters(context, options) {
|
|
16
|
+
const allExistingBackend = await backend.existingBackend(context);
|
|
17
|
+
const targetedRegionBackend = options?.region
|
|
18
|
+
? backend.matchingBackend(allExistingBackend, (endpoint) => endpoint.region === options.region)
|
|
19
|
+
: allExistingBackend;
|
|
20
|
+
const codebases = new Set(backend.allEndpoints(allExistingBackend).map((ep) => ep.codebase || projectConfig_1.DEFAULT_CODEBASE));
|
|
21
|
+
const deploymentPlan = {};
|
|
22
|
+
for (const codebase of codebases) {
|
|
23
|
+
const allCodebaseBackend = backend.matchingBackend(allExistingBackend, (ep) => (ep.codebase || projectConfig_1.DEFAULT_CODEBASE) === codebase);
|
|
24
|
+
const targetedCodebaseBackend = backend.matchingBackend(targetedRegionBackend, (ep) => (ep.codebase || projectConfig_1.DEFAULT_CODEBASE) === codebase);
|
|
25
|
+
const totalEndpointsInGcp = backend.allEndpoints(allCodebaseBackend);
|
|
26
|
+
const endpointsToDelete = backend
|
|
27
|
+
.allEndpoints(targetedCodebaseBackend)
|
|
28
|
+
.filter((e) => (0, functionsDeployHelper_1.endpointMatchesAnyFilter)(e, context.filters));
|
|
29
|
+
let existingManagedSA;
|
|
30
|
+
if (endpointsToDelete.length > 0 && endpointsToDelete.length === totalEndpointsInGcp.length) {
|
|
31
|
+
const ep = totalEndpointsInGcp.find((e) => typeof e.serviceAccount === "string" && e.serviceAccount.startsWith("firebase-fn-"));
|
|
32
|
+
existingManagedSA = ep?.serviceAccount;
|
|
33
|
+
}
|
|
34
|
+
deploymentPlan[codebase] = await planner.createDeploymentPlan({
|
|
35
|
+
wantBackend: backend.empty(),
|
|
36
|
+
haveBackend: targetedCodebaseBackend,
|
|
37
|
+
codebase,
|
|
38
|
+
projectId: context.projectId,
|
|
39
|
+
filters: context.filters,
|
|
40
|
+
deleteAll: true,
|
|
41
|
+
existingManagedSA,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const allEpToDelete = Object.values(deploymentPlan)
|
|
45
|
+
.flatMap((plan) => Object.values(plan.regionalChangesets).flatMap((changes) => changes.endpointsToDelete))
|
|
46
|
+
.sort(backend.compareFunctions);
|
|
47
|
+
if (allEpToDelete.length === 0) {
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
const deleteList = allEpToDelete.map((func) => `\t${(0, functionsDeployHelper_1.getFunctionLabel)(func)}`).join("\n");
|
|
51
|
+
const saToDelete = Object.values(deploymentPlan)
|
|
52
|
+
.map((p) => p.serviceAccountToDelete)
|
|
53
|
+
.filter((sa) => !!sa);
|
|
54
|
+
let message = "You are about to delete the following Cloud Functions:\n" + deleteList;
|
|
55
|
+
if (saToDelete.length > 0) {
|
|
56
|
+
const saList = saToDelete.map((sa) => `\t${sa}`).join("\n");
|
|
57
|
+
message += "\n\nThe following managed service accounts will also be deleted:\n" + saList;
|
|
58
|
+
}
|
|
59
|
+
message += "\n Are you sure?";
|
|
60
|
+
const confirmDeletion = await prompt.confirm({
|
|
61
|
+
message,
|
|
62
|
+
default: false,
|
|
63
|
+
force: options?.force,
|
|
64
|
+
nonInteractive: options?.nonInteractive,
|
|
65
|
+
});
|
|
66
|
+
if (!confirmDeletion) {
|
|
67
|
+
throw new error_1.FirebaseError("Command aborted.");
|
|
68
|
+
}
|
|
69
|
+
const functionExecutor = new executor.QueueExecutor({
|
|
70
|
+
retries: 30,
|
|
71
|
+
backoff: 20000,
|
|
72
|
+
concurrency: 40,
|
|
73
|
+
maxBackoff: 40000,
|
|
74
|
+
});
|
|
75
|
+
try {
|
|
76
|
+
const firebaseConfig = await functionsConfig.getFirebaseConfig({
|
|
77
|
+
...options,
|
|
78
|
+
projectId: context.projectId,
|
|
79
|
+
});
|
|
80
|
+
const appEngineLocation = functionsConfig.getAppEngineLocation(firebaseConfig);
|
|
81
|
+
const fab = new fabricator.Fabricator({
|
|
82
|
+
functionExecutor,
|
|
83
|
+
runFunctionExecutor: functionExecutor,
|
|
84
|
+
appEngineLocation,
|
|
85
|
+
executor: new executor.QueueExecutor({}),
|
|
86
|
+
sources: {},
|
|
87
|
+
projectNumber: await (0, getProjectNumber_1.getProjectNumber)({ projectId: context.projectId }),
|
|
88
|
+
projectId: context.projectId,
|
|
89
|
+
});
|
|
90
|
+
const summary = await fab.applyPlan(deploymentPlan);
|
|
91
|
+
await reporter.logAndTrackDeployStats(summary);
|
|
92
|
+
reporter.printErrors(summary);
|
|
93
|
+
if (summary.results.some((r) => r.error)) {
|
|
94
|
+
throw new error_1.FirebaseError("At least one functions deletion operation failed.");
|
|
95
|
+
}
|
|
96
|
+
return allEpToDelete.length;
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
100
|
+
throw new error_1.FirebaseError(`Failed to delete functions: ${message}`, {
|
|
101
|
+
original: err instanceof Error ? err : undefined,
|
|
102
|
+
exit: 1,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InlineExecutor = exports.QueueExecutor = exports.isCloudRunResourceExhausted = exports.
|
|
3
|
+
exports.InlineExecutor = exports.QueueExecutor = exports.isCloudRunResourceExhausted = exports.isServiceAccountPropagationError = exports.isTransientError = exports.isServiceUnavailable = exports.isConflict = exports.isQuotaExhaustion = void 0;
|
|
4
4
|
exports.parseErrorCode = parseErrorCode;
|
|
5
5
|
exports.hasErrorCode = hasErrorCode;
|
|
6
6
|
const queue_1 = require("../../../throttler/queue");
|
|
@@ -22,8 +22,9 @@ const isServiceUnavailable = (err) => parseErrorCode(err) === 503;
|
|
|
22
22
|
exports.isServiceUnavailable = isServiceUnavailable;
|
|
23
23
|
const isTransientError = (err) => (0, exports.isQuotaExhaustion)(err) || (0, exports.isConflict)(err) || (0, exports.isServiceUnavailable)(err);
|
|
24
24
|
exports.isTransientError = isTransientError;
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const isServiceAccountPropagationError = (err) => {
|
|
26
|
+
const code = parseErrorCode(err);
|
|
27
|
+
if (code !== 404 && code !== 400) {
|
|
27
28
|
return false;
|
|
28
29
|
}
|
|
29
30
|
let message = "";
|
|
@@ -32,6 +33,7 @@ const isServiceAccount404 = (err) => {
|
|
|
32
33
|
err?.message,
|
|
33
34
|
err?.original?.message,
|
|
34
35
|
err?.context?.body?.error?.message,
|
|
36
|
+
err?.original?.context?.body?.error?.message,
|
|
35
37
|
String(err),
|
|
36
38
|
]
|
|
37
39
|
.filter(Boolean)
|
|
@@ -41,12 +43,16 @@ const isServiceAccount404 = (err) => {
|
|
|
41
43
|
catch {
|
|
42
44
|
message = String(err).toLowerCase();
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const hasSa = message.includes("serviceaccount") || message.includes("service account");
|
|
47
|
+
if (!hasSa) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (code === 404) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
return message.includes("invalid service account") && /\bfirebase-fn-[0-9]+@/i.test(message);
|
|
48
54
|
};
|
|
49
|
-
exports.
|
|
55
|
+
exports.isServiceAccountPropagationError = isServiceAccountPropagationError;
|
|
50
56
|
const isCloudRunResourceExhausted = (err) => parseErrorCode(err) === 8;
|
|
51
57
|
exports.isCloudRunResourceExhausted = isCloudRunResourceExhausted;
|
|
52
58
|
async function handler(op) {
|
|
@@ -160,7 +160,7 @@ class Fabricator {
|
|
|
160
160
|
secret,
|
|
161
161
|
serviceAccounts,
|
|
162
162
|
}), {
|
|
163
|
-
retryPredicates: [executor_1.isTransientError, executor_1.
|
|
163
|
+
retryPredicates: [executor_1.isTransientError, executor_1.isServiceAccountPropagationError],
|
|
164
164
|
})));
|
|
165
165
|
await Promise.all(secretAccessPromises);
|
|
166
166
|
const allChangesets = [];
|
|
@@ -325,16 +325,19 @@ class Fabricator {
|
|
|
325
325
|
apiFunction.httpsTrigger.securityLevel = "SECURE_ALWAYS";
|
|
326
326
|
}
|
|
327
327
|
const resultFunction = await this.functionExecutor
|
|
328
|
-
.run(async () => {
|
|
329
|
-
apiFunction.sourceToken
|
|
328
|
+
.run(() => scraper.withToken(async (token) => {
|
|
329
|
+
delete apiFunction.sourceToken;
|
|
330
|
+
if (token) {
|
|
331
|
+
apiFunction.sourceToken = token;
|
|
332
|
+
}
|
|
330
333
|
const op = await gcf.createFunction(apiFunction);
|
|
331
|
-
return poller.pollOperation({
|
|
334
|
+
return await poller.pollOperation({
|
|
332
335
|
...gcfV1PollerOptions,
|
|
333
336
|
pollerName: `create-${endpoint.codebase}-${endpoint.region}-${endpoint.id}`,
|
|
334
337
|
operationResourceName: op.name,
|
|
335
338
|
onPoll: scraper.poller,
|
|
336
339
|
});
|
|
337
|
-
}, { retryPredicates: [executor_1.isTransientError, executor_1.
|
|
340
|
+
}), { retryPredicates: [executor_1.isTransientError, executor_1.isServiceAccountPropagationError] })
|
|
338
341
|
.catch(rethrowAs(endpoint, "create"));
|
|
339
342
|
endpoint.uri = resultFunction?.httpsTrigger?.url;
|
|
340
343
|
if (backend.isHttpsTriggered(endpoint)) {
|
|
@@ -429,9 +432,12 @@ class Fabricator {
|
|
|
429
432
|
let resultFunction = null;
|
|
430
433
|
while (!resultFunction) {
|
|
431
434
|
resultFunction = await this.functionExecutor
|
|
432
|
-
.run(async () => {
|
|
433
|
-
if (
|
|
434
|
-
apiFunction.buildConfig.sourceToken
|
|
435
|
+
.run(() => scraper.withToken(async (token) => {
|
|
436
|
+
if (apiFunction.buildConfig) {
|
|
437
|
+
delete apiFunction.buildConfig.sourceToken;
|
|
438
|
+
if (experiments.isEnabled("functionsv2deployoptimizations") && token) {
|
|
439
|
+
apiFunction.buildConfig.sourceToken = token;
|
|
440
|
+
}
|
|
435
441
|
}
|
|
436
442
|
const op = await gcfV2.createFunction(apiFunction);
|
|
437
443
|
return await poller.pollOperation({
|
|
@@ -440,9 +446,8 @@ class Fabricator {
|
|
|
440
446
|
operationResourceName: op.name,
|
|
441
447
|
onPoll: scraper.poller,
|
|
442
448
|
});
|
|
443
|
-
}, { retryPredicates: [executor_1.isTransientError, executor_1.
|
|
449
|
+
}), { retryPredicates: [executor_1.isTransientError, executor_1.isServiceAccountPropagationError] })
|
|
444
450
|
.catch(async (err) => {
|
|
445
|
-
scraper.abort();
|
|
446
451
|
if (err.code === CLOUD_RUN_RESOURCE_EXHAUSTED_CODE) {
|
|
447
452
|
await this.deleteV2Function(endpoint);
|
|
448
453
|
return null;
|
|
@@ -516,8 +521,11 @@ class Fabricator {
|
|
|
516
521
|
}
|
|
517
522
|
const apiFunction = gcf.functionFromEndpoint(endpoint, sourceUrl);
|
|
518
523
|
const resultFunction = await this.functionExecutor
|
|
519
|
-
.run(async () => {
|
|
520
|
-
apiFunction.sourceToken
|
|
524
|
+
.run(() => scraper.withToken(async (token) => {
|
|
525
|
+
delete apiFunction.sourceToken;
|
|
526
|
+
if (token) {
|
|
527
|
+
apiFunction.sourceToken = token;
|
|
528
|
+
}
|
|
521
529
|
const op = await gcf.updateFunction(apiFunction);
|
|
522
530
|
return await poller.pollOperation({
|
|
523
531
|
...gcfV1PollerOptions,
|
|
@@ -525,7 +533,7 @@ class Fabricator {
|
|
|
525
533
|
operationResourceName: op.name,
|
|
526
534
|
onPoll: scraper.poller,
|
|
527
535
|
});
|
|
528
|
-
})
|
|
536
|
+
}), { retryPredicates: [executor_1.isTransientError, executor_1.isServiceAccountPropagationError] })
|
|
529
537
|
.catch(rethrowAs(endpoint, "update"));
|
|
530
538
|
endpoint.uri = resultFunction?.httpsTrigger?.url;
|
|
531
539
|
let invoker;
|
|
@@ -556,9 +564,12 @@ class Fabricator {
|
|
|
556
564
|
delete apiFunction.eventTrigger.pubsubTopic;
|
|
557
565
|
}
|
|
558
566
|
const resultFunction = await this.functionExecutor
|
|
559
|
-
.run(async () => {
|
|
560
|
-
if (
|
|
561
|
-
apiFunction.buildConfig.sourceToken
|
|
567
|
+
.run(() => scraper.withToken(async (token) => {
|
|
568
|
+
if (apiFunction.buildConfig) {
|
|
569
|
+
delete apiFunction.buildConfig.sourceToken;
|
|
570
|
+
if (experiments.isEnabled("functionsv2deployoptimizations") && token) {
|
|
571
|
+
apiFunction.buildConfig.sourceToken = token;
|
|
572
|
+
}
|
|
562
573
|
}
|
|
563
574
|
const op = await gcfV2.updateFunction(apiFunction);
|
|
564
575
|
return await poller.pollOperation({
|
|
@@ -567,9 +578,14 @@ class Fabricator {
|
|
|
567
578
|
operationResourceName: op.name,
|
|
568
579
|
onPoll: scraper.poller,
|
|
569
580
|
});
|
|
570
|
-
}, {
|
|
581
|
+
}), {
|
|
582
|
+
retryPredicates: [
|
|
583
|
+
executor_1.isTransientError,
|
|
584
|
+
executor_1.isCloudRunResourceExhausted,
|
|
585
|
+
executor_1.isServiceAccountPropagationError,
|
|
586
|
+
],
|
|
587
|
+
})
|
|
571
588
|
.catch((err) => {
|
|
572
|
-
scraper.abort();
|
|
573
589
|
logger_1.logger.error(err.message);
|
|
574
590
|
throw new reporter.DeploymentError(endpoint, "update", err);
|
|
575
591
|
});
|
|
@@ -637,7 +653,13 @@ class Fabricator {
|
|
|
637
653
|
operationResourceName: op.name,
|
|
638
654
|
};
|
|
639
655
|
await poller.pollOperation(pollerOptions);
|
|
640
|
-
}, {
|
|
656
|
+
}, {
|
|
657
|
+
retryPredicates: [
|
|
658
|
+
executor_1.isTransientError,
|
|
659
|
+
executor_1.isCloudRunResourceExhausted,
|
|
660
|
+
executor_1.isServiceAccountPropagationError,
|
|
661
|
+
],
|
|
662
|
+
})
|
|
641
663
|
.catch(rethrowAs(endpoint, "delete"));
|
|
642
664
|
}
|
|
643
665
|
async createRunFunction(endpoint) {
|
|
@@ -660,7 +682,7 @@ class Fabricator {
|
|
|
660
682
|
const op = await runV2.createService(endpoint.project, endpoint.region, endpoint.id, service);
|
|
661
683
|
endpoint.uri = op.uri;
|
|
662
684
|
endpoint.runServiceId = endpoint.id;
|
|
663
|
-
}, { retryPredicates: [executor_1.isTransientError, executor_1.
|
|
685
|
+
}, { retryPredicates: [executor_1.isTransientError, executor_1.isServiceAccountPropagationError] })
|
|
664
686
|
.catch(rethrowAs(endpoint, "create"));
|
|
665
687
|
const serviceName = `projects/${endpoint.project}/locations/${endpoint.region}/services/${endpoint.runServiceId}`;
|
|
666
688
|
if (backend.isHttpsTriggered(endpoint)) {
|