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

Jmax/lg 15676 passport api health check infrastructure #11891

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

jmax-gsa
Copy link
Contributor

@jmax-gsa jmax-gsa commented Feb 18, 2025

🎫 Ticket

Link to the relevant ticket:
LG-15676

🛠 Summary of changes

Added request and response classes for the Dos passport API health check

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Running locally in the Rails console, create a User, an Analytics object and a DocAuth::Dos::Requests::HealthCheckRequest, then call fetch on the health check request (see below). Verify that the connecton eventually times out, and that the fetch call returned a HealthCheckFailure with a Faraday network error.
  • Repeat the above step in the staging environment (once merged) and verify that the health check succeeds.

@jmax-gsa jmax-gsa force-pushed the jmax/LG-15676-passport-api-health-check-infrastructure branch from d42ba8b to 4acc77c Compare February 18, 2025 20:58
[skip changelog]
@jmax-gsa jmax-gsa force-pushed the jmax/LG-15676-passport-api-health-check-infrastructure branch from bfa7c30 to d5efe7c Compare February 18, 2025 21:17
@jmax-gsa jmax-gsa force-pushed the jmax/LG-15676-passport-api-health-check-infrastructure branch from 3bb4f24 to b4ed521 Compare February 18, 2025 22:00
@jmax-gsa jmax-gsa marked this pull request as ready for review February 19, 2025 14:49
@jmax-gsa jmax-gsa requested review from amirbey and a team February 19, 2025 14:49
@@ -285,6 +285,7 @@ outbound_connection_check_retry_count: 2
outbound_connection_check_timeout: 5
outbound_connection_check_url: 'https://checkip.amazonaws.com'
participate_in_dap: false
passports_api_health_check_endpoint: 'https://caapinpe.state.gov/api/passport-match-prc-api/v1/html'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
passports_api_health_check_endpoint: 'https://caapinpe.state.gov/api/passport-match-prc-api/v1/html'
passports_api_health_check_endpoint: ''

@@ -0,0 +1,41 @@
# frozen_string_literal: true

module DocAuth
Copy link
Contributor

Choose a reason for hiding this comment

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

this file to be deleted after namespace change?


def connection
@connection ||= Faraday::Connection.new(
url: IdentityConfig.store.passports_api_health_check_endpoint,
Copy link
Contributor

Choose a reason for hiding this comment

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

there are 2 healthcheck endpoints for which we need to be able to check ...
there is also a composite healthcheck endpoint

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