Skip to content

Add new Twilio lambda configurations in defaults.json - #4757

Open
dee-luo wants to merge 72 commits into
masterfrom
dee/lambdaMigration
Open

dee-luo wants to merge 72 commits into
masterfrom
dee/lambdaMigration

Conversation

@dee-luo

@dee-luo dee-luo commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Description

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

Removed unused feature flags for Twilio configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed several unused feature flags from staging configuration.
Removed unused Twilio lambda feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused Twilio lambda feature flags.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Removed unused channels and feature flags from staging configuration.
Removed unused feature flags from staging configuration.
Added enable_lambda_event_callback_url configuration.
Removed duplicate attributes for Twilio lambda configuration.
Added new feature flags for Twilio Lambda functionalities.
Changed the feature flag for Twilio lambda transfers from true to false.
Updated feature flags to disable Twilio Lambda functions.
Removed unused Twilio lambda feature flags.
@janorivera

Copy link
Copy Markdown
Collaborator

Two helplines end up with the TaskRouter callback and the janitor flag pointing to different places. We hit exactly this on USCH staging this week: the callback had been moved to the account-scoped Lambda, but use_twilio_lambda_janitor was still false, so the Lambda janitor skipped every event and the Serverless janitor never received them. Every conversation that went through the post-survey stayed active (task completed and survey control task canceled, but conversation never closed), and the next SMS from that number got stuck in the old conversation. Fixed on USCH staging by setting the flag to true.

USNC production: callback on Lambda, janitor off

  • usnc/common.hcl sets enable_lambda_event_callback_url = true, which applies to staging and production.
  • usnc/configs/service-configuration/production.json:8 still has "use_twilio_lambda_janitor": false.
  • USNC has enable_post_survey: true, so after the next USNC production apply, post-survey conversations wouldn't be closed in production.
  • Suggest removing that override (inherit true from defaults.json), or keeping USNC production on Serverless until it's moved.
  • Related: USNC staging already has the flag true live, but the repo says false (set by hand?). This PR fixes the repo side for staging by removing the override.

CA: callback on Serverless, Lambda flags on

  • 480f37871 moved CA's callback back to Serverless and 7ed63293e set CA staging's janitor / adjust_capacity / transition_participants to false (and 602b3893d transfers to false). That was consistent.
  • 0c8254e25 ("Clean up feature flags in staging configuration") then removed those false overrides, so CA now inherits true for all four from defaults.json while its events still go to Serverless. The Serverless janitor skips itself when the flag is on, and the Lambda never gets the events, so nothing cleans up CA's conversations (pre-survey bot cleanup, closing conversations).
  • Is keeping CA on Serverless intentional? E.g. because the account-scoped Lambda isn't ready in ca-central-1 for production? If so, the CA false overrides need to come back (in common.json, or in both staging and production, so production is covered too).
  • CA staging is already in this state live: Serverless callback with use_twilio_lambda_janitor: true. Should it go back to false now, independent of this PR?

Suggestion for the rollout
Since this changes the callback for ~28 helplines in both environments, could we add a check (or at least a note in the PR description) that enable_lambda_event_callback_url and use_twilio_lambda_janitor / adjust_capacity / transition_participants / transfers always resolve to the same side for each helpline + environment? And plan which helplines get applied when, rather than each one switching on its next unrelated apply.

This branch has not been deployed

No deployments
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.

2 participants