GothenburgBitFactory / taskserver

Taskserver - Taskwarrior Synchronisation Server
Other
215 stars 38 forks source link

Does taskserver correctly sync tasks with "dep:" set? #183

Closed ns740 closed 2 years ago

ns740 commented 2 years ago

i'm having problems with both the inthe.am and freecinq task servers. when i have tasks with dep: set to some other task, the dependencies don't get sync'd. (the target task shows up with no dependencies).

Which suggests that it might be the taskd and not these server implementations that is causing the problem. (But i haven't tried setting up my own server to test this)

Is this a known problem? Should it be working? What might i be doing wrong?

to duplicate the problem:

On client A

❯ task add bugdemo foo
Created task 64.
❯ task add bugdemo bar dep:64
Created task 65.
❯ task bugdemo

ID Age   Deps Description Urg
62 29s        bugdemo foo    8
63 18s   62   bugdemo bar   -5

2 tasks
There are 2 local changes.  Sync required.
❯ task sync
Syncing with freecinc.com:53589

Sync successful.  2 changes uploaded.

now on client B

❯ task sync
Syncing with freecinc.com:53589
     add 3e961b23-de06-4362-b058-20ad993c3137 'bugdemo foo'
     add 0b5aba6c-7e2e-4841-ad80-c584990ebceb 'bugdemo bar'

Sync successful.  2 changes downloaded.
❯ task bugdemo

ID Age  Description Urg
62 1min bugdemo foo    0
63 1min bugdemo bar    0

2 tasks
bradyt commented 2 years ago

Might be this one: https://github.com/GothenburgBitFactory/taskserver/issues/181

We could apply a quick fix to recognize this particular error (a depends property beginning and ending with [..]) and "undo" the damage from the task server. That might be a good stopgap. -- https://github.com/GothenburgBitFactory/taskwarrior/issues/2689#issuecomment-1013912591

Indeed, this might be a good course of action, given that upgrading clients is generally easier than upgrading the server 🙂 -- https://github.com/GothenburgBitFactory/taskwarrior/issues/2689#issuecomment-1013947635

Should we get a release shipped that includes this change? I've been careful to not used dependencies until it's fixed but .. it's getting hard :) https://github.com/GothenburgBitFactory/taskwarrior/pull/2717#issuecomment-1028426848

My impression is, you can either change to Taskwarrior 2.5.3, or build with pull request committed above, or don't use depends with stable Taskserver. You may still need to clean up the data on the server afterwards.

tbabej commented 2 years ago

Brady's assessment of the situation is correct, I would just point out that the #2717 is actually merged, so building current develop should be sufficient. We are working on a set of integration tests to avoid problems like this in the future, pending which a new release will be made.

ghost commented 2 years ago

@bradyt @tbabej Yes that was it thank you 🙂
Switching to the develop branch on both clients fixed it.

on one of the clients i built the develop build with

cmake -DCMAKE_BUILD_TYPE=debug . (but ver number is still 2.6.1 ?) and installed it with sudo make install

will this cause problems downstream when the #2717 fix shows up in a brew update later?
(On the other client i am just running ./src/task)

bradyt commented 2 years ago

I think it would be something like brew link --overwrite, not sure the exact incantation, but I think I've had no real issue with your general scenario.