GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.43k stars 301 forks source link

[TW-1806] UDA Breaks Task Server Sync #1827

Closed taskwarrior closed 7 months ago

taskwarrior commented 6 years ago

John on 2016-05-19T11:39:02Z says:

Tasks generated with a custom UDA for example using the UDA example on the taskwarrior page of: $ task config uda.estimate.type numeric $ task config uda.estimate.label Est break synchronisation. Removing the estimate item from the backlog.data file or the task entirely allows synchronisation to resume.

taskwarrior commented 6 years ago

Migrated metadata:

Created: 2016-05-19T11:39:02Z
Modified: 2018-02-05T08:29:06Z
taskwarrior commented 6 years ago

Paul Beckingham on 2016-05-19T13:45:40Z says:

What is the error? Does the server log containing anything to help us?

taskwarrior commented 6 years ago

John on 2016-05-19T15:50:34Z says:

Sorry I should have said it is the classic: "Sync failed. The Taskserver returned error: 500 Unrecognized taskwarrior file format"

taskwarrior commented 6 years ago

Michał Góral on 2018-02-05T08:29:06Z says:

I had this problem as well and managed to fix it somehow.

First I added estimate UDA like John above and added estimate to some of my tasks. Then I changed its type from numeric to duration and added it to even more tasks. When I tried to sync my changes, got the same error: unrecognized taskwarrior file format.

Here are the logs from taskd which I collected at that point:

Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] 'sync' from '<redacted>' using 'task 2.5.1' at <redacted> Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Client key '<redacted>' + 34 txns Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Loaded 1782 records Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Branch point: <redacted> --> 1781 Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Subset 0 tasks Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Unrecognized taskwarrior file format. Feb 05 08:58:31 <redacted> taskd[30238]: 2018-02-05 07:58:31 [2] Serviced in 0.165130s

I tried running it with debug=1 and debug=on in taskdrc, but there were no additional logs.

And here's another log from task rc.debug=1 sync, especially the first line looks suspicious:

<redacted uuid> *\{"description":"estimate","entry":"20180202T160251Z","modified":"20180205T065435Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"}* \{"description":"<redacted>","entry":"20180202T160251Z","modified":"20180205T065443Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"} \{"description":"<redacted>","entry":"20180202T160251Z","estimate":P300D,"modified":"20180205T065641Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"} \{"description":"<redacted>","entry":"20180202T160251Z","estimate":"P330D","modified":"20180205T065856Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"} \{"description":"<redacted>","entry":"20180202T160251Z","estimate":"PT10H","modified":"20180205T065924Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"} \{"description":"<redacted>","entry":"20180202T160251Z","estimate":"PT10M","modified":"20180205T065943Z","status":"pending","uuid":"e9e118b4-a288-40e6-94df-3ccaffa05ef5"} \{"description":"<redacted other>","entry":"20180127T071519Z","estimate":"PT5M","modified":"20180205T070046Z","project":"<redacted>","status":"pending","tags":["<redacted>"],"uuid":"dfaeb03e-3a4a-4033-870a-73e387645e97"}

 

I then removed my backlog.data, removed estimate UDA from my .taskrc and readded again it with duration type from start. Then I added estimate to some tasks again and it suddenly works, but now log lacks suspicious line:

 

<redacted uuid> \{"description":"<redacted>","entry":"20180125T112927Z","estimate":"PT1H","modified":"20180205T082725Z","status":"pending","tags":["<redacted>"],"uuid":"1d39de40-7196-4653-bcf1-495682c00ce1"}

sanjayankur31 commented 2 years ago

Also just added the estimate UDA today as noted in the docs and ran into this. I've got my on taskserver running, so happy to provide any logs to help fix this if required.

I'll go try Michal's work around in the meantime to get it working again.

sanjayankur31 commented 2 years ago

I can confirm that removing the backlog.data file, and converting the uda to duration from numeric seems to fix it. The next sync was unexpectedly large, but it works.

In the meantime, maybe it'll be good to update the docs to use duration instead of numeric in the estimate example, just so more folks don't run into this?

djmitche commented 7 months ago

Closed because taskserver/taskd is no longer supported. The new sync system doesn't see any of the task data, so UDAs cannot affect it.