getsentry / getsentry/sentry

dateReleased field is not respected when marking regressions.

Open
#47,218 4 comments 1 reaction 1 assignee Claimed by @shashjar View on GitHub
Bug Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### Environment

SaaS ([https://sentry.io/]())

### Version

*No response*

### Link

*No response*

### DSN

*No response*

### Steps to Reproduce

1. Create release A
2. Create release B
3. Have an issue that has events from both releases
4. Finalise release B
5. Finalise release A
6. Mark the issue as resolved on release A
7. Send a new event to the issue marked as coming from release B

### Expected Result

Altough release B was created after release A, release A was finalised after (populating the `dateReleased`) field.

Thus, events from release B should not trigger a regression.

Per docs:
By default a release is created “unreleased”. Finalizing a release means that we populate a second timestamp on the release record, which is prioritized over date_created when sorting releases in [sentry.io](). Release finalization (and the timestamp) also affects:

* What counts as "the next release" for resolving issues
* What release is used as the base for associating commits if you use --auto

The above is also not respected, as release B still shows as more recent as release A.

### Actual Result

A regression is triggered.

![Screenshot 2023-04-12 at 12 23 36](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/a6776d05-c2a6-4804-a23b-2b7c1ef842dc/1e8a7319-67ba-4eaa-abef-d57f32fedbd6?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi9hNjc3NmQwNS1jMmE2LTQ4MDQtYTIzYi0yYjdjMWVmODQyZGMvMWU4YTczMTktNjdiYS00ZWFhLWFiZWYtZDU3ZjMyZmVkYmQ2IiwiaWF0IjoxNzc3OTI0NjM1LCJleHAiOjE4MDk0OTUxOTV9.WmvaGUcsaolc3cwp650fyhnTo2BqBH_LuC0TdwvI3x8)

On my tests I used:

* A= 5.0.5.7.0
* B= 5.0.5.6.1

SEMVER is not taking part in this, 5.0.5.6.1 is still shown as more recent. Only Sentry-cli seems to respect the dateReleases (finalised) field:

![Screenshot 2023-04-12 at 12 21 37](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/854b713d-b1e0-4890-824e-64d614eb4aae/2afbe919-9fd0-4705-a9e2-d3464ef8ada2?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi84NTRiNzEzZC1iMWUwLTQ4OTAtODI0ZS02NGQ2MTRlYjRhYWUvMmFmYmU5MTktOWZkMC00NzA1LWE5ZTItZDM0NjRlZjhhZGEyIiwiaWF0IjoxNzc3OTI0NjM1LCJleHAiOjE4MDk0OTUxOTV9.vv_yhEQ6od4o15fan611NDVm3wb4QUZv7G4lJKNQhNU)

![Screenshot 2023-04-12 at 12 21 05](https://uploads.linear.app/3ed206af-f87a-40aa-82a0-150bf83e43e6/69c41f55-f901-41ef-91d6-7264b55c10f7/6126060e-61c7-4895-974a-0c3f3b15a240?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiLzNlZDIwNmFmLWY4N2EtNDBhYS04MmEwLTE1MGJmODNlNDNlNi82OWM0MWY1NS1mOTAxLTQxZWYtOTFkNi03MjY0YjU1YzEwZjcvNjEyNjA2MGUtNjFjNy00ODk1LTk3NGEtMGMzZjNiMTVhMjQwIiwiaWF0IjoxNzc3OTI0NjM1LCJleHAiOjE4MDk0OTUxOTV9.MyF-Hl0HKHbXk-x7z-JrgO00Dpbm7F-p4pfBtLb3yfY)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.