Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use BUGSNAG_RELEASE_STAGE environment variable to set the release stage #613

Merged
merged 3 commits into from
Jul 28, 2020

Conversation

imjoehaines
Copy link
Contributor

@imjoehaines imjoehaines commented Jul 23, 2020

Goal

Previously we only read BUGSNAG_RELEASE_STAGE in the Rails integration and only read RACK_ENV in Rack apps, so apps using neither of those integrations have to set the release stage manually

Now we will use the 'BUGSNAG_RELEASE_STAGE' environment variable if it's set and fallback to the Rails env/RACK_ENV if those integrations are loaded

Linked issues

Fixes #421

Review

For the submitter, initial self-review:

  • Commented on code changes inline explain the reasoning behind the approach
  • Reviewed the test cases added for completeness and possible points for discussion
  • A changelog entry was added for the goal of this pull request
  • Check the scope of the changeset - is everything in the diff required for the pull request?
  • This pull request is ready for:
    • Initial review of the intended approach, not yet feature complete
    • Structural review of the classes, functions, and properties modified
    • Final review

For the pull request reviewer(s), this changeset has been reviewed for:

  • Consistency across platforms for structures or concepts added or modified
  • Consistency between the changeset and the goal stated above
  • Internal consistency with the rest of the library - is there any overlap between existing interfaces and any which have been added?
  • Usage friction - is the proposed change in usage cumbersome or complicated?
  • Performance and complexity - are there any cases of unexpected O(n^3) when iterating, recursing, flat mapping, etc?
  • Concurrency concerns - if components are accessed asynchronously, what issues will arise
  • Thoroughness of added tests and any missing edge cases
  • Idiomatic use of the language

@imjoehaines imjoehaines force-pushed the release-stage-environment-variable branch 2 times, most recently from 724504d to a8f77a0 Compare July 27, 2020 12:53
@imjoehaines imjoehaines marked this pull request as ready for review July 27, 2020 12:55
imjoehaines added a commit that referenced this pull request Jul 27, 2020
Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code changes: -8 +1

best kind of new feature

Previously we read 'BUGSNAG_RELEASE_STAGE' only in the Rails
integration, so other apps had to use 'RACK_ENV' (if they run in Rack)
or set it manually in code

Now we will always use the 'BUGSNAG_RELEASE_STAGE' environment variable
if it's set
This should now happen automatically for us, so the existing MR tests
can verify that this feature works :^)
@imjoehaines imjoehaines force-pushed the release-stage-environment-variable branch from 4a8e72b to 7850434 Compare July 28, 2020 12:23
@imjoehaines imjoehaines merged commit 7ac8bb3 into next Jul 28, 2020
@imjoehaines imjoehaines mentioned this pull request Aug 7, 2020
@imjoehaines imjoehaines deleted the release-stage-environment-variable branch August 12, 2020 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants