Skip to content

Commit

Permalink
Enable rails8 docker container to run
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Dec 9, 2024
1 parent 768d497 commit c2ac24f
Show file tree
Hide file tree
Showing 22 changed files with 95 additions and 51 deletions.
44 changes: 44 additions & 0 deletions features/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,50 @@ services:
- target: 3000
published: 7257

rails8:
build:
context: rails8
args:
- RUBY_TEST_VERSION
depends_on:
- mongo
environment:
- BUGSNAG_API_KEY
- http_proxy
- RAILS_ENV
- BUGSNAG_APP_TYPE
- BUGSNAG_APP_VERSION
- BUGSNAG_AUTO_CAPTURE_SESSIONS
- BUGSNAG_AUTO_NOTIFY
- BUGSNAG_ENDPOINT
- BUGSNAG_IGNORE_CLASS
- BUGSNAG_IGNORE_MESSAGE
- BUGSNAG_META_DATA_FILTERS
- BUGSNAG_NOTIFY_RELEASE_STAGE
- BUGSNAG_PROJECT_ROOT
- BUGSNAG_PROXY_HOST
- BUGSNAG_PROXY_PASSWORD
- BUGSNAG_PROXY_PORT
- BUGSNAG_PROXY_USER
- BUGSNAG_RELEASE_STAGE
- BUGSNAG_SEND_CODE
- BUGSNAG_SEND_ENVIRONMENT
- BUGSNAG_SESSION_ENDPOINT
- BUGSNAG_TIMEOUT
- CALLBACK_INITIATOR
- SQL_ONLY_BREADCRUMBS
- ADD_ON_ERROR
- USE_DEFAULT_AUTO_CAPTURE_SESSIONS
- ADD_REQUEST_ON_ERROR
restart: "no"
networks:
default:
aliases:
- rails8
ports:
- target: 3000
published: 7258

rails_integrations:
build:
context: rails_integrations
Expand Down
4 changes: 2 additions & 2 deletions features/rails_features/active_job.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Active Job

@rails4 @rails5 @rails6 @rails7
@rails4 @rails5 @rails6 @rails7 @rails8
Scenario: A handled error will be delivered
Given I start the rails service
When I navigate to the route "/active_job/handled" on the rails app
Expand All @@ -26,7 +26,7 @@ Scenario: A handled error will be delivered
And in Rails versions ">=" 6 the event "metaData.active_job.timezone" equals "UTC"
And in Rails versions ">=" 6 the event "metaData.active_job.enqueued_at" is a timestamp

@rails4 @rails5 @rails6 @rails7
@rails4 @rails5 @rails6 @rails7 @rails8
Scenario: An unhandled error will be delivered
Given I start the rails service
When I navigate to the route "/active_job/unhandled" on the rails app
Expand Down
2 changes: 1 addition & 1 deletion features/rails_features/active_record.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Active Record

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: An unhandled error in a transaction callback will be delivered
Given I start the rails service
When I navigate to the route "/unhandled/error_in_active_record_callback" on the rails app
Expand Down
4 changes: 2 additions & 2 deletions features/rails_features/api_key.feature
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Feature: API key

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Setting api_key in environment variable works
Given I start the rails service
When I navigate to the route "/api_key/environment" on the rails app
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario Outline: Changing api_key after initializer works
Given I start the rails service
When I navigate to the route "/api_key/changing?api_key=c35a2a72bd230ac0aa0f52715bbdc6ac" on the rails app
Expand Down
8 changes: 4 additions & 4 deletions features/rails_features/app_type.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: App type configuration

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Setting app_type in initializer works
Given I set environment variable "BUGSNAG_APP_TYPE" to "custom_app_type"
And I start the rails service
Expand All @@ -12,7 +12,7 @@ Scenario: Setting app_type in initializer works
And the event "metaData.request.url" ends with "/app_type/initializer"
And the event "app.type" equals "custom_app_type"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Changing app_type after initializer works
Given I start the rails service
When I navigate to the route "/app_type/after?type=maze_after_initializer" on the rails app
Expand All @@ -23,7 +23,7 @@ Scenario: Changing app_type after initializer works
And the event "metaData.request.url" ends with "/app_type/after?type=maze_after_initializer"
And the event "app.type" equals "maze_after_initializer"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Should default to "rails" for handled errors
Given I start the rails service
When I navigate to the route "/app_type/handled" on the rails app
Expand All @@ -32,7 +32,7 @@ Scenario: Should default to "rails" for handled errors
And the event "metaData.request.url" ends with "/app_type/handled"
And the event "app.type" equals "rails"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Should default to "rails" for unhandled errors
Given I start the rails service
When I navigate to the route "/app_type/unhandled" on the rails app
Expand Down
6 changes: 3 additions & 3 deletions features/rails_features/app_version.feature
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Feature: App version configuration

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: App_version is nil by default
Given I start the rails service
When I navigate to the route "/app_version/default" on the rails app
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
And the event "app.version" is null

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Setting app_version in initializer works
Given I set environment variable "BUGSNAG_APP_VERSION" to "1.0.0"
And I start the rails service
Expand All @@ -17,7 +17,7 @@ Scenario: Setting app_version in initializer works
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
And the event "app.version" equals "1.0.0"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Setting app_version after initializer works
Given I start the rails service
When I navigate to the route "/app_version/after?version=1.1.0" on the rails app
Expand Down
8 changes: 4 additions & 4 deletions features/rails_features/auto_capture_sessions.feature
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
Feature: Auto capture sessions

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_capture_sessions defaults to true
Given I set environment variable "USE_DEFAULT_AUTO_CAPTURE_SESSIONS" to "true"
And I start the rails service
When I navigate to the route "/session_tracking/initializer" on the rails app
And I wait to receive a session
Then the session is valid for the session reporting API version "1.0" for the "Ruby Bugsnag Notifier" notifier

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_capture_sessions can be set to false in the initializer
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
And I start the rails service
When I navigate to the route "/session_tracking/initializer" on the rails app
Then I should receive no requests

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Manual sessions are still sent if Auto_capture_sessions is false
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
And I start the rails service
When I navigate to the route "/session_tracking/manual" on the rails app
And I wait to receive a session
Then the session is valid for the session reporting API version "1.0" for the "Ruby Bugsnag Notifier" notifier

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: 100 session calls results in 100 sessions
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "false"
And I start the rails service
Expand Down
8 changes: 4 additions & 4 deletions features/rails_features/auto_notify.feature
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Feature: Auto notify

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_notify set to false in the initializer prevents unhandled error sending
Given I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
And I start the rails service
When I navigate to the route "/auto_notify/unhandled" on the rails app
Then I should receive no requests

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_notify set to false in the initializer still sends handled errors
Given I set environment variable "BUGSNAG_AUTO_NOTIFY" to "false"
And I start the rails service
Expand All @@ -20,13 +20,13 @@ Scenario: Auto_notify set to false in the initializer still sends handled errors
And the event "app.type" equals "rails"
And the event "metaData.request.url" ends with "/auto_notify/handled"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_notify set to false after the initializer prevents unhandled error sending
Given I start the rails service
When I navigate to the route "/auto_notify/unhandled_after" on the rails app
Then I should receive no requests

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Auto_notify set to false after the initializer still sends handled errors
Given I start the rails service
When I navigate to the route "/auto_notify/handled_after" on the rails app
Expand Down
6 changes: 3 additions & 3 deletions features/rails_features/before_notify.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Before notify callbacks

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Rails before_notify controller method works on handled errors
Given I start the rails service
When I navigate to the route "/before_notify/handled" on the rails app
Expand All @@ -14,7 +14,7 @@ Scenario: Rails before_notify controller method works on handled errors
And the event "metaData.before_notify.source" equals "rails_before_handled"
And the event "metaData.controller.name" equals "BeforeNotifyController"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Rails before_notify controller method works on unhandled errors
Given I start the rails service
When I navigate to the route "/before_notify/unhandled" on the rails app
Expand All @@ -28,7 +28,7 @@ Scenario: Rails before_notify controller method works on unhandled errors
And the event "metaData.before_notify.source" equals "rails_before_unhandled"
And the event "metaData.controller.name" equals "BeforeNotifyController"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Inline block on handled errors is called
Given I start the rails service
When I navigate to the route "/before_notify/inline" on the rails app
Expand Down
8 changes: 4 additions & 4 deletions features/rails_features/breadcrumbs.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Rails automatic breadcrumbs

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Request breadcrumb
Given I start the rails service
When I navigate to the route "/breadcrumbs/handled?password=secret&abc=xyz" on the rails app
Expand All @@ -17,7 +17,7 @@ Scenario: SQL Breadcrumb without bindings
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_without_bindings.json"

@rails5 @rails6 @rails7
@rails5 @rails6 @rails7 @rails8
Scenario: SQL Breadcrumb with bindings
Given I set environment variable "SQL_ONLY_BREADCRUMBS" to "true"
And I start the rails service
Expand All @@ -26,15 +26,15 @@ Scenario: SQL Breadcrumb with bindings
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/sql_with_bindings.json"

@rails4 @rails5 @rails6 @rails7
@rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Active job breadcrumb
Given I start the rails service
When I navigate to the route "/breadcrumbs/active_job" on the rails app
And I wait to receive an error
Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
And the event contains a breadcrumb matching the JSON fixture in "features/fixtures/expected_breadcrumbs/active_job.json"

@rails4 @rails5 @rails6 @rails7
@rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Cache read
Given I start the rails service
When I navigate to the route "/breadcrumbs/cache_read" on the rails app
Expand Down
6 changes: 3 additions & 3 deletions features/rails_features/feature_flags.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: feature flags

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: adding feature flags for an unhandled error
Given I start the rails service
When I navigate to the route "/features/unhandled?flags[a]=1&flags[b]&flags[c]=3&flags[d]=4" on the rails app
Expand Down Expand Up @@ -32,7 +32,7 @@ Scenario: adding feature flags for an unhandled error
| y | |
| z | 7 |

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: adding feature flags for a handled error
Given I start the rails service
When I navigate to the route "/features/handled?flags[ab]=12&flags[cd]=34" on the rails app
Expand Down Expand Up @@ -62,7 +62,7 @@ Scenario: adding feature flags for a handled error
| f | i |
| g | |

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: clearing all feature flags doesn't affect subsequent requests
Given I start the rails service
When I navigate to the route "/features/unhandled?flags[a]=1&flags[b]&flags[c]=3&flags[d]=4&clear_all_flags" on the rails app
Expand Down
6 changes: 3 additions & 3 deletions features/rails_features/handled.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Rails handled errors

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Unhandled RuntimeError
Given I start the rails service
When I navigate to the route "/handled/unthrown" on the rails app
Expand All @@ -14,7 +14,7 @@ Scenario: Unhandled RuntimeError
And the event "severity" equals "warning"
And the event "severityReason.type" equals "handledException"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Thrown handled NameError
Given I start the rails service
When I navigate to the route "/handled/thrown" on the rails app
Expand All @@ -28,7 +28,7 @@ Scenario: Thrown handled NameError
And the event "severity" equals "warning"
And the event "severityReason.type" equals "handledException"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Manual string notify
Given I start the rails service
When I navigate to the route "/handled/string_notify" on the rails app
Expand Down
4 changes: 2 additions & 2 deletions features/rails_features/ignore_classes.feature
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Feature: Ignore classes

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Ignore_classes can be set to a different value in initializer
Given I set environment variable "BUGSNAG_IGNORE_CLASS" to "IgnoredError"
And I start the rails service
When I navigate to the route "/ignore_classes/initializer" on the rails app
Then I should receive no requests

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Ignore_classes can be set to a different value after initializer
Given I start the rails service
When I navigate to the route "/ignore_classes/after?ignore=IgnoredError" on the rails app
Expand Down
2 changes: 1 addition & 1 deletion features/rails_features/meta_data_filters.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Metadata filters

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Meta_data_filters should include Rails.configuration.filter_parameters
Given I start the rails service
When I navigate to the route "/metadata_filters/filter?filtered_parameter=foo&other_parameter=bar" on the rails app
Expand Down
4 changes: 2 additions & 2 deletions features/rails_features/on_error.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: On error callbacks

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Rails on_error works on handled errors
Given I set environment variable "ADD_ON_ERROR" to "true"
And I start the rails service
Expand All @@ -14,7 +14,7 @@ Scenario: Rails on_error works on handled errors
And the event "metaData.request.url" ends with "/handled/unthrown"
And the event "metaData.on_error.source" equals "on_error handled"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Rails on_error works on unhandled errors
Given I set environment variable "ADD_ON_ERROR" to "true"
And I start the rails service
Expand Down
6 changes: 3 additions & 3 deletions features/rails_features/project_root.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Project root configuration

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Project_root should default to Rails.root
Given I start the rails service
When I navigate to the route "/project_root/default" on the rails app
Expand All @@ -11,7 +11,7 @@ Scenario: Project_root should default to Rails.root
And the event "metaData.request.url" ends with "/project_root/default"
And the "file" of the top non-bugsnag stackframe equals "app/controllers/project_root_controller.rb"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Project_root can be set in an initializer
Given I set environment variable "BUGSNAG_PROJECT_ROOT" to "/foo/bar"
And I start the rails service
Expand All @@ -23,7 +23,7 @@ Scenario: Project_root can be set in an initializer
And the event "metaData.request.url" ends with "/project_root/initializer"
And the "file" of the top non-bugsnag stackframe equals "/usr/src/app/controllers/project_root_controller.rb"

@rails3 @rails4 @rails5 @rails6 @rails7
@rails3 @rails4 @rails5 @rails6 @rails7 @rails8
Scenario: Project_root can be set after an initializer
Given I start the rails service
When I navigate to the route "/project_root/after" on the rails app
Expand Down
Loading

0 comments on commit c2ac24f

Please sign in to comment.