Skip to content

Conversation

@kevinkim-ogp
Copy link
Contributor

  • Add learning resources to sidebar
  • Improve missing pipe page
  • Prevent duplicate form submissions

kevinkim-ogp and others added 4 commits April 30, 2025 10:44
## TL;DR
Update missing Pipe page to be similar to missing Tile page

## How to test?
- [ ] Navigate to a non-existent Pipe, verify that missing Pipe page is
shown and clicking on link redirects to Pipes page

## Screenshots
### Before
<img width="1512" alt="Screenshot 2025-04-28 at 11 17 33 PM"
src="https://github.com/user-attachments/assets/ec2400d5-62a8-4785-a86f-11b701b97c2a"
/>


### After


https://github.com/user-attachments/assets/c1387d13-1e52-4f62-9a77-8baec29bd78b
## Details
- Added an external link to the learning resources because right now,
there is no way to access it from our plumber app.
- Made it responsive for mobile and smaller screens too
- Moved the new badge from `Templates` to `Learn` button instead

## Before & After Screenshots
**BEFORE**:


https://github.com/user-attachments/assets/fd0467d3-8cb3-4192-81a0-83e66dcf1c53

**AFTER**:


https://github.com/user-attachments/assets/9df27e15-4ed8-42b9-be48-0f526301e525

## Tests
- Check that all pages can still be accessed e.g. pipes, tiles
- Check that learning resource page is accessed as a new tab
## Problem
FormSG may call Plumber's webhook more than once, which results in
duplicate executions.


## Solution
* Saves the FormSG Submission ID in the `internal_id` column
* Every FormSG call to Plumber's webhook will check for the submission
ID, if an execution has executed with the submission ID, it will not
execute again
* Use an advisory lock to prevent race conditions when FormSG
concurrently triggers Plumber’s webhook with the same submission ID

## Tests
- [ ] Existing Pipes with FormSG work as intended
- [ ] New Pipes with FormSG work as intended
- [ ] Call Plumber webhook with a prior form submission and ensure that
Pipe does not execute again

## Deploy Notes
* Run migration to add new index to `Executions` table: `flow_id`,
`test_run`, `internal_id`
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner May 5, 2025 08:41
@datadog-opengovsg
Copy link

Datadog Report

Branch report: develop-v2
Commit report: 88d9737
Test service: plumber

✅ 0 Failed, 772 Passed, 0 Skipped, 2m 25.7s Total Time
➡️ Test Sessions change in coverage: 1 no change

Copy link
Contributor

@pregnantboy pregnantboy left a comment

Choose a reason for hiding this comment

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

leggo

@kevinkim-ogp kevinkim-ogp merged commit 1826dd7 into production May 5, 2025
9 of 10 checks passed
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.

4 participants