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

Log dev team flag to metrics #256

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Log dev team flag to metrics #256

merged 1 commit into from
Aug 30, 2024

Conversation

kdid
Copy link
Contributor

@kdid kdid commented Aug 29, 2024

Summary

We want to be able to sort out our own requests and testing of DC chat through metrics

Changelog

  • Adds isDevTeam flag to DCAPI token
  • Add is_dev_team flag to the metrics log
  • Also fixes issue where Meadow's superuser tokens where not authorized for chat because they are isLoggedIn=false

Steps to Test

  • Grab new tfvars: https://github.com/nulib/tfvars/blob/main/dc-api/staging.parameters#L11
  • Update any dev params accordingly
  • dev/deploy chat
  • Run main DCAPI dev/locally
  • Generate token with the isDevTeam flag set
    • You can do this by hitting https://{your-dev-env}.dev.rdc.library.northwestern.edu:3002/auth/login?goto=https://{your-dev-env}.dev.rdc.library.northwestern.edu:3002/auth/callback (and grabbing the resulting token)
  • Check the auth/whoami route that the token contains the flag
  • Send a chat request (through Postman)
  • check the metrics log (compare with screenshot below)
  • Test other types of users who should result in a false dev team flag

Screenshot 2024-08-29 at 9 39 03 AM

Screenshot 2024-08-29 at 9 40 30 AM

@mbklein mbklein force-pushed the 5197-devteam-chat branch 2 times, most recently from 9eafb82 to 83b3e12 Compare August 29, 2024 21:59
@kdid kdid marked this pull request as ready for review August 30, 2024 15:03
Copy link
Contributor

@mbklein mbklein left a comment

Choose a reason for hiding this comment

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

👍🏻 👍🏻 👍🏻

@kdid kdid merged commit 983cfb2 into deploy/staging Aug 30, 2024
2 checks passed
@kdid kdid deleted the 5197-devteam-chat branch August 30, 2024 19:35
@kdid kdid self-assigned this Oct 9, 2024
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.

2 participants