Conversation
…ure flag off When the uptime-runtime-assertions feature flag is disabled, the UptimeAssertionsField is not rendered, so its getValue transform (which converts empty children to null) never runs. This caused null assertions to be overwritten with an empty default structure. This fix ensures null assertions are preserved by: 1. Adding onPreSubmit logic in uptimeAlertForm to restore the original assertion value when the feature flag is off 2. Converting empty assertion structures to null in uptimeFormDataToEndpointPayload for the detector flow Fixes NEW-724
…lag off Added tests to verify: 1. Null assertions are preserved when editing rules with feature flag disabled 2. Existing assertions are preserved when editing rules with feature flag disabled 3. Empty assertion structures are converted to null in uptimeFormDataToEndpointPayload
klochek
approved these changes
Jan 30, 2026
…reSubmit Changed to normalize empty/sentinel assertions to null by checking the actual form value instead of restoring the original rule value. This approach mirrors what the field's getValue transform does and is cleaner. Also extracted hasRuntimeAssertions variable for consistency.
priscilawebdev
pushed a commit
that referenced
this pull request
Feb 2, 2026
…ure flag off (#107365) ## Summary - When editing uptime monitors with the `uptime-runtime-assertions` feature flag disabled, null assertions were being overwritten with an empty default structure - This fix preserves null assertions by adding checks in both the uptime alert form and detector form flows ## Root Cause When the feature flag is OFF: 1. The `UptimeAssertionsField` component is not rendered 2. The field's `getValue` transform (which converts empty children to null) never runs 3. The empty assertion structure from `getFormDataFromRule`/`uptimeSavedDetectorToFormData` gets submitted to the backend ## Changes 1. **uptimeAlertForm.tsx**: Added `onPreSubmit` logic to restore the original assertion value when the feature flag is off 2. **fields.tsx**: Added conversion of empty assertion structures to null in `uptimeFormDataToEndpointPayload` Fixes [NEW-724](https://linear.app/getsentry/issue/NEW-724) ## Test plan - [x] Existing tests pass - [ ] Manually verify editing an uptime monitor with null assertions preserves null when feature flag is off
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uptime-runtime-assertionsfeature flag disabled, null assertions were being overwritten with an empty default structureRoot Cause
When the feature flag is OFF:
UptimeAssertionsFieldcomponent is not renderedgetValuetransform (which converts empty children to null) never runsgetFormDataFromRule/uptimeSavedDetectorToFormDatagets submitted to the backendChanges
onPreSubmitlogic to restore the original assertion value when the feature flag is offuptimeFormDataToEndpointPayloadFixes NEW-724
Test plan