Development process improvements #3542
Replies: 3 comments 13 replies
-
My $0.01, based on conversations I've had with others.
I'd be fine with imposing size limits. What if we required each PR to be at most 1,500 lines added? No upper limit on deleted lines. Expected review turn-around could be 2 business days, unless specified otherwise. Reviewers could be selected from an
Right now, I think this is unfamiliarity with the codebase, especially with regards to how multiple different modules interact. I'm very opposed to deleting working tests, even if they are flaky. Flaky tests should be fixed. Working tests are crystallized knowledge of how the system is supposed to work. We delete them at our own peril. There are some unit tests that cannot be run in parallel because they bind on ports, and might clobber one another. I think this is fixable, provided that A lot of the "slow" tests are slow because they fully mock the runtime environment of a Stacks node -- they spin up a regtest Bitcoin node, submit live transaction data to it, and process live Bitcoin blocks. Some tests even spin up multiple Stacks node runloops in separate threads, and have them interact with one another via
Right now, I think the biggest hindrance right now is that Codecov is hilariously unreliable. But this is fixable. Once it's reliable, we should pick a percentage of code coverage that's acceptable and stick with it. It's hard to specify this formally, but tests should spend most of their time exercising the "unhappy" paths. The "happy" path is easy to test, and it's easy to convince oneself that if the "happy" path works, the code works. But, it is these "unhappy" paths that end up biting us in production. The code should be written so that exercising them is straightforward. For example, I've used fault injection code in various places to ensure that certain degraded modes of operation are tested. I'm skeptical about mocking as a test tactic. I think its unhygienic, because it carries the risk of testing your code's behavior to the mocked component instead of the real thing. I can understand why it's often necessary, but I think testing with the real thing should be preferred when it is possible / tractable. An alternative tactic could be to focus on making the connected modules "scriptable" so that it exhibits the behavior that the tested module expects (fault injection is one form of this).
My asks here are:
I am terrible at time estimation. I think I could be better if we could do some kind of collective secret ballot voting on what a task's time estimate could be, and take the median time. Then, my bad estimates could be thrown out in the near-term, and would approach the median estimate from the group in the long term. I like @kantai's suggestion that no task should take more than one week (5 business days). If it does, it should be broken down further. I'd love to spend more time planning out features at regular intervals. Historically, I haven't felt like I've had time.
Super-spicy take: there shall never be more than 1 page of open issues that do NOT have someone working on them. If your issue falls to the second page, it's closed. If it's that important, it will get re-opened. Issues pertaining to long-term architectural tasks should be kept separate from blockchain issues. I think this includes things like new Clarity language features, new network protocols and services, and so on -- i.e. things that haven't yet been broken down into tasks, or are not ready to implement. The blockchain issues page is only for things that are in-flight and for bug reports.
I think the overall goal is to eliminate dependencies. I think a big part of why the event-observer gets broken is because it's set up to fail that way. If the event observer instead was tasked only with (1) receiving a blocking notification when a new block is ready, (2) pulling the relevant data it needs from the stacks node, and (3) consuming the notification, then I think breakage would be a lot less frequent. |
Beta Was this translation helpful? Give feedback.
-
Started this wiki page to capture some concrete things folks were aligned on: We can use this discussion to hash out ideas, and as we get alignment on various things, we can update the wiki. |
Beta Was this translation helpful? Give feedback.
-
Notes from discussion on 2023-02-01Attendees: @jcnelson , @kantai , @obycode , @saralab , @donpdonp , @igorsyl , @netrome , Sergey Note: I tried my best to faithfully yet concisely capture the discussion from the meeting. I apologize for any errors / omissions. Please feel free to add if I missed or misrepresented anything. After quick context setting + silent pre-read, the group emoji voted to prioritize the areas listed in the original post, for discussion. Rough prioritization that emerged:
The group then started discussion on the first area. Unfortunately this took up most of the time. The group agreed this call was more a beginning of conversations around these topics, not the end. Norms for pull requests
Impact on downstream dependencies
Testing hygiene
|
Beta Was this translation helpful? Give feedback.
-
👋🏽 everyone!
Many aspects of development on the Stacks blockchain are challenging today. This affects developer productivity, as well as predictability of shipping milestones, on time, with high quality.
This is a request for input from contributors to the Stacks blockchain (past or present). Please try to provide your feedback before Wednesday, February 1st -- there is a call on Feb 1st and your feedback will serve as a starting point for that discussion.
If it helps, here are some areas / prompts to consider:
Note that the process improvements are not necessarily limited to engineers / individual contributors. Guidelines for managers of teams or non-technical roles are also very much in scope, in so far as they impact (directly or indirectly) development on the Stacks blockchain.
Beta Was this translation helpful? Give feedback.
All reactions