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

Fetch latest RT secrets every minute #2876

Merged
merged 5 commits into from
Aug 9, 2023
Merged

Fetch latest RT secrets every minute #2876

merged 5 commits into from
Aug 9, 2023

Conversation

atvaccaro
Copy link
Contributor

@atvaccaro atvaccaro commented Aug 9, 2023

Description

Describe your changes and why you're making them. Please include the context, motivation, and relevant dependencies.

Resolves #1938
(see https://cal-itp.slack.com/archives/C01FNDG1ZPA/p1691601423249999)

Note: I'm choosing an easier/simpler implementation that uses the ticker to grab and pass auth keys in task calls. This means secrets are serialized into Redis, but it's not a huge deal since we don't persist/backup Redis.

Also, fetching secrets when we fetch configs does add to the fetch delay every 5 minutes. The alternative would be a separate scheduled function call, which I am going to experiment with. (We could use this same scheduled call to update the configs and reduce delay even more).

I implemented this; the same scheduler that calls tick now loads configs and secrets at the XX:45 every minute.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

How has this been tested?

Include commands/logs/screenshots as relevant.

Testing locally and will deploy to test first.

Post-merge follow-ups

Document any actions that must be taken post-merge to deploy or otherwise implement the changes in this PR (for example, running a full refresh of some incremental model in dbt). If these actions will take more than a few hours after the merge or if they will be completed by someone other than the PR author, please create a dedicated follow-up issue and link it here to track resolution.

  • No action required
  • Actions required (specified below)
    Deploy to prod.

@atvaccaro atvaccaro self-assigned this Aug 9, 2023
@atvaccaro atvaccaro marked this pull request as ready for review August 9, 2023 18:51
@atvaccaro atvaccaro changed the title Fetch latest RT secrets every 5 minutes Fetch latest RT secrets every minute Aug 9, 2023
@atvaccaro atvaccaro merged commit 6ff447e into main Aug 9, 2023
4 checks passed
@atvaccaro atvaccaro deleted the fetch-rt-secrets branch August 9, 2023 19:09
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.

Automatically reload secrets in RT archiver every 5 minutes
2 participants