Skip to content

Commit

Permalink
Accept typo-ed callable label.
Browse files Browse the repository at this point in the history
  • Loading branch information
taeold committed Mar 16, 2022
1 parent 260d693 commit ac760c6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/gcp/cloudfunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,16 @@ export function endpointFromFunction(gcfFunction: CloudFunction): backend.Endpoi
trigger = {
taskQueueTrigger: {},
};
} else if (gcfFunction.labels?.["deployment-callable"]) {
} else if (
gcfFunction.labels?.["deployment-callable"] ||
// NOTE: "deployment-callabled" is a typo we introduced in https://github.com/firebase/firebase-tools/pull/4124.
// More than a month passed before we caught this typo, and we expect many callable functions in production
// to have this typo. The typo will be overwritten as callable functions are re-deployed. It is convenient for users
// for us to treat the typo-ed label as a valid marker for callable function, so we do that here.
//
// Sadly, we may have to carry this scar for a very long time.
gcfFunction.labels?.["deployment-callabled"]
) {
trigger = {
callableTrigger: {},
};
Expand Down

0 comments on commit ac760c6

Please sign in to comment.