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

break out okta endpoint from health check #7891

Merged
merged 18 commits into from
Jul 9, 2024
Merged

Conversation

fzhao99
Copy link
Contributor

@fzhao99 fzhao99 commented Jul 8, 2024

DEVOPS PULL REQUEST

Related Issue

Changes Proposed

  • Splits out the Okta health logic away from the backend health indicator
  • Creates a specific okta degraded health state that's configured to return a 204 status code on trigger
  • Modifies the frontend status display to indicate differential status
    • I added in the Okta check to flag out a failure in the deploy alerting script, which wasn't explicitly called out in the ticket but that duplicates what used to happen (thanks @mehansen for flagging!). Worth talking if we want to break this out to a separate alert but leaving it for now for status quo reasons.

Testing

I've deployed this test branch that hardcodes a "down" status from the Okta check. Double check that the frontend status display looks ok and that the health check in Azure looks ok
Screenshot 2024-07-08 at 12 29 19 PM

Can also pull the value down locally and hard code return values for getApplicationStatusForHealthCheck in the demo okta repository to observe changes on the backend API return on port 8080 or on the frontend status page
Screenshot 2024-07-08 at 12 28 40 PM


@fzhao99 fzhao99 changed the title Bob/7806 okta health endpoint break out okta endpoint from health check Jul 8, 2024
@fzhao99 fzhao99 marked this pull request as ready for review July 8, 2024 16:51
Copy link
Collaborator

@mehansen mehansen left a comment

Choose a reason for hiding this comment

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

left a couple questions and nit comments but overall looks good! fun to see how you could set a custom status code

backend/src/main/resources/application.yaml Outdated Show resolved Hide resolved
frontend/src/app/DeploySmokeTest.test.tsx Outdated Show resolved Hide resolved
frontend/deploy-smoke.js Show resolved Hide resolved
@fzhao99 fzhao99 requested a review from mehansen July 9, 2024 14:04
Copy link

sonarqubecloud bot commented Jul 9, 2024

show-components: always
status:
http-mapping:
okta_degraded: 204
Copy link
Collaborator

Choose a reason for hiding this comment

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

The pedantic nerd inside me debates the correctness of returning a 204/NO CONTENT. That's not to say that there is an existing 2xx status code that would be correct. But I'd almost be tempted to use a 2xx that doesn't have an existing status (like 299 for example).

At the end of the day I don't think it matters.

Copy link
Collaborator

@DanielSass DanielSass left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks Bob!

Copy link
Collaborator

@mehansen mehansen left a comment

Choose a reason for hiding this comment

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

lgtm! thanks Bob

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

LGTM! 😸

@fzhao99 fzhao99 added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit d4967cb Jul 9, 2024
37 checks passed
@fzhao99 fzhao99 deleted the bob/7806-okta-health-endpoint branch July 9, 2024 18:59
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.

Add health endpoint to handle degraded Okta status
4 participants