-
Couldn't load subscription status.
- Fork 130
fix: allow custom project for status monitor #2415
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
fix: allow custom project for status monitor #2415
Conversation
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added optional project and environment fields to StatusQuery for customizable status monitoring, with fallback to system test configuration values.
- Added
project: Option<String>andenvironment: Option<String>toStatusQuerystruct inpackages/core/api/status/src/route/actor.rs - Modified status function to prioritize query parameters over system test config values
- Updated error handling to use
unwrap!macro for system test project validation - Added fallback to "prod" as default environment when neither query nor config specify one
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
| let system_test_project = unwrap!( | ||
| query | ||
| .project | ||
| .as_ref() | ||
| .or(status_config.system_test_project.as_ref()), | ||
| "system test project not configured" | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: unwrap! macro used here will panic if both query.project and status_config.system_test_project are None. Consider using unwrap_with! to provide a more specific error code
| let system_test_project = unwrap!( | |
| query | |
| .project | |
| .as_ref() | |
| .or(status_config.system_test_project.as_ref()), | |
| "system test project not configured" | |
| ); | |
| let system_test_project = unwrap_with!( | |
| query | |
| .project | |
| .as_ref() | |
| .or(status_config.system_test_project.as_ref()), | |
| INTERNAL_STATUS_CHECK_FAILED, | |
| error = "system test project not configured" | |
| ); |
Deploying rivet with
|
| Latest commit: |
cd8c696
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://597fb186.rivet.pages.dev |
| Branch Preview URL: | https://graphite-base-2377.rivet.pages.dev |
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->

Changes