Skip to content

feat(medication): TAM-6822: Update MedicationDiscontinueModal to have current user as default#10155

Draft
sepidehdehghani992 wants to merge 2 commits into
mainfrom
feat/medications/default-discontinued-by-to-current-user
Draft

feat(medication): TAM-6822: Update MedicationDiscontinueModal to have current user as default#10155
sepidehdehghani992 wants to merge 2 commits into
mainfrom
feat/medications/default-discontinued-by-to-current-user

Conversation

@sepidehdehghani992

@sepidehdehghani992 sepidehdehghani992 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Changes

Update medication discontinue modal to have current user as default

Auto-Deploy

  • Deploy
Options
  • Artillery load test
  • Seed from closest snapshot
  • Generate fake data
  • More data (20Gi)
  • No facility servers (central-only)
  • No sync (facility tasks scaled to zero)
  • AMD64 architecture (default is arm64)
  • Skip mobile build
  • Always build mobile
  • Stay up for 8 hours
  • Stay up for 24 hours
  • Stay up (no TTL)
  • Build images only (don't deploy)
  • Pause this deploy

Tests

  • Run E2E tests
  • Run DAST scan

Review Hero

  • Run Review Hero
  • Auto-fix review suggestions Wait for Review Hero to finish, resolve any comments you disagree with or want to fix manually, then check this to auto-fix the rest.
  • Auto-fix CI failures Check this to auto-fix lint errors, test failures, and other CI issues.
  • Auto-merge upstream Check this to merge the base branch into this PR, with AI conflict resolution if needed.
  • Save suppressions Check this to capture 👎 reactions on Review Hero comments as suppression rules in .github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

@review-hero

review-hero Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary
3 agents reviewed this PR | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters, 1 below threshold

No issues found. Looks good!

Below consensus threshold (1 unique issue not confirmed by majority)
Location Agent Severity Comment
packages/web/app/components/Medication/MedicationDiscontinueModal.jsx:82 Bugs & Correctness suggestion If the current user is not in the practitioner suggestions list (e.g. an admin-only role), fetchCurrentOption on the autocomplete will fail to resolve the ID to a display name, leaving the field ...

@review-hero

review-hero Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary
3 agents reviewed this PR | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters

No issues found. Looks good!

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Android builds 📱

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

🍹 up on tamanu-on-k8s/bes/tamanu-on-k8s/feat-medications-default-discontinued-by-to-current-user

Pulumi report
   Updating (feat-medications-default-discontinued-by-to-current-user)

View Live: https://app.pulumi.com/bes/tamanu-on-k8s/feat-medications-default-discontinued-by-to-current-user/updates/6

Downloading plugin random-4.19.0: starting
Downloading plugin random-4.19.0: done
Installing plugin random-4.19.0: starting
Installing plugin random-4.19.0: done

@ Updating....
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running 
@ Updating....
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read pulumi:pulumi:StackReference bes/k8s-core/tamanu-internal-main
@ Updating....
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read pulumi:pulumi:StackReference bes/k8s-core/tamanu-internal-main
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read kubernetes:core/v1:Namespace tamanu-feat-medications-default-discontinued-by-to-current-user
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read pulumi:pulumi:StackReference bes/core/tamanu-internal
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read pulumi:pulumi:StackReference bes/core/tamanu-internal
@ Updating........
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read kubernetes:core/v1:Namespace tamanu-feat-medications-default-discontinued-by-to-current-user
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Waiting for central-db...
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Waiting for facility-1-db...
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Waiting for facility-2-db...
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read kubernetes:core/v1:ConfigMap actual-provisioning
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (0s) 
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running read kubernetes:core/v1:ConfigMap actual-provisioning
@ Updating....
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (0s) 
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Secret central-db-superuser not found or not ready: Error: HTTP-Code: 404
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Message: Unknown API Status Code!
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"central-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"central-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Headers: {"audit-id":"ca1f2bbe-63c8-4b25-bf72-b5f7d63fa839","cache-control":"no-cache, private","connection":"close","content-length":"214","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Secret facility-1-db-superuser not found or not ready: Error: HTTP-Code: 404
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Message: Unknown API Status Code!
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"facility-1-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"facility-1-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Headers: {"audit-id":"50f1f9c5-63cd-438f-8af3-f38ebe3d9cd2","cache-control":"no-cache, private","connection":"close","content-length":"220","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Secret facility-2-db-superuser not found or not ready: Error: HTTP-Code: 404
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Message: Unknown API Status Code!
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"facility-2-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"facility-2-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user running Headers: {"audit-id":"7e3d3035-1fb5-413a-9822-11503429daf7","cache-control":"no-cache, private","connection":"close","content-length":"220","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}
@ Updating....
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (2s) Waiting for Job "tamanu-feat-medications-default-discontinued-by-to-current-user/ttl-wake-1782551743-eb2d3a47" to start
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (2s) Waiting for Job "tamanu-feat-medications-default-discontinued-by-to-current-user/ttl-wake-1782551743-eb2d3a47" to succeed (Active: 1 | Succeeded: 0 | Failed: 0)
@ Updating........
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (6s) warning: [Pod tamanu-feat-medications-default-discontinued-by-to-current-user/ttl-wake-1782551743-eb2d3a47-8v8gn]: Container "wake-cnpg" completed with exit code 0
@ Updating.....
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (9s) Waiting for Job "tamanu-feat-medications-default-discontinued-by-to-current-user/ttl-wake-1782551743-eb2d3a47" to succeed (Active: 0 | Succeeded: 0 | Failed: 0)
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (9s) Waiting for Job "tamanu-feat-medications-default-discontinued-by-to-current-user/ttl-wake-1782551743-eb2d3a47" to succeed (Active: 0 | Succeeded: 1 | Failed: 0)
+  kubernetes:batch/v1:Job ttl-wake-1782551743 creating (9s) 
+  kubernetes:batch/v1:Job ttl-wake-1782551743 created (9s) 
-  kubernetes:batch/v1:Job ttl-wake-1782551490 deleting (0s) 
@ Updating....
-  kubernetes:batch/v1:Job ttl-wake-1782551490 deleting (0s) 
-  kubernetes:batch/v1:Job ttl-wake-1782551490 deleted (0.90s) 
   pulumi:pulumi:Stack tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user  15 messages
Diagnostics:
 pulumi:pulumi:Stack (tamanu-on-k8s-feat-medications-default-discontinued-by-to-current-user):
   Waiting for central-db...
   Waiting for facility-1-db...
   Waiting for facility-2-db...

   Secret central-db-superuser not found or not ready: Error: HTTP-Code: 404
   Message: Unknown API Status Code!
   Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"central-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"central-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   Headers: {"audit-id":"ca1f2bbe-63c8-4b25-bf72-b5f7d63fa839","cache-control":"no-cache, private","connection":"close","content-length":"214","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}
   Secret facility-1-db-superuser not found or not ready: Error: HTTP-Code: 404
   Message: Unknown API Status Code!
   Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"facility-1-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"facility-1-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   Headers: {"audit-id":"50f1f9c5-63cd-438f-8af3-f38ebe3d9cd2","cache-control":"no-cache, private","connection":"close","content-length":"220","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}
   Secret facility-2-db-superuser not found or not ready: Error: HTTP-Code: 404
   Message: Unknown API Status Code!
   Body: "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"secrets \\\"facility-2-db-superuser\\\" not found\",\"reason\":\"NotFound\",\"details\":{\"name\":\"facility-2-db-superuser\",\"kind\":\"secrets\"},\"code\":404}
"
   Headers: {"audit-id":"7e3d3035-1fb5-413a-9822-11503429daf7","cache-control":"no-cache, private","connection":"close","content-length":"220","content-type":"application/json","date":"Sat, 27 Jun 2026 05:15:49 GMT","x-kubernetes-pf-flowschema-uid":"3fb296fc-e46b-45d1-9306-057e37ddd229","x-kubernetes-pf-prioritylevel-uid":"feccf24d-a074-4fa8-aa6f-db82477fc2f5"}

Outputs:
   urls: {
       Central      : "https://central.feat-medications-default-discontinued-by-to-current-user.cd.tamanu.app"
       Facility- 1  : "https://facility-1.feat-medications-default-discontinued-by-to-current-user.cd.tamanu.app"
       Facility- 2  : "https://facility-2.feat-medications-default-discontinued-by-to-current-user.cd.tamanu.app"
       PatientPortal: "https://portal.feat-medications-default-discontinued-by-to-current-user.cd.tamanu.app"
   }

Resources:
   + 1 created
   - 1 deleted
   2 changes. 92 unchanged

Duration: 19s

   

@github-actions

Copy link
Copy Markdown

E2E failure report

E2E failed for run 21623.

The report artifact contains the merged Playwright HTML report with failure videos, screenshots, and traces where available.

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.

1 participant