-
Notifications
You must be signed in to change notification settings - Fork 629
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(webhook): Don't log warning when secondary job queue is empty #3942
Merged
npalm
merged 2 commits into
github-aws-runners:main
from
iainlane:iainlane/webhook-fix-warning
Jun 28, 2024
Merged
fix(webhook): Don't log warning when secondary job queue is empty #3942
npalm
merged 2 commits into
github-aws-runners:main
from
iainlane:iainlane/webhook-fix-warning
Jun 28, 2024
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
Right now the Terraform module is causing `${SQS_WORKFLOW_JOB_QUEUE}` to be set to an empty string. Since we pass this through currently, and explicitly check for `!== undefined` - not any falsy value - we end up trying to send to an empty queue and logging a warning. Doesn't break anything, but it's noisy in the logs. Fix this by checking for any falsy value instead, and also using `||` instead of `??` when setting the variable in the first place, so an empty string ends up as `undefined`. Also, modify the testsuite to check for the `SQS` being created at all, since that happens earlier on and reproduces the failure.
npalm
pushed a commit
that referenced
this pull request
Jun 27, 2024
…3943) We currently indicate that this feature is disabled by setting the env var to an empty string. But instead we could omit it, to avoid polluting the environment, and causing a warning to be logged. This is a companion to #3942. That one stops the warning mentioned, this one fixes the original cause by not setting the env var in the first place. Both could be merged, ideally.
npalm
approved these changes
Jun 28, 2024
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.
Thanks looks all good
npalm
added a commit
that referenced
this pull request
Jun 28, 2024
🤖 I have created a release *beep* *boop* --- ## [5.12.0](philips-labs/terraform-aws-github-runner@v5.11.0...v5.12.0) (2024-06-28) ### Features * add support for matcher config tiering options ([#3953](https://github.com/philips-labs/terraform-aws-github-runner/issues/3953)) ([5f9d9eb](philips-labs/terraform-aws-github-runner@5f9d9eb)) * **lambda:** add option to define explicit lambda tags ([#3934](https://github.com/philips-labs/terraform-aws-github-runner/issues/3934)) ([7e98943](philips-labs/terraform-aws-github-runner@7e98943)) ### Bug Fixes * **lambda:** bump braces from 3.0.2 to 3.0.3 in /lambdas ([#3944](https://github.com/philips-labs/terraform-aws-github-runner/issues/3944)) ([1aef82b](philips-labs/terraform-aws-github-runner@1aef82b)) * **lambda:** bump the aws group across 1 directory with 2 updates ([#3955](https://github.com/philips-labs/terraform-aws-github-runner/issues/3955)) ([2e094cf](philips-labs/terraform-aws-github-runner@2e094cf)) * **lambda:** bump the aws group across 1 directory with 6 updates ([#3949](https://github.com/philips-labs/terraform-aws-github-runner/issues/3949)) ([76fe9af](philips-labs/terraform-aws-github-runner@76fe9af)) * **webhook:** Don't log warning when secondary job queue is empty ([#3942](https://github.com/philips-labs/terraform-aws-github-runner/issues/3942)) ([ef25bd4](philips-labs/terraform-aws-github-runner@ef25bd4)) * **webhook:** Don't set `${SQS_WORKFLOW_JOB_QUEUE}` to empty string ([#3943](https://github.com/philips-labs/terraform-aws-github-runner/issues/3943)) ([6c48dff](philips-labs/terraform-aws-github-runner@6c48dff)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: forest-releaser[bot] <80285352+forest-releaser[bot]@users.noreply.github.com> Co-authored-by: forest-pr|bot <forest-pr[bot]@users.noreply.github.com> Co-authored-by: Niek Palm <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Right now the Terraform module is causing
${SQS_WORKFLOW_JOB_QUEUE}
to be set to an empty string. Since we pass this through currently, and explicitly check for!== undefined
- not any falsy value - we end up trying to send to an empty queue and logging a warning.Doesn't break anything, but it's noisy in the logs.
Fix this by checking for any falsy value instead, and also using
||
instead of??
when setting the variable in the first place, so an empty string ends up asundefined
. Also, modify the testsuite to check for theSQS
being created at all, since that happens earlier on and reproduces the failure.This is a companion to #3943. This one stops the warning, and that one fixes the original cause by not setting the env var in the first place. Both could be merged, ideally.