Skip to content

Fix broken test. #1254

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

Merged
merged 7 commits into from
Oct 5, 2022
Merged

Fix broken test. #1254

merged 7 commits into from
Oct 5, 2022

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Oct 4, 2022

Fix all test cases that were broken by #1253.

@taeold
Copy link
Contributor Author

taeold commented Oct 4, 2022

@taeold taeold force-pushed the dl-preserve-cfg-test branch from 14185c4 to b1ba499 Compare October 4, 2022 23:43
@taeold taeold force-pushed the dl-preserve-cfg-test branch 3 times, most recently from 23fcf16 to 564a0f5 Compare October 5, 2022 04:27
@taeold taeold force-pushed the dl-preserve-cfg-test branch 2 times, most recently from 298e778 to 69f223f Compare October 5, 2022 04:46
@taeold taeold force-pushed the dl-preserve-cfg-test branch from 69f223f to d1bd2a5 Compare October 5, 2022 16:16
@taeold taeold marked this pull request as ready for review October 5, 2022 16:28
@taeold taeold force-pushed the dl-preserve-cfg-test branch 2 times, most recently from 08d37c1 to f20fefb Compare October 5, 2022 17:37
@taeold taeold force-pushed the dl-preserve-cfg-test branch from f20fefb to becfbb5 Compare October 5, 2022 19:41
@taeold taeold force-pushed the dl-preserve-cfg-test branch from becfbb5 to 753648c Compare October 5, 2022 20:12
@taeold taeold merged commit 15c38b3 into dl-preserve-cfg Oct 5, 2022
@taeold taeold deleted the dl-preserve-cfg-test branch October 5, 2022 20:21
taeold added a commit that referenced this pull request Oct 5, 2022
This PR make some sweeping changes!

1) We change the default behavior of the SDK so that any un-annotated configuration option that is resettable are given `RESET_VALUE`. Practically, this means that given a function configuration like this:

```js
export const v2Req = onRequest(
  (req, res) => {
    res.sendStatus(200)
  },
);
```

And you go ahead and change the memory configuration of the function using GCP Console or `gcloud` tool, we will revert the memory back to platform default on the next function deploy.

2) You may optionally opt-out of this behavior by setting `preserveExternalChanges` option:

```js
exports.v1httpPreserve = functions
  .runWith({ preserveExternalChanges: true })
  .https.onRequest((req, resp) => {
    resp.status(200).send("PASS");
  });

functionsv2.setGlobalOptions({ preserveExternalChanges: true });

exports.v2http = functionsv2.https.onRequest((req, resp) => {
  resp.status(200).send("PASS");
});
```

This change broke a lot of test. I broke up the change for fixing test cases in a separate PR #1254.
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.

3 participants