Skip to content

Staging Environment remains when promoting from staging to prod without an extra build step #701

Open
@smeubank

Description

@smeubank

Problem Statement

An issue has been identified with the @sentry/vite-plugin in relation to Heroku pipeline workflows:

  • The Sentry configuration is injected during the initial build step, typically executed in a staging environment.
  • Upon promotion from staging to production within Heroku, an additional build step is not triggered. As a result, the staging Sentry settings persist and remain active in the production environment.

This causes two significant problems:

  1. Errors originating from the production environment are incorrectly reported to the staging environment in Sentry.
  2. Flexible strategies for source map deletion, such as deleting sourcemaps post-upload exclusively in production, are currently unavailable.

Desired Behavior

The Sentry Vite plugin should ideally support environment-specific configurations or allow dynamic injection of configurations post-build, improving compatibility with pipeline workflows like Heroku. Specifically:

  • Provide functionality to dynamically inject or override Sentry configurations at runtime instead of only at the initial build step.
  • (not specifically related)Support distinct configurations for source map deletion between staging and production environments, possibly through post-promotion scripting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions