hypothesis / product-backlog

Where new feature ideas and current bugs for the Hypothesis product live
118 stars 7 forks source link

Development Environment Roadmap #1044

Closed seanh closed 2 years ago

seanh commented 5 years ago

I've written up past, ongoing and future Hypothesis devenv developments as a list of problems to solve, in roughly priority/sequence order, in this EPIC issue. This probably doesn't belong in product-backlog but I'm putting it here for now for lack of a better place. After writing this up I realised it would probably work better as a product board, but for now this will do.

Incrementalism

The development environment is a special kind of project in that it should never be the primary focus of the team, or even of one member of the team. We spend most of our time delivering features and other improvements to our users, and aim to spend just a little time per sprint improving our development environment. It's therefore important to design development environment improvements so that they can be delivered in small steps, and without disrupting ongoing development work.

Overall Goals

Some broad requirements that the task lists below aim to meet:

  1. All our apps need to be running a recent version of Python.

    And we need to be regularly updating all of our apps to newer versions of Python as they come out.

    This is just part of the cost of doing business, nowadays, as a Python shop: we can't just stay on Python 2.7 forever, as we have done with h and via up until now, because Python 2.7 is no longer supported after 2019. lms and bouncer can't just stay on Python 3.6 either -- it's no longer supported after 2021.

  2. All our apps need to be running recent versions of all Python dependencies.

    And keeping those dependencies up to date over time.

    We can't just dig ourselves into a deeper and deeper hole, as we have done in the past, by not updating dependencies. When a new version of some dependency comes out with an important security fix, bug fix, or new feature, or we want to add a new dependency that requires newer versions of existing dependencies, then we end up having to do a multi-month massive upgrade project of multiple dependencies.

  3. We want to break things up into lots of separate, small apps and projects.

    This is a direction we've been going in for some time (we already have h, bouncer, lms, client and via) and we all seem to agree on. Our devenv set up and processes are going to need to scale to managing many separate projects.

  4. We need to be sharing Python code between apps.

    We have four production Python apps now (h, lms, via and bouncer) as well as a couple of test/demo apps, and are planning to do more separate apps. So our number of separate apps is going to be increasing over time, and we're therefore going to need to share code between them, as the cost of duplicating code will become too high.

    We need to move from being a shop that releases Python apps, to becoming a shop that releases Python apps and publishes open source Python libs. And we need the devenv and CI tooling and processes to enable that.

  5. We want our devenv to become simpler and easier to use over time.

    It's already pretty good, so this one is not urgent, and can be worked on bit-by-bit over time, but we always want to be making the developer experience better. Also, as we grow more and more separate apps and libs, this introduces new challenges: just manually installing and running each individual app in its own tab/window, and setting them all up manually, becomes less practical.

Overall Approach (so far)

This doesn't have to remain set in stone, but for context the tenets of the approach that we've taken so far, and it seems to be working well for us, have been:

The Roadmap

Below are checklists of the specific problems we need to solve in roughly priority order.

We can create individual issues for each of these as we decide to begin work on it. For now I've just made a checklist.

Functional Requirements

There's some functionality that our devenv needs to have in order to be able to deliver what we intend to deliver.

Usability

This is a checklist of problems with the developer usability of our devenv. Basically, problems with the process of installing, running, and hacking on our apps in development. See h install instructions circa March 2017 compared to today.

hmstepanek commented 5 years ago

Something not mentioned on here: differences in configuration between dev and prod. For example: logging.

seanh commented 5 years ago

Logging is a good one. For example it's important that, when an error happens, we log sufficient details to debug it if it happened in prod. If logging works differently in dev vs prod then things might look fine in dev but when an issue happens in prod we find ourselves without sufficient logging to debug.

@hmstepanek Can you add that to the checklist?

In general all apps have countless differences between dev and prod even if they try to keep them the same. The trick is to identify the differences that actually matter, and that can actually be fixed. Logging is a good example. Let's create individual issues for each dev-prod difference that we identify that seems practical and worthwhile to fix.

hmstepanek commented 5 years ago

Thinking a better approach that isn't prone to miss something because we haven't encountered it yet would be to evaluate the differences between the prod and dev config files (conf/app.ini and conf/development-app.in) in each repo and remove unnecessary differences. In my experience running into these kinds of issues they've all resulted from differences in those config files (logging being one example I ran into recently).

seanh commented 2 years ago

Closing this in favour of https://github.com/orgs/hypothesis/projects/61/