Skip to content

Ja/dpc -4984 - Adding smoke test for patient everything#2906

Open
Jose-verdance wants to merge 14 commits intomainfrom
ja/dpc-4984-patient-everything-k6
Open

Ja/dpc -4984 - Adding smoke test for patient everything#2906
Jose-verdance wants to merge 14 commits intomainfrom
ja/dpc-4984-patient-everything-k6

Conversation

@Jose-verdance
Copy link
Contributor

@Jose-verdance Jose-verdance commented Feb 12, 2026

🎫 Ticket

https://jira.cms.gov/browse/DPC-4984

🛠 Changes

This change adds new smoke test for both synchronous and asynchronous patient everything endpoints.

ℹ️ Context

This adds smoke test coverage to this high use endpoint.

🧪 Validation

Confirmed the smoke test succeed locally and in higher environments.

Dev
https://github.com/CMSgov/dpc-app/actions/runs/21990516533

Test
https://github.com/CMSgov/dpc-app/actions/runs/21958462870

Sandbox
https://github.com/CMSgov/dpc-app/actions/runs/21959205829

Prod
https://github.com/CMSgov/dpc-app/actions/runs/21960235280

@Jose-verdance Jose-verdance marked this pull request as ready for review February 12, 2026 19:06
@Jose-verdance Jose-verdance requested a review from a team as a code owner February 12, 2026 19:06
MEspositoE14s
MEspositoE14s previously approved these changes Feb 12, 2026
Copy link
Contributor

@MEspositoE14s MEspositoE14s left a comment

Choose a reason for hiding this comment

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

A couple of nitpicks, but they can probably be spun off into another ticket if you're ready to deploy.

MEspositoE14s
MEspositoE14s previously approved these changes Feb 12, 2026
Copy link
Contributor

@MEspositoE14s MEspositoE14s left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@jdettmannnava jdettmannnava left a comment

Choose a reason for hiding this comment

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

Just some ideas...

@lukey-luke
Copy link
Contributor

Works across all remote environments ✅
This workflow passes locally with make smoke/local

  • make smoke/local fails for unrelated reasons. Filed a bug here: DPC-5206

Patient $everything covered for both sync and async ✅

  • this was a good catch
  • this is something that was not outlined in the original A/C, but has been a stakeholder requirement, so we should make darn sure it works!

The only obvious thing popping out for me is that we have multiple k6 workflows that monitor bulk exports and we probably should share that code (already called out above ☝️ )

{
'get patient everything returns 200': res => res.status == 200,
}
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably check the output (see monitorJob from bulk_export.js,)

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please check for errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @jdettmannnava, can you elaborate on what errors you have in mind? My understanding is that the synchronous call will either succeed and return 200 or it will fail with an operation outcome with 403 or 404 if patient id is not found. This would be covered by this simple smoke test check but I might be missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't patient everything sync return the actual data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @jdettmannnava I didn't quite catch the elaboration on that last point, but I've added an additional check for the response content. Let me know if that addresses what you had in mind.

Copy link

@manojwadhwa81 manojwadhwa81 left a comment

Choose a reason for hiding this comment

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

pollJobStatus could be extracted out as a reusable function. Also it's going to sleep for 20 seconds for the first iteration in all environments except local.. check out if we can reduce that based upon the actual time it takes. Looks good to me otherwise.

@Jose-verdance
Copy link
Contributor Author

pollJobStatus could be extracted out as a reusable function. Also it's going to sleep for 20 seconds for the first iteration in all environments except local.. check out if we can reduce that based upon the actual time it takes. Looks good to me otherwise.

Hi @manojwadhwa81 I refactored it to reuse the monitorJob method and moved it to a smoke_test_utils. Also, the 20 seconds was from monitorJob which is doing so for rate limit reasons.

jobResponse,
{
'job response code was 200': res => res.status === 200,
'no job output errors': res => res.json().error.length <= JOB_OUPUT_ERROR_LENGTH,
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jose-verdance : this is the check I am talking about

Copy link
Contributor Author

@Jose-verdance Jose-verdance Feb 17, 2026

Choose a reason for hiding this comment

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

Hi @jdettmannnava I am now using the monitorJob for the async call so this check is being done. The sync version of patient everything doesn't return "error" in the response. It returns a resourceType of OperationOutcome if an error occurs.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are calling monitorJob for the async export -- I am asking you to check for errors in the synchronous export for parity.

Copy link
Contributor

@lukey-luke lukey-luke left a comment

Choose a reason for hiding this comment

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

Thanks for breaking out monitorJob() to a shared function! LGTM

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.

5 participants