Skip to content

feat/df-1006: dlq modify rework#1408

Merged
jbarnsley10 merged 8 commits intomainfrom
feat/df-1006-dlq-modify-2
Apr 30, 2026
Merged

feat/df-1006: dlq modify rework#1408
jbarnsley10 merged 8 commits intomainfrom
feat/df-1006-dlq-modify-2

Conversation

@jbarnsley10
Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 commented Apr 27, 2026

'modify and resubmit' payload handled within form posts, so doesn't have to re-read message from queue again

In tandem with DEFRA/forms-notify-listener#174

@jbarnsley10 jbarnsley10 marked this pull request as ready for review April 27, 2026 11:05
Co-authored-by: Copilot <copilot@github.com>
@jbarnsley10 jbarnsley10 changed the title feat/df-1006: dlq modify with retries feat/df-1006: dlq modify rework Apr 27, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

🧪 Acceptance Test Results

❌ Some acceptance tests failed

View Details

Comment on lines +57 to +69
const queryParams = []
if (options?.visibilityTimeout) {
queryParams.push(`visibilityTimeout=${options.visibilityTimeout}`)
}
if (options?.waitTimeSeconds) {
queryParams.push(`waitTimeSeconds=${options.waitTimeSeconds}`)
}
const queryParamStr = queryParams.length ? `?${queryParams.join('&')}` : ''

const requestUrl = new URL(
`./admin/deadletter${qualifier}/view${queryParamStr}`,
endpoint
)
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.

use the built-in search params builder instead

const requestUrl = new URL(
    `./admin/deadletter${qualifier}/view${queryParamStr}`,
    endpoint
  )

if (options?.visibilityTimeout) {
  url.searchParams.set("visibilityTimeout", options.visibilityTimeout)
  }

<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-9" href="audit-api/modify/message-id">Modify and resubmit</a>
<form method="post" action="audit-api/modify-redirect/message-id" class="app-inline-block-form govuk-!-margin-right-9">
<input type="hidden" name="action" value="modify" />
<input type="hidden" name="messageJsonText" value="{&quot;MessageId&quot;:&quot;message-id&quot;,&quot;Body&quot;:{&quot;field1&quot;:&quot;value1&quot;}}" />
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.

bit confused by this, why would we hardcode a value?

{
  "MessageId": "message-id",
  "Body": {
    "field1": "value1"
  }
}

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.

It's a snapshot for a unit test where that message content is setup in the unit test.
The actual NJK file contains dynamic content:

<input type="hidden" name="messageJsonText" value="{{ message.json | dump }}" />

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.

oh so it is !! my bad, i saw this as the actual nunjucks view.

@sonarqubecloud
Copy link
Copy Markdown

@jbarnsley10 jbarnsley10 merged commit 6de8baa into main Apr 30, 2026
11 of 12 checks passed
@jbarnsley10 jbarnsley10 deleted the feat/df-1006-dlq-modify-2 branch April 30, 2026 13:26
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