[dreamwidth/dw-free] 1e598c: (Bug 4865) Temporary fail the import if we weren't...
Branch: refs/heads/release-1.13
Home: https://github.com/dreamwidth/dw-free
Commit: 1e598c3fb576bf54a2a7a195c807cbf014f13bbc
https://github.com/dreamwidth/dw-free/commit/1e598c3fb576bf54a2a7a195c807cbf014f13bbc
Author: Afuna <fu@dreamwidth.org>
Date: 2013-01-25 (Fri, 25 Jan 2013)
Changed paths:
M cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
M cgi-bin/DW/Worker/ContentImporter/LiveJournal/Comments.pm
Log Message:
-----------
(Bug 4865) Temporary fail the import if we weren't able to load a user
* fail the import with a list of users we couldn't load, if we weren't
able to load users from the remote site
* fix bug which prevented us from retrying users after they've timed out
once
Based on discussion over at dreamwidth/dw-free#198:
The error is caused by the openid user ($ou) not actually existing. The
most common reason is that we timed out while fetching data on the $ou.
We can't just let the importer continue in this case, because that would
make the comment be posted (wrongly) as by an anonymous user. So we've
decided to make the import temp-fail with the list of users we failed
on. We can pick it up again on a retry.
Problem again: subtle bug meant that once we failed to fetch a
particular user, we never again retried. If it timed out, we returned
(and stored in the db) 0, instead of NULL. Later on, when retrieving the
values, we check for defined-ness. Fix is to set an explicit return
undef for the future. For existing cases, we check for truth value of
$oid, instead of defined-ness. (This also means that we finally log data
on this user if something goes wrong)
Note that the temp-fail listed above means that a problem user which we
somehow never fetch, could still cause all imports where they commented
to fail entirely. But now we know who they are, and we have a working
retry mechanism in place to guard against timeouts.
*If* the retries don't work for some unforeseen reason, we have
something to work with once the repeated failure to import has been
reported.
Commit: b2294f54d0c7b9ed2f9a50fe6140d26019345f9d
https://github.com/dreamwidth/dw-free/commit/b2294f54d0c7b9ed2f9a50fe6140d26019345f9d
Author: Mark Smith <mark@qq.is>
Date: 2013-01-25 (Fri, 25 Jan 2013)
Changed paths:
M cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
M cgi-bin/DW/Worker/ContentImporter/LiveJournal/Comments.pm
Log Message:
-----------
Merge pull request #237 from afuna/importer-claimed_by-bug4854
(Bug 4865) Temporary fail the import if we weren't able to load a user
Compare: https://github.com/dreamwidth/dw-free/compare/fdbef476404d...b2294f54d0c7
Home: https://github.com/dreamwidth/dw-free
Commit: 1e598c3fb576bf54a2a7a195c807cbf014f13bbc
https://github.com/dreamwidth/dw-free/commit/1e598c3fb576bf54a2a7a195c807cbf014f13bbc
Author: Afuna <fu@dreamwidth.org>
Date: 2013-01-25 (Fri, 25 Jan 2013)
Changed paths:
M cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
M cgi-bin/DW/Worker/ContentImporter/LiveJournal/Comments.pm
Log Message:
-----------
(Bug 4865) Temporary fail the import if we weren't able to load a user
* fail the import with a list of users we couldn't load, if we weren't
able to load users from the remote site
* fix bug which prevented us from retrying users after they've timed out
once
Based on discussion over at dreamwidth/dw-free#198:
The error is caused by the openid user ($ou) not actually existing. The
most common reason is that we timed out while fetching data on the $ou.
We can't just let the importer continue in this case, because that would
make the comment be posted (wrongly) as by an anonymous user. So we've
decided to make the import temp-fail with the list of users we failed
on. We can pick it up again on a retry.
Problem again: subtle bug meant that once we failed to fetch a
particular user, we never again retried. If it timed out, we returned
(and stored in the db) 0, instead of NULL. Later on, when retrieving the
values, we check for defined-ness. Fix is to set an explicit return
undef for the future. For existing cases, we check for truth value of
$oid, instead of defined-ness. (This also means that we finally log data
on this user if something goes wrong)
Note that the temp-fail listed above means that a problem user which we
somehow never fetch, could still cause all imports where they commented
to fail entirely. But now we know who they are, and we have a working
retry mechanism in place to guard against timeouts.
*If* the retries don't work for some unforeseen reason, we have
something to work with once the repeated failure to import has been
reported.
Commit: b2294f54d0c7b9ed2f9a50fe6140d26019345f9d
https://github.com/dreamwidth/dw-free/commit/b2294f54d0c7b9ed2f9a50fe6140d26019345f9d
Author: Mark Smith <mark@qq.is>
Date: 2013-01-25 (Fri, 25 Jan 2013)
Changed paths:
M cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
M cgi-bin/DW/Worker/ContentImporter/LiveJournal/Comments.pm
Log Message:
-----------
Merge pull request #237 from afuna/importer-claimed_by-bug4854
(Bug 4865) Temporary fail the import if we weren't able to load a user
Compare: https://github.com/dreamwidth/dw-free/compare/fdbef476404d...b2294f54d0c7
no subject
no subject