-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store error backtraces on discrete executions (#1325)
* Store error backtraces on discrete executions * Update app/models/good_job/execution.rb Co-authored-by: Ben Sheldon [he/him] <bensheldon@github.com> * Remove duplicated backtrace formatting and add to job#show page * Make error color red too in jobs table --------- Co-authored-by: Ben Sheldon [he/him] <bensheldon@github.com> Co-authored-by: Ben Sheldon [he/him] <bensheldon@gmail.com>
- Loading branch information
1 parent
e19c5f2
commit c0585ac
Showing
10 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
demo/db/migrate/20240417093204_create_good_job_execution_error_backtrace.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateGoodJobExecutionErrorBacktrace < ActiveRecord::Migration[7.1] | ||
def change | ||
reversible do |dir| | ||
dir.up do | ||
# Ensure this incremental update migration is idempotent | ||
# with monolithic install migration. | ||
return if connection.column_exists?(:good_job_executions, :error_backtrace) | ||
end | ||
end | ||
|
||
add_column :good_job_executions, :error_backtrace, :text, array: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
.../good_job/templates/update/migrations/10_create_good_job_execution_error_backtrace.rb.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class CreateGoodJobExecutionErrorBacktrace < ActiveRecord::Migration<%= migration_version %> | ||
def change | ||
reversible do |dir| | ||
dir.up do | ||
# Ensure this incremental update migration is idempotent | ||
# with monolithic install migration. | ||
return if connection.column_exists?(:good_job_executions, :error_backtrace) | ||
end | ||
end | ||
|
||
add_column :good_job_executions, :error_backtrace, :text, array: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters