Repository navigation
Conversation
edersonbrilhante
approved these changes
Aug 28, 2026
edersonbrilhante
left a comment
Contributor
There was a problem hiding this comment.
@zxkane Good catch
edersonbrilhante
requested changes
Aug 28, 2026
edersonbrilhante
left a comment
Contributor
There was a problem hiding this comment.
@zxkane Please sign your commit
zxkane
force-pushed
the
fix/lambda-module-log-level
branch
from
October 9, 2026 16:30
dec99d4 to
e1dbc85
Compare
PR github-aws-runners#5238 wrapped every LOG_LEVEL assignment with upper() so that Powertools v2 stops silently discarding the value, but it missed modules/lambda/main.tf. That module builds the environment for four functions: runners/job-retry, termination-watcher/deregister-retry, termination-watcher/notification and termination-watcher/termination. The variable is validated against lowercase names only ("debug", "info", "warn", "error"), so the value reaching those four functions can never match Powertools' uppercase LogLevelThreshold keys. Every level silently resolves to INFO. Requesting "debug" yields no debug output, and requesting "warn" or "error" yields more output than asked for. POWERTOOLS_LOGGER_LOG_EVENT keeps comparing the raw lowercase variable, which is still correct.
zxkane
force-pushed
the
fix/lambda-module-log-level
branch
from
October 9, 2026 16:31
e1dbc85 to
6c22bfa
Compare
Contributor
|
@zxkane Can you also fix in v2 modules |
Author
|
@edersonbrilhante I've added the same fix to the v2 webhook job-retry module in 85ae546. The commit is signed and verified by GitHub. All 7 local Terraform tests pass, including regression coverage for uppercase log levels, debug-only event logging, and environment override precedence. Formatting and validation also pass. Could you take another look and approve the pending CI runs? Thanks! |
This branch has not been deployed
This file contains hidden or 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
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.
Description
Follow-up to #5238: normalize
LOG_LEVELwithupper()in the sharedmodules/lambdamodule and the v2modules/orchestration-providers/webhook/job-retrymodule so Powertools Logger receives the uppercase environment values it expects.This covers legacy job retry and termination-watcher functions as well as v2 job retry, as requested in review. Both job-retry implementations now produce consistent log-level values during v1-to-v2 migration.
POWERTOOLS_LOGGER_LOG_EVENTstill uses the original lowercase input, and explicit caller-provided environment overrides retain their precedence.Validation
terraform fmt -recursive -check=true -write=falsepassed.terraform init -backend=false -input=false,terraform validate, andterraform testpassed (7 tests).traceanddebug, then passed after the fix. Coverage checks uppercase values in the planned Lambda environment, debug-only event logging, and explicitLOG_LEVELoverride precedence.85ae5468798a8282e3b10ec9783b7ccec886be13is SSH-signed; GitHub reports the signature as Verified.The semantic commit check passed on the updated head. Terraform checks, Terraform lifecycle (including migration tests), smoke tests, CodeQL, dependency review, and OSV scanning require upstream approval to run this fork PR (
action_required); these checks have not run on the new commit. The previous head failed four migration-test jobs because the v2 job-retry Lambda required an infrastructure update.