Server side evaluation in the Web IDE
When making changes to software I run tests to verify my code does what I am expecting and that I haven't broken something else. I want the Web IDE to help me resolve test failures. **Scenario: resolve integration test failure** – after I've finished improving a feature in my local environment, I push it to GitLab where the full suite of CI/CD tests are run which takes a long time. Normally I only run the unit tests that are immediately relevant locally. The tests fail, but I've switched to a new branch and have multiple in progress changes including upgraded dependencies. **Scenario: open source contribution** - I want to contribute a fix to a library I'm using. I can see the source of the issue by reading the code in GitLab, but I don't want to deal with installing a new language runtime and package manager just to make a small fix. ### Vision An integrated product brings emergent benefits, which we've seen by integrating SCM, Issues, CI/CD etc. Testing is an important part of writing software because it increases code quality and allow good test coverage allows developers to move faster while maintaining quality. The Web IDE will be more valuable if we integrate writing code and testing. Testing can be integrated in two ways: - providing access to GitLab CI results for commits that are running or previously run - allowing tests to be run in the Web IDE before committing: web terminal and manually via live preview #### Run tests before committing When I'm working to fix a failing test, I want immediate feedback on if the test I am fixing begins to pass without needing to commit the change, wait for the pipeline to run and review the logs. We should allow a single test to be run immediately and provide the fedback directly in the Web IDE. - launch a container in Kubernetes with the correct run time and install dependencies when the Web IDE is opened - sync changes to the container so that test can be run - allow a file or test to be executed in the container, and show feedback to the user #### Live preview before committing todo ### Proposal - launch a CI pipeline in the web ide context that will run jobs marked `only: webide` in the `.gitlab-ci.yml` file - job will run `script` and `before-script` to setup the container with required dependencies - web ide will attach the runner to prevent it from terminating immediately, allowing it to be used for 30mins or so - add API to CI runner to allow files in the container to be added, updated and deleted so that changes can be copied into the container ### Ideas TBD
epic