Skip to content

WIP: Approach 1: a new lambda to demo a backoff-and-retry approach to SQS-driven processing#950

Draft
phad wants to merge 7 commits into
mainfrom
phad/dcmaw16962-spike_3
Draft

WIP: Approach 1: a new lambda to demo a backoff-and-retry approach to SQS-driven processing#950
phad wants to merge 7 commits into
mainfrom
phad/dcmaw16962-spike_3

Conversation

@phad
Copy link
Copy Markdown
Contributor

@phad phad commented Dec 12, 2025

Jira Ticket

DCMAW-XXXXX

Description of changes

Review guidance

Review checklist

Functional Review

  • Functionality: Does it meet the acceptance criteria on the ticket and work as expected?
  • Requirements: Does the code meet functional and non-functional requirements including compliance with programme standards and security gates?

Security & Compliance

  • Personally Identifiable Information: Is it possible for PII to be logged?
  • Security Considerations: Are there any security implications that need to be addressed?

Quality Assurance

  • Testing: Is the code well-tested with sufficient coverage to provide confidence in correctness?
  • Edge Cases: Have edge cases been considered and handled appropriately?

Code Quality

  • Readability: Is the code easy to understand for all team members, with clear naming and appropriate documentation?
  • Maintainability: Is the code easy to change, reuse, and extend?
  • Code Style: Does it follow our coding conventions and best practices?
  • Code Quality: Is the code maintainable and following best practices? See Values, Principles & Practices

Observability & Operations

  • Observability: Are there appropriate logs/metrics that would help debug and monitor the service?
  • Performance: Are there any performance considerations or potential bottlenecks?
  • Runbooks for Alarms: If an alarm has been created or updated, has a corresponding runbook been created or updated?

Documentation

  • Documentation: Is the code well documented? Is there any existing documentation that needs updating?
  • Comments: Are complex sections of code adequately commented if the intent is not clear?

Review PR:

  • Title: Contains ticket number and clear summary of change
  • Description: Has clear description of change

Evidence

Documentation

// exponentially grow unbounded.
const delaySec = Math.min(
Number(config.MAX_RETRY_DELAY_IN_SECONDS),
initialDelaySec * (backoffFactor ** tryIndex),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialDelaySec becomes a bit misleading when it's being used in the backoff calculations for subsequent retries.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe - this is the 'absolute' calculation mentioned in https://govukverify.atlassian.net/wiki/spaces/DCMAW/pages/5950603379/2015-12-08+Investigate+Define+ReadID+Polling+Strategy#Absolute so it is technically correct that it's the initial back-off period, multiplied by the back-off factor ^ try index.

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