Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Up Todos and Add in Issue Checker #640

Merged
merged 6 commits into from Oct 11, 2018

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Oct 10, 2018

This cleans up Todos referencing closed issues and adds in an issue checker to script that checks the status of issues

@nisdas nisdas added the Enhancement New feature or request label Oct 10, 2018
@@ -169,7 +169,6 @@ func (p *Proposer) run(done <-chan struct{}, client pb.ProposerServiceClient) {

bitmask := p.GenerateBitmask(p.pendingAttestation)

// TODO(#552): Implement real proposals with randao reveals and attestation fields.
Copy link
Member

Choose a reason for hiding this comment

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

There is still a todo here, it's issue #619

Copy link
Member Author

Choose a reason for hiding this comment

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

The script basically just checks using the github api if the issue is closed. If it is closed it throws an error. I am just removing todos that are referencing issues that are closed

Copy link
Member

Choose a reason for hiding this comment

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

Np. I can add a TODO there later.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it back with #619.

@@ -76,8 +76,6 @@ func NewChainService(ctx context.Context, cfg *Config) (*ChainService, error) {

// Start a blockchain service's main event loop.
func (c *ChainService) Start() {
// TODO(#474): Fetch the slot: (block, state) DAGs from persistent storage
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure we don't need to do this anymore? @rauljordan can you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe we need this as we already do everything using persistent storage. This seems outdated.

@codecov
Copy link

codecov bot commented Oct 10, 2018

Codecov Report

Merging #640 into master will increase coverage by 1.66%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #640      +/-   ##
==========================================
+ Coverage   71.35%   73.01%   +1.66%     
==========================================
  Files          34       52      +18     
  Lines        2548     3476     +928     
==========================================
+ Hits         1818     2538     +720     
- Misses        569      716     +147     
- Partials      161      222      +61
Impacted Files Coverage Δ
validator/proposer/service.go 97.4% <ø> (ø)
shared/p2p/service.go 67.01% <ø> (ø)
beacon-chain/types/crystallized_state.go 88.34% <ø> (ø) ⬆️
beacon-chain/db/schema.go 100% <ø> (ø) ⬆️
beacon-chain/blockchain/service.go 65.16% <ø> (ø) ⬆️
beacon-chain/utils/slot_ticker.go 67.64% <0%> (-14.71%) ⬇️
validator/utils/clock.go 100% <0%> (ø)
shared/p2p/discovery.go 88.23% <0%> (ø)
shared/p2p/adapter/tracer/tracer.go 100% <0%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26cad3f...b00c389. Read the comment docs.

@terencechain
Copy link
Member

Workflow wise - is it just me or this feels weird?

  1. Bob wants to work on issue Add a Gitter chat badge to README.md #1
  2. Bob creates PR incl sharding and readme #2
  3. Bob requests review and gets approved
  4. Bob merges PR incl sharding and readme #2
  5. Bob forgets to delete the todo Add a Gitter chat badge to README.md #1
  6. Alice wants to work on issue geth sharding entrypoint and contract deployment #3
  7. Alice creates PR Validator manager contract in solidity #4
  8. Alice's build is failing because Bob forgets to delete his todo, now Alice has to find out what Bob did

It feels like the next person will be cleaning up for the last person quite often 😅 I feel everything should be contained within Bob.

@nisdas
Copy link
Member Author

nisdas commented Oct 10, 2018

@terenc3t Yeah the workflow is not very smooth,but there is no way we can know if an issue will be closed before hand. The other alternative is that I remove the issue checker and we clean up manually

@terencechain
Copy link
Member

Got it. We can give this a try. @prestonvanloon Do you have any thoughts for a tool like this?

@rauljordan rauljordan changed the title Clean up Todos and Add in Issue Checker Clean Up Todos and Add in Issue Checker Oct 10, 2018
@rauljordan
Copy link
Contributor

I think this should be fine for some bookkeeping but agreed that making it a merge requirement could lead into weird situations where we might be fixing other people's left over todo's. We can decide to make it a build item if others agree, but we can just merge this in for now as it isn't modifying travis.

@rauljordan rauljordan merged commit c67a084 into prysmaticlabs:master Oct 11, 2018
fi
done < <(grep -PrinH -o -h '(?<!context\.)todo\(#{0,1}\K(\d+)' --include \*.go *)
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this line? Wouldn't the script have exited on line 9 if there was any output of this command?

Copy link
Member Author

Choose a reason for hiding this comment

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

The do-while loop, reads any line printed out by grep, which parses the issue numbers from the files. Without that line the loop would not do anything as there is nothing printed out

Copy link
Member

Choose a reason for hiding this comment

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

Ah! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants