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

Fix job not being recorded as completed when exit status > 127 #55

Merged
merged 3 commits into from
May 9, 2017
Merged

Fix job not being recorded as completed when exit status > 127 #55

merged 3 commits into from
May 9, 2017

Conversation

kaorimatz
Copy link
Contributor

Kuroko would fail to record the completion of the job when it exits
with status bigger than 127 as it causes an ActiveModel::RangeError.

@@ -0,0 +1,9 @@
class ChangeExitStatusToUnsignedTinyint < ActiveRecord::Migration
def up
change_column :executions, :exit_status, 'tinyint(4) unsigned'
Copy link
Contributor

Choose a reason for hiding this comment

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

AR migration should be database independent. You might want to use limit: 2 instead of unsigned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, fixed in ff272e3

@@ -182,7 +182,7 @@
t.datetime "suspended_at"
t.datetime "created_at"
t.datetime "updated_at"
t.index ["email"], name: "email", unique: true, using: :btree
t.index ["email"], name: "email", using: :btree
Copy link
Contributor

Choose a reason for hiding this comment

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

This changes should be included in #43 😭


@eisuke Can you fix this?

Copy link
Member

Choose a reason for hiding this comment

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

Oops...
Fixed 0382965
Please rebase or merge the master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I just rebased on master ddb10ea

kaorimatz added 2 commits May 9, 2017 11:29
Kuroko would fail to record the completion of the job when it exits
with status bigger than 127 as it causes an ActiveModel::RangeError.
Copy link
Member

@eisuke eisuke left a comment

Choose a reason for hiding this comment

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

CI failures will be resolved by #56 .
No problem merging this changes 🙏

@kaorimatz
Copy link
Contributor Author

@eisuke I made a change to specify migration version for supporting Rails 5.1 in d9f61cc. I think the minimum supported version of Rails is 5.0, so I took 5.0 as the migration version. Please tell me if we should use another version.

@eisuke
Copy link
Member

eisuke commented May 9, 2017

I think the minimum supported version of Rails is 5.0

Thanks! The #56 changes accept it.

@eisuke eisuke merged commit c280969 into cookpad:master May 9, 2017
@kaorimatz
Copy link
Contributor Author

Thank you for reviewing and merging!

@kaorimatz kaorimatz deleted the fix-job-not-being-recorded-as-completed branch May 9, 2017 04:42
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.

3 participants