Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched DogStatsD for datadog_api_client to submit metrics #2581

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

dfitchett
Copy link
Contributor

What was the problem?

DogStatsD is not supported by LHDI infrastructure due to security concerns.

Associated tickets or Slack threads:

How does this fix it?1

This switches out the implementation for metric logging to use Datadog REST API instead of the python DogStatsD.

How to test this PR

  • pull code
  • Unit Test:
    • from /domain-ee/ee-ep-merge-app run pytest
  • Integration Tests:
    • run base platform
    • from /domain-ee/ee-ep-merge-app run pytest ./integration
  • End to End tests:
    • run this CI action to verify successful integration test
    • run end to end tests locally:
      • export BIP_CLAIM_URL=mock-bip-claims-api:20300
      • run bgs and bip services and mocks:
        • COMPOSE_PROFILES="bip,bgs" ./gradlew :app:dockerComposeUp
        • COMPOSE_PROFILES="bip,bgs" ./gradlew -p mocks :dockerComposeUp
      • ./gradlew :domain-ee:ee-ep-merge-app:endToEndTest

Footnotes

  1. Pull-Requests guidelines. If PR is significant, update Current Software State wiki page.

@dfitchett dfitchett requested a review from a team as a code owner February 8, 2024 23:41
Copy link
Contributor

github-actions bot commented Feb 8, 2024

Test Results

129 tests  +6   125 ✅ +9   39s ⏱️ ±0s
 33 suites +2     0 💤 ±0 
 33 files   +2     4 ❌  - 3 

For more details on these failures, see this check.

Results for commit 1815a27. ± Comparison against base commit 517313a.

This pull request removes 7 and adds 13 tests. Note that renamed tests count towards both.
gov.va.vro.mockbipce.DocumentTypesTest ‑ getDocumentTypesTest()
gov.va.vro.mockbipce.FilesTest ‑ postFilesInvalidFolderUrlTest()
gov.va.vro.mockbipce.FilesTest ‑ postFilesNoFolderUrlTest()
gov.va.vro.mockbipce.FilesTest ‑ postFilesPositiveTest()
gov.va.vro.mockbipce.FilesTest ‑ postFilesWrongIdTypeTest()
gov.va.vro.mockbipce.JwtTest ‑ invalidJwtSecretTest()
gov.va.vro.mockbipce.JwtTest ‑ noJwtTest()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testCancelClaimById_NotFound()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testCancelClaimById_Success()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testGetClaimById_NotFound()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testGetClaimById_Success()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testPutTemporaryStationOfJurisdiction_InternalServerError()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testPutTemporaryStationOfJurisdiction_NotFound()
gov.va.vro.mockbipclaims.ClaimsControllerTest ‑ testPutTemporaryStationOfJurisdiction_Success()
gov.va.vro.mockbipclaims.ContentionsTest ‑ claim1010ContentionTest()
gov.va.vro.mockbipclaims.JwtTest ‑ invalidJwtSecretTest()
gov.va.vro.mockbipclaims.JwtTest ‑ noJwtTest()
…

Copy link
Contributor

@nanotone nanotone left a comment

Choose a reason for hiding this comment

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

LGTM. This is so annoying though 🙃

By the way, just to double-check: it shouldn't be a problem that the underlying network implementation changed from UDP to TCP, right? Because ep_merge_machine.py isn't async anyway until it needs to fire off a make_request to hoppy.

@dfitchett
Copy link
Contributor Author

LGTM. This is so annoying though 🙃

By the way, just to double-check: it shouldn't be a problem that the underlying network implementation changed from UDP to TCP, right? Because ep_merge_machine.py isn't async anyway until it needs to fire off a make_request to hoppy.

Hopefully not an issue. There is an async client that we could use, but the whole state machine including this call is running in a background thread already in the task created in job_runner.py.

@msnwatson msnwatson merged commit 3183117 into develop Feb 9, 2024
1 check passed
@msnwatson msnwatson deleted the dfitchett/ep-merge/datadog-api branch February 9, 2024 17:51
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.

3 participants