You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There’s a bug that makes it that a POST to github actually succeeds, but no Commit record is ever created. Looking at PodVersion#push! it would seem that the this might occur because response.success? is returning false when it actually did succeeded.
Because the user thinks the push failed, they might try again and run into an issue with the UPDATE variant of GitHub’s contents API (opposed to CREATE) requiring a SHA. This returns a 422 to us and we return a 500 to the user.
An example, which I have since fixed manually:
irb(main):001:0> Pod::TrunkApp::Pod.find(:name => 'DB5-Live')
I, [2014-05-23T21:25:24.179119 #2] INFO -- : (0.004418s) SELECT * FROM "pods" WHERE ("name" = 'DB5-Live') LIMIT 1
=> #<Pod::TrunkApp::Pod @values={:id=>5066, :name=>"DB5-Live", :created_at=>2014-05-23 17:16:04 UTC, :updated_at=>nil}>
irb(main):002:0> p = _
=> #<Pod::TrunkApp::Pod @values={:id=>5066, :name=>"DB5-Live", :created_at=>2014-05-23 17:16:04 UTC, :updated_at=>nil}>
irb(main):003:0> p.versions
I, [2014-05-23T21:25:30.309944 #2] INFO -- : (0.003187s) SELECT * FROM "pod_versions" WHERE ("pod_versions"."pod_id" = 5066)
=> [#<Pod::TrunkApp::PodVersion @values={:id=>15510, :name=>"0.1.4", :created_at=>2014-05-23 17:16:04 UTC, :updated_at=>nil, :pod_id=>5066}>]
irb(main):004:0> p.versions.first
=> #<Pod::TrunkApp::PodVersion @values={:id=>15510, :name=>"0.1.4", :created_at=>2014-05-23 17:16:04 UTC, :updated_at=>nil, :pod_id=>5066}>
irb(main):005:0> v = _
=> #<Pod::TrunkApp::PodVersion @values={:id=>15510, :name=>"0.1.4", :created_at=>2014-05-23 17:16:04 UTC, :updated_at=>nil, :pod_id=>5066}>
irb(main):006:0> v.commits
I, [2014-05-23T21:26:33.659066 #2] INFO -- : (0.002274s) SELECT * FROM "commits" WHERE ("commits"."pod_version_id" = 15510) ORDER BY ("updated_at", "created_at") ASC
=> []
The text was updated successfully, but these errors were encountered:
Yep, I still don’t understand how that could happen, though.
It might make sense to start by adding a search field to /manage/log_messages so that we can search for all the pushes that have had this issue. E.g. search for status code ‘422’.
There’s a bug that makes it that a POST to github actually succeeds, but no Commit record is ever created. Looking at
PodVersion#push!
it would seem that the this might occur becauseresponse.success?
is returningfalse
when it actually did succeeded.Because the user thinks the push failed, they might try again and run into an issue with the UPDATE variant of GitHub’s contents API (opposed to CREATE) requiring a SHA. This returns a 422 to us and we return a 500 to the user.
An example, which I have since fixed manually:
The text was updated successfully, but these errors were encountered: