Skip to content

WIP: Cancel message#370

Open
LipuFei wants to merge 13 commits into
Tribler:develfrom
LipuFei:cancel_message
Open

WIP: Cancel message#370
LipuFei wants to merge 13 commits into
Tribler:develfrom
LipuFei:cancel_message

Conversation

@LipuFei

@LipuFei LipuFei commented Sep 9, 2014

Copy link
Copy Markdown
Contributor

Use cancel message to replace undo message.
All undo message code remain the same.

@LipuFei

LipuFei commented Sep 9, 2014

Copy link
Copy Markdown
Contributor Author

@whirm I'll remove the pep8 commit for now, otherwise the PR is too difficult to review.

@tribler-ci

Copy link
Copy Markdown

Test FAILED.
Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/784/

@whirm

whirm commented Sep 9, 2014

Copy link
Copy Markdown
Contributor

@LipuFei yes, those should always go alone

@NielsZeilemaker

Copy link
Copy Markdown
Contributor

@LipuFei why are you adding the cancel to the permission triplet? That shouldn't be neccesary. You authorise someone to send a dispersy_cancel message etc.

@LipuFei

LipuFei commented Sep 10, 2014

Copy link
Copy Markdown
Contributor Author

@NielsZeilemaker I made this PR to make it easy for us to review. Thanks! I'll check everything again.

@LipuFei

LipuFei commented Sep 10, 2014

Copy link
Copy Markdown
Contributor Author

@NielsZeilemaker What does the permission_triplets mean?

@NielsZeilemaker

Copy link
Copy Markdown
Contributor

Basically, you can authorize/revoke or grant someone the permission to create a message of a certain type. I wouldn't start messing with this as its never tested/understood by me.
Moreover, are you sure you want to introduce a cancel callback? Maybe calling the undo callback would suffice. Chaning it slightly to allow you to pass a cancelled/undone/done variable instead of the undone/done currently used.

@NielsZeilemaker

Copy link
Copy Markdown
Contributor

Btw, the documentation regarding the permissions should still be correct. You can have a look there.

@LipuFei

LipuFei commented Sep 10, 2014

Copy link
Copy Markdown
Contributor Author

@NielsZeilemaker I had thought about it and I decided to duplicate the undo stuff instead of messing them up. Later, when we want to remove the undo, we can simply remove every undo-related thing without worry about causing damage to the cancel message. I will read the permission docs. Thanks!

Comment thread community.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would remove the cancel here, but leave it in timeline.py. E.g. add it when the "undo" thingy is there.

@tribler-ci

Copy link
Copy Markdown

Test FAILED.
Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/785/

@LipuFei LipuFei force-pushed the cancel_message branch 2 times, most recently from 9d0f83b to b6cd526 Compare September 10, 2014 17:18
@tribler-ci

Copy link
Copy Markdown

Test FAILED.
Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/786/

@tribler-ci

Copy link
Copy Markdown

Test FAILED.
Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/787/

@LipuFei

LipuFei commented Sep 10, 2014

Copy link
Copy Markdown
Contributor Author

@whirm I guess this is more or less it. I will check the unit tests one more time after my presentation rehearsal. Also, before we merge, we should change the AllChannel community to use this cancel message and test on jenkins.

@whirm

whirm commented Sep 11, 2014

Copy link
Copy Markdown
Contributor

Ok, let's review it later

@tribler-ci

Copy link
Copy Markdown

Merged build triggered.

@tribler-ci

Copy link
Copy Markdown

Merged build started.

@tribler-ci

Copy link
Copy Markdown

Merged build finished.

@tribler-ci

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/836/

@tribler-ci

Copy link
Copy Markdown

Merged build triggered.

@tribler-ci

Copy link
Copy Markdown

Merged build started.

@tribler-ci

Copy link
Copy Markdown

Merged build finished.

@tribler-ci

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results: http://jenkins.tribler.org/job/GH_Dispersy_pull-request-tester_devel/837/

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/848/
Test FAILed.

@LipuFei

LipuFei commented Apr 7, 2015

Copy link
Copy Markdown
Contributor Author

@NielsZeilemaker One of the cancel message tests didn't pass. The test does the following:

Three nodes: SELF, NODE, OTHER
What they do:
1. SELF gives NODE the permission to cancel.
2. OTHER created message M1.
3. NODE cancels M1 with cancel message C1.
4. M1 should be found as cancelled by NODE (This one passed).
5. SELF revokes NODE's cancel permission.
6. M1 should still be marked as cancelled by NODE (This one failed).

This test was passing before. Am I doing it correctly? If a user's cancel permission has been revoked, should his old cancel messages be regarded as invalid as well?

@NielsZeilemaker

Copy link
Copy Markdown
Contributor

@LipuFei maybe create a wiki page describing the cancel message, and what it should do. Then afterwards, I can have a look and maybe we can modify the behaviour of your implementation accordingly.
Also describe situations such as the one above. A gets the permission to cancel other, A's permission gets revoke -> what should be do with the messages cancelled by A.

@LipuFei

LipuFei commented Apr 7, 2015

Copy link
Copy Markdown
Contributor Author

@NielsZeilemaker I've made a wiki page: https://github.com/Tribler/dispersy/wiki/Cancel-Message. Hope it explains.

@NielsZeilemaker

Copy link
Copy Markdown
Contributor

@LipuFei I made some changes to the document. I guess cancel messages should also not cancel an authorize message right? Or are we adding that? Additionally, we should think about being able to drop cancelled messages from the database in order to save space.

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/864/
Test FAILed.

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/871/
Test FAILed.

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/886/
Test FAILed.

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/891/
Test FAILed.

@tribler-ci

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
http://jenkins.tribler.org//job/GH_Dispersy_pull-request-tester_devel/894/
Test FAILed.

@LipuFei

LipuFei commented Sep 14, 2015

Copy link
Copy Markdown
Contributor Author

Hi @NielsZeilemaker, could you review this PR again? Thanks!

@whirm whirm changed the title Cancel message WIP: Cancel message Apr 29, 2016
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.

4 participants