Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

[Fix #339] Update GitHub comment in deploy-pending-contracts scheduler thread #341

Merged
merged 10 commits into from
Mar 22, 2018

Conversation

vitvly
Copy link

@vitvly vitvly commented Mar 1, 2018

Fixes #339

GitHub comments are now updated in a scheduler thread that attempted to redeploy pending contracts. Also, this PR removes unneeded code for failed contract redeployment and refactors contract deployment code to a separate fn.

thread;
refactor contract deployment code to a separate fn;
remove unused code
@vitvly
Copy link
Author

vitvly commented Mar 16, 2018

QA note: one way to test it would be post a bounty as usual, and then set transaction_hash field for the corresponding issue record to null. This will make that issue appear in the result set of pending-contracts query that is used by scheduler thread for redeployment.

Below the SQL query to set the transaction_hash for an issue with particular owner, repo, and issue_number:

update issues i
set transaction_hash=null, contract_address=null, comment_id=null
from repositories r
where r.repo=<repo-name>
and r.owner=<owner-name>
and i.repo_id=r.repo_id
and i.issue_number=<issue-number>;

@churik
Copy link
Member

churik commented Mar 19, 2018

@siphiuel new comment from GH bot is not added, what I did wrong?

Steps:

  • add new issue with bounty
  • wait until contract will be deployed
  • execute
update issues i
set transaction_hash=null, contract_address=null, comment_id=null
from repositories r
where r.repo=<repo-name>
and r.owner=<owner-name>
and i.repo_id=r.repo_id
and i.issue_number=<issue-number>;
  • delete comment from GH bot
  • wait ~ 15 mins

Expected result:

  1. bounty is restored in open-bounty list
  2. new comment from GH bot is added

Actual result:

  1. bounty is restored in open-bounty list
  2. no new comment is added
    Thus issue still haven't GH comment: Test4_to_delete_comment TestingEnvENV/TestEnvAtt5_1#33, but displayed in SOB in open-bounty list

NOTE: if I don't delete comment from GH bot, old comment is fully restored (with QR, contract address ect)

@churik
Copy link
Member

churik commented Mar 22, 2018

Environments

  • Ethereum wallet used: MetaMask
  • Browser: Chrome
  • Operating System: macOS High Sierra 10.13.3

Tested functionality

  • Deploy and restore contract on ORG repo;
  • Deploy and restore contract on personal repo;

@churik churik merged commit 1b57ad4 into develop Mar 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants