Skip to content

feat(aci): Add ability to create new environments in the API#112537

Merged
saponifi3d merged 3 commits intomasterfrom
jcallener/aci/upate-env-field
Apr 8, 2026
Merged

feat(aci): Add ability to create new environments in the API#112537
saponifi3d merged 3 commits intomasterfrom
jcallener/aci/upate-env-field

Conversation

@saponifi3d
Copy link
Copy Markdown
Contributor

Description

This allows us to send a new environment through the API; (first step for ISWF-2363).

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Backend Test Failures

Failures on 102d88f in this run:

tests/sentry/incidents/endpoints/test_serializers.py::TestAlertRuleSerializer::test_environment_non_listlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/incidents/endpoints/test_serializers.py:157: in test_environment_non_list
    assert serializer.is_valid(), serializer.errors
E   AssertionError: {'environment': [ErrorDetail(string='Failed to retrieve or create environment.', code='invalid')]}
E   assert False
E    +  where False = <bound method BaseSerializer.is_valid of AlertRuleSerializer(context={'organization': <Organization at 0x7f5689fcf570:...ult=AlertRuleDetectionType.STATIC, required=False)\n    extrapolation_mode = CharField(allow_null=True, required=False)>()
E    +    where <bound method BaseSerializer.is_valid of AlertRuleSerializer(context={'organization': <Organization at 0x7f5689fcf570:...ult=AlertRuleDetectionType.STATIC, required=False)\n    extrapolation_mode = CharField(allow_null=True, required=False)> = AlertRuleSerializer(context={'organization': <Organization at 0x7f5689fcf570: id=4557934580924432, owner_id=None, name...ault=AlertRuleDetectionType.STATIC, required=False)\n    extrapolation_mode = CharField(allow_null=True, required=False).is_valid

…d with the environment. in this case, we want to override to _not_ accept new environments
Comment thread src/sentry/snuba/snuba_query_validator.py
@saponifi3d saponifi3d marked this pull request as ready for review April 8, 2026 22:52
@saponifi3d saponifi3d requested review from a team as code owners April 8, 2026 22:52
@saponifi3d saponifi3d merged commit 0cb5c5a into master Apr 8, 2026
56 checks passed
@saponifi3d saponifi3d deleted the jcallener/aci/upate-env-field branch April 8, 2026 23:49
saponifi3d added a commit that referenced this pull request Apr 9, 2026
# Description
Updated the environment selector to be able to create a new environment
inline.

Right now, we can only select environments on Uptime and Metric
monitors. The Metric monitor will be able to save the new environments
after #112537 is deployed.

### Metric Monitor
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 56
33 PM"
src="https://github.com/user-attachments/assets/f6c2ebef-3b2c-45fe-bc29-839c4be81f35"
/>

### Uptime Monitor
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 58
48 PM"
src="https://github.com/user-attachments/assets/09b61794-3242-48ee-8f03-d3b0ecc05060"
/>

### Uptime Saves
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 59
33 PM"
src="https://github.com/user-attachments/assets/5783da6b-a7f7-4e07-b501-eb7eebcab22f"
/>
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
# Description
Updated the environment selector to be able to create a new environment
inline.

Right now, we can only select environments on Uptime and Metric
monitors. The Metric monitor will be able to save the new environments
after #112537 is deployed.

### Metric Monitor
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 56
33 PM"
src="https://github.com/user-attachments/assets/f6c2ebef-3b2c-45fe-bc29-839c4be81f35"
/>

### Uptime Monitor
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 58
48 PM"
src="https://github.com/user-attachments/assets/09b61794-3242-48ee-8f03-d3b0ecc05060"
/>

### Uptime Saves
<img width="1624" height="1061" alt="Screenshot 2026-04-08 at 4 59
33 PM"
src="https://github.com/user-attachments/assets/5783da6b-a7f7-4e07-b501-eb7eebcab22f"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants