File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Prevent the use of pinTags + minInstances on the same function, as the features are not mutually compatible (#6684 )
Original file line number Diff line number Diff line change @@ -218,6 +218,19 @@ export async function convertConfig(
218218 } ,
219219 } ;
220220 if ( rewrite . function . pinTag ) {
221+ // b/319616292. Functions currently set min instances at the revision
222+ // level and Run will maintain all those min instances for each revision
223+ // whenever that revision is accessible (e.g. via a traffic tag). This
224+ // can lead to customers paying lots of money with zero benefit. Until
225+ // Run makes min instances dynamic, we must not allow both features to
226+ // be used at the same time.
227+ if ( endpoint . minInstances ) {
228+ throw new FirebaseError (
229+ `Function ${ endpoint . id } has minInstances set and is in a rewrite ` +
230+ "pinTags=true. These features are not currently compatible with each " +
231+ "other."
232+ ) ;
233+ }
221234 experiments . assertEnabled ( "pintags" , "pin a function version" ) ;
222235 apiRewrite . run . tag = runTags . TODO_TAG_NAME ;
223236 }
You can’t perform that action at this time.
0 commit comments