Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

Problem

The Sentry workflow was using outdated logic to detect the environment for develop branch releases. Previously, develop branch versions used a develop- prefix (e.g., develop-0.10.0), but the current versioning scheme generates versions in the format X.Y.Z.N-SNAPSHOT without any prefix.

This caused develop branch builds to be incorrectly classified with the feature environment instead of develop in Sentry.

Solution

Updated the environment detection logic in .github/workflows/sentry.yml to match the current versioning scheme:

Before:

elif [[ "${{ env.RELEASE_VERSION }}" == develop-* && ! "${{ env.RELEASE_VERSION }}" == *-DIRTY-* ]]; then

After:

elif [[ "${{ env.RELEASE_VERSION }}" == *-SNAPSHOT && ! "${{ env.RELEASE_VERSION }}" == *-DIRTY ]]; then

Version Format Support

The workflow now correctly identifies all version formats:

Version Format Example Sentry Environment
Production 0.9.1 production
Pre-release 0.9.1-rc1, 0.9.1-ra1 pre-release
Develop (clean) 0.10.0.5-SNAPSHOT develop
Develop (dirty) 0.10.0.5-SNAPSHOT-DIRTY feature
Feature branch feature-branch-abc123 feature

Testing

Created and validated a comprehensive test script covering all version format scenarios to ensure the regex patterns work correctly for production, pre-release, develop, and feature environments.

Fixes the issue where develop branch releases were not being properly tracked in Sentry with the correct environment.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Неверный environment в Sentry для develop-ветки</issue_title>
<issue_description>Раньше версия проекта для develop-ветки содержала префикс develop-. Сейчас же develop-содержит только номер и SNAPSHOT в конце (и необязательный -DIRTY префикс)

Из-за этого в sentry workflow выбирается неверный environment для релиза в Sentry. Нужно обновить воркфлоу под актуальную схему версионирования девелоп-ветки.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #3539


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Sentry environment for develop branch [BUG] Fix Sentry environment detection for develop branch versioning scheme Oct 21, 2025
Copilot AI requested a review from nixel2007 October 21, 2025 13:42
Copilot finished work on behalf of nixel2007 October 21, 2025 13:42
@nixel2007 nixel2007 marked this pull request as ready for review October 21, 2025 13:51
@nixel2007 nixel2007 merged commit 44c909b into develop Oct 21, 2025
1 check passed
@nixel2007 nixel2007 deleted the copilot/update-sentry-environment-workflow branch October 21, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants