Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schedule function deployment #1305

Merged
merged 6 commits into from Nov 14, 2022

Conversation

colerogers
Copy link
Contributor

@colerogers colerogers commented Nov 8, 2022

  • Fixes schedule function deployment by always returning a retryConfig from init schedule trigger
  • Fixes a bug in task queues where some properties of retryConfig and rateLimits were not resettable if the user supplied any options
  • Fixes a bug in testLab where the reset-able endpoint options weren't being added in

@colerogers colerogers changed the title Fix scheduled function deployment Fix schedule function deployment Nov 9, 2022
@colerogers colerogers marked this pull request as ready for review November 10, 2022 14:39
src/v2/providers/tasks.ts Outdated Show resolved Hide resolved
@@ -274,7 +274,7 @@ export function region(
*
* Value must not be null.
*/
export function runWith(runtimeOptions: RuntimeOptions): FunctionBuilder {
export function runWith(runtimeOptions: DeploymentOptions): FunctionBuilder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this would mean things like region would also be suggested in runWith which shouldn't be.

I wonder I made the mistake of setting preserveExternalChanges Deployment Option instead of Runtime Option. It doesn't sound right that preserveExternalChanges is a runtime option, but then that's the only way I can abuse runWith tag 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah I figured this was a bug since I couldn't figure out a way to use preserveExternalChanges without making this change. Also, the v1 docs show preserveExternalChanges in the runtime options section - https://firebase.google.com/docs/functions/manage-functions#set_runtime_options

Should we just dump preserveExternalChanges into RuntimeOptions instead? That way we wouldn't have to fix any docs, but might not be the cleanest looking...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's dump it in RuntimeOptions. I think runWith is already a dumping of options.

Copy link
Contributor

@taeold taeold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - would consider moving the preserveExternalChanges option to runtime options instead.

@colerogers colerogers merged commit 0b066d6 into master Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants