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

refactor: Extract AppEngine Cron source check into middleware #99

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

jdkaplan
Copy link
Collaborator

@jdkaplan jdkaplan commented Oct 6, 2024

This de-duplicates the code we have to check the AppEngine Cron request header and pushes it into the HTTP router and out of the app logic.

As a convenient side effect, this also ensures that any cron job failure produces an HTTP 500 response (indicating failure to AppEngine) and an ERROR-severity log line (which we're starting to use for alerts).

@jdkaplan
Copy link
Collaborator Author

jdkaplan commented Oct 6, 2024

Ref: #61

@jdkaplan jdkaplan requested a review from cceckman October 6, 2024 17:53
This de-duplicates the code we have to check the AppEngine Cron request
header and pushes it into the HTTP router and out of the app logic.

As a convenient side effect, this also ensures that any cron job failure
produces an HTTP 500 response (indicating failure to AppEngine) and an
ERROR-severity log line (which we're starting to use for alerts).
@jdkaplan jdkaplan force-pushed the jdkaplan-cron-middleware branch from 5c0c92b to bed39ad Compare October 6, 2024 17:58
Copy link
Collaborator

@cceckman cceckman left a comment

Choose a reason for hiding this comment

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

Nice!

@cceckman cceckman merged commit b44fb3d into main Oct 11, 2024
3 checks passed
@cceckman cceckman deleted the jdkaplan-cron-middleware branch October 11, 2024 11:33
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