This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
Fix MatchError from wrong number of values returned. #1083
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notriddle
approved these changes
Nov 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
bors bot
added a commit
that referenced
this pull request
Nov 17, 2020
1080: Bump copy-webpack-plugin from 6.1.0 to 6.3.1 in /assets r=notriddle a=dependabot-preview[bot] Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 6.1.0 to 6.3.1. 1082: Log unknown GitHub events in webhook r=notriddle a=zli-simspace While troubleshooting an issue, I see in our logs. ``` ** (FunctionClauseError) no function clause matching in BorsNG.WebhookController.do_webhook/3 ``` Unfortunately the error that follows shows only the first argument `conn` truncated and not the important second and third arguments. ## Solution Similar to `do_webhook_pr`, I've added a `do_webhook` clause to log the unknown cases. I have it return a 404 (so its close to the previous behaviour of returning a 500) but suggestions for a different behaviour are welcome. ## Test Tested by running ``` curl -X POST localhost:8000/webhook/github -H 'x-github-event: bogus' -d "{}" ``` with signature checking temporarily disabled and saw ``` [info] WebhookController: Got unknown Github event: bogus ``` in the server output. 1083: Fix MatchError from wrong number of values returned. r=notriddle a=zli-simspace In commit 9c555f8, the result of the first branch in ``` case toml_result do {:ok, toml} -> {toml.delete_merged_branches, toml.update_base_for_deletes} _ -> false end ``` is updated but not the second branch, resulting in a MatchError. This small PR fixes that. Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: zli <zli@simspace.com>
This PR was included in a batch that timed out, it will be automatically retried |
bors bot
added a commit
that referenced
this pull request
Nov 17, 2020
1081: Bump tesla from 1.3.3 to 1.4.0 r=notriddle a=dependabot-preview[bot] Bumps [tesla](https://github.com/teamon/tesla) from 1.3.3 to 1.4.0. 1082: Log unknown GitHub events in webhook r=notriddle a=zli-simspace While troubleshooting an issue, I see in our logs. ``` ** (FunctionClauseError) no function clause matching in BorsNG.WebhookController.do_webhook/3 ``` Unfortunately the error that follows shows only the first argument `conn` truncated and not the important second and third arguments. ## Solution Similar to `do_webhook_pr`, I've added a `do_webhook` clause to log the unknown cases. I have it return a 404 (so its close to the previous behaviour of returning a 500) but suggestions for a different behaviour are welcome. ## Test Tested by running ``` curl -X POST localhost:8000/webhook/github -H 'x-github-event: bogus' -d "{}" ``` with signature checking temporarily disabled and saw ``` [info] WebhookController: Got unknown Github event: bogus ``` in the server output. 1083: Fix MatchError from wrong number of values returned. r=notriddle a=zli-simspace In commit 9c555f8, the result of the first branch in ``` case toml_result do {:ok, toml} -> {toml.delete_merged_branches, toml.update_base_for_deletes} _ -> false end ``` is updated but not the second branch, resulting in a MatchError. This small PR fixes that. Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: zli <zli@simspace.com>
Build failed (retrying...):
|
bors bot
added a commit
that referenced
this pull request
Nov 17, 2020
1082: Log unknown GitHub events in webhook r=notriddle a=zli-simspace While troubleshooting an issue, I see in our logs. ``` ** (FunctionClauseError) no function clause matching in BorsNG.WebhookController.do_webhook/3 ``` Unfortunately the error that follows shows only the first argument `conn` truncated and not the important second and third arguments. ## Solution Similar to `do_webhook_pr`, I've added a `do_webhook` clause to log the unknown cases. I have it return a 404 (so its close to the previous behaviour of returning a 500) but suggestions for a different behaviour are welcome. ## Test Tested by running ``` curl -X POST localhost:8000/webhook/github -H 'x-github-event: bogus' -d "{}" ``` with signature checking temporarily disabled and saw ``` [info] WebhookController: Got unknown Github event: bogus ``` in the server output. 1083: Fix MatchError from wrong number of values returned. r=notriddle a=zli-simspace In commit 9c555f8, the result of the first branch in ``` case toml_result do {:ok, toml} -> {toml.delete_merged_branches, toml.update_base_for_deletes} _ -> false end ``` is updated but not the second branch, resulting in a MatchError. This small PR fixes that. Co-authored-by: zli <zli@simspace.com>
Build failed (retrying...):
|
Build succeeded: |
notriddle
added a commit
to bors-ng/bors-ng.github.io
that referenced
this pull request
Dec 2, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In commit 9c555f8, the result of the first branch in
is updated but not the second branch, resulting in a MatchError.
This small PR fixes that.