171 Commits

Author SHA1 Message Date
Robert Brennan
3a1c547c8c [WIP] Fix docker push issues (#3585)
* empty commit

* fix workflows for forks

* fix runtime tests

* fix repo name

* fix artifacts

* add download step
2024-08-26 19:36:28 +00:00
mamoodi
8f6410603c Change PR template to enforce a simple description for CHANGELOG (#3602) 2024-08-26 18:30:58 +00:00
Graham Neubig
f9088766e8 Allow setting of runtime container image (#3573)
* Add runtime container image setting

* Fix typo in test

* Fix sandbox base container image

* Update variables

* Update to base_container_image

* Update tests/unit/test_config.py

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>

* Fixed eval

* Fixed container_image

* Fix typo

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-25 23:05:41 +00:00
Robert Brennan
b63dec4b2e Add back docker caching, simplify docker builds (#3546)
* fix multiarch

* remove extra push

* add back tag file

* fix cache tag

* add login step

* fix login

* try to fix save

* fix output maybe

* rm outputs

* remove tars

* fix refs

* fix runtime dep

* force rebuild

* lowercase image

* add suffix to build tags for runtime

* update matrix

* fix cut

* fix cut again

* add back matrix

* Update containers/build.sh

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-23 17:01:18 +00:00
Robert Brennan
9642f8d4be Revert "Remove concurrency and cleanup workflows" (#3534)
* Revert "Remove concurrency and cleanup workflows (#3524)"

This reverts commit b7b4556433.

* Update .github/workflows/ghcr_app.yml

* Update .github/workflows/ghcr_runtime.yml

* Update .github/workflows/ghcr_runtime.yml

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-22 18:13:09 +00:00
tobitege
81bb918ea0 (test) Move test_runtime to ghcr_test_runtime; adapt workflows (#3513)
* move test_runtime to ghcr_test_runtime; adapt workflows; fix runtime AttributeError

* split test_runtime.py into multiple tests in new tests/runtime folder

* moved common fixtures to tests/runtime/conftest.py
2024-08-22 03:07:20 +08:00
mamoodi
b7b4556433 Remove concurrency and cleanup workflows (#3524) 2024-08-21 13:12:00 -04:00
Xingyao Wang
944d21f34a fix(ci): repo owner for docker pull (#3510) 2024-08-21 06:16:24 +08:00
Xingyao Wang
981c46cb61 fix: last tag list in CI (#3488) 2024-08-20 09:56:33 +08:00
Xingyao Wang
d45b7208f9 fix last_tag of matrix (#3487) 2024-08-20 09:36:40 +08:00
Xingyao Wang
3d9a38d755 fix: CI push image (#3485)
* fix comment

* remove extra ls

* update title

* fix app docker
2024-08-20 09:17:22 +08:00
Xingyao Wang
94590aad35 chore: fix ghcr app push yet again (#3482) 2024-08-20 06:55:55 +08:00
Xingyao Wang
058dd5a025 chore: fix ghcr again (#3479) 2024-08-19 22:17:24 +00:00
Xingyao Wang
8f0f764a85 fix: CI docker image push (#3476)
* fix ghcr app

* fix ghcr runtime push

* rename od_runtime to runtime
2024-08-19 20:53:28 +00:00
Xingyao Wang
356cbe0adf fix: ci docker upload (#3469)
* fix upload workflow

* fix typo in filename

* fix ghcr runtime

* rename ghcr to ghcr runtime

* fix upload app docker again
2024-08-20 01:42:08 +08:00
Robert Brennan
01ae22ef57 Rename OpenDevin to OpenHands (#3472)
* Replace OpenDevin with OpenHands

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* update poetry lock; move opendevin folder to openhands

* fix env var

* revert image references in docs

* revert permissions

* revert permissions

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-20 00:44:54 +08:00
Xingyao Wang
83f36c1d66 test: build and run runtime tests on different custom docker images (#3324)
* try to fix pip unavailable

* update test case for pip

* force rebuild in CI

* remove extra symlink

* fix newline

* added semi-colon to line 31

* Dockerfile.j2: activate env at the end

* Revert "Dockerfile.j2: activate env at the end"

This reverts commit cf2f565102.

* cleanup Dockerfile

* switch default python image

* remove image agnostic (no longer used)

* fix tests

* simplify integration tests default image

* add nodejs specific runtime tests

* update tests and workflows

* switch to nikolaik/python-nodejs:python3.11-nodejs22

* update build sh to output image name correctly

* increase custom images to test

* fix test

* fix test

* fix double quote

* try fixing ci

* update ghcr workflow

* fix artifact name

* try to fix ghcr again

* fix workflow

* save built image to correct dir

* remove extra -docker-image

* make last tag to be human readable image tag

* fix hyphen to underscore

* run test runtime on all tags

* revert app build

* separate ghcr workflow

* update dockerfile for eval

* fix tag for test run

* try fix tag

* try fix tag via matrix output

* try workflow again

* update comments

* try fixing test matrix

* fix artifact name

* try fix tag again

* Revert "try fix tag again"

This reverts commit b369badd8c.

* tweak filename

* try different path

* fix filepath

* try fix tag artifact path again

* save json instead of line

* update matrix

* print all tags in workflow

* fix DOCKER_IMAGE to avoid ghcr.io/opendevin/ghcr.io/opendevin/od_runtime

* fix test matrix to only load unique test image tags

* try fix matrix again!!!!!

* add all runtime tests passed

---------

Co-authored-by: tobitege <tobitege@gmx.de>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
2024-08-19 21:12:00 +08:00
tobitege
49bde1a760 ghcr.yml: bump docker/login-action@v2 to v3 (#3451) 2024-08-19 09:18:16 +08:00
tobitege
0583609531 (fix) jobs need if condition modified to enable run on PR push (#3433)
* fix ghcr_push job: condition needed to check right push context

* apply same rule for other dependent jobs
2024-08-17 23:37:57 +08:00
mamoodi
6e70f79bf4 Remove unnecessary concurrency and more comments (#3422) 2024-08-16 18:19:34 -04:00
mamoodi
340fe0de18 Split Frontend and Python Unit tests (#3399)
* Split Frontend and Python Unit tests

* Extra comment for deploy docs workflow

* Simpler comment

* Add paths and paths-ignore to unit tests

* More specific comment for py unit tests

* Remove paths-ignore because jobs are required

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-08-16 11:39:14 -04:00
mamoodi
5dab07094d fix: Only run one deploy docs workflow at a time. Add comments (#3398) 2024-08-15 03:30:57 +02:00
Graham Neubig
98e6756641 Add dependabot group for eslint (#3374) 2024-08-13 12:37:37 +00:00
tobitege
9ad665a996 fix dependabot.yml groups (#3361) 2024-08-13 17:58:15 +08:00
Graham Neubig
20a35c59f6 Group docusaurus dependabot updates (#3359) 2024-08-13 13:38:41 +08:00
tobitege
76a27e72bd remove test_sandbox references from run-unit-tests.yml (#3326) 2024-08-09 20:13:27 +00:00
Xingyao Wang
bdf6df12c3 fix: pip not available in runtime (#3306)
* try to fix pip unavailable

* update test case for pip

* force rebuild in CI

* remove extra symlink

* fix newline

* added semi-colon to line 31

* Dockerfile.j2: activate env at the end

* Revert "Dockerfile.j2: activate env at the end"

This reverts commit cf2f565102.

* cleanup Dockerfile

* switch default python image

* remove image agnostic (no longer used)

* fix tests

* switch to nikolaik/python-nodejs:python3.11-nodejs22

* fix test

* fix test

* revert docker

* update template

---------

Co-authored-by: tobitege <tobitege@gmx.de>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-08-09 15:04:43 -04:00
tobitege
d2a8ff0918 fix double quotes around env vars typo in ghcr.yml (#3313) 2024-08-09 14:22:10 +00:00
tobitege
5e6fd58f56 try to fix DOCKER_IMAGE_TAG in ghcr_push_runtime (od_runtime, arm64) (#3311) 2024-08-09 12:02:43 +00:00
tobitege
ac7badc236 (fix) revert #3240 ignore_paths in ghcr.yml (#3308) 2024-08-09 11:06:39 +02:00
Xingyao Wang
a5195b0e65 chore: clean up sandbox and ssh related configs (#3301)
* clean up sandbox and ssh related stuff

* remove ssh hostname

* remove ssh hostname

* remove ssh password

* update config

* fix typo that breaks the test
2024-08-08 22:15:40 +00:00
Xingyao Wang
73bd165118 ci: try to fix runtime build when exact hash for runtime image is found (#3272) 2024-08-08 03:46:05 +00:00
Xingyao Wang
90d0a62469 (arch) Switch default runtime to EventStream Runtime (#3271)
* switch default to eventstream runtime

* remove pull docker from makefile

* fix unittest

* fix file store path

* try deprecate server runtime

* remove persist sandbox

* move file utils

* remove server runtime related workflow

* remove unused method

* attempt to remove the reliance on filestore for BE

* fix async for list file

* fix list_files to post

* fix list files

* add suffix to directory

* make sure list file returns abs path;
make sure other backend endpoints accpets abs path

* remove server runtime test workflow

* set git config in runtime
2024-08-08 10:11:49 +08:00
mamoodi
2915679adc Make all workflows consistent formatting and some more comments (#3270) 2024-08-07 02:00:15 +00:00
tobitege
0e1a4e1a6c (backend) Added workflow clean-up.yml to remove old workflows and artifacts (#3244)
* added workflow clean-up.yml to remove old workflows and artifacts

* dispatch-only run for now

* add retention-days of 14 to upload-artifact in ghcr.yml
2024-08-05 09:25:18 +02:00
mamoodi
6533b8a00e Remove pyproject workflow and cleanup stale workflow (#3238) 2024-08-05 00:38:37 +08:00
tobitege
c2c363b0ec (workflow) ghcr.yml with paths/paths-ignore conditions for pull_request (#3240)
* ghcr.yml with paths/paths-ignore conditions for pull_request

* include evaluation folder

* removed paths, just paths-ignore now

* deploy-docs only for docs

* exclude evaluation folder

Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>

---------

Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
2024-08-04 16:37:07 +02:00
Xingyao Wang
4f0a454ed6 [Arch] Support integration tests using EventStream Runtime (#3184)
* Remove global config from memory

* Remove runtime global config

* Remove from storage

* Remove global config

* Fix event stream tests

* Fix sandbox issue

* Change config

* Removed transferred tests

* Add swe env box

* Fixes on testing

* Fixed some tests

* Merge with stashed changes

* Fix typing

* Fix ipython test

* Revive function

* Make temp_dir fixture

* Remove test to avoid circular import

* fix eventstream filestore for test_runtime

* fix parse arg issue that cause integration test to fail

* support swebench pull from custom namespace

* add back simple tests for runtime

* move multi-line bash tests to test_runtime;
support multi-line bash for esruntime;

* add testcase to handle PS2 prompt

* use bashlex for bash parsing to handle multi-line commands;
add testcases for multi-line commands

* revert ghcr runtime change

* Apply stash

* fix run as other user;
make test async;

* fix test runtime for run as od

* add run-as-devin to all the runtime tests

* handle the case when username is root

* move all run-as-devin tests from sandbox;
only tests a few cases on different user to save time;

* move over multi-line echo related tests to test_runtime

* fix user-specific jupyter by fixing the pypoetry virtualenv folder

* make plugin's init async;
chdir at initialization of jupyter plugin;
move ipy simple testcase to test runtime;

* support agentskills import in
move tests for jupyter pwd tests;
overload `add_env_vars` for EventStreamRuntime to update env var also in Jupyter;
make agentskills read env var lazily, in case env var is updated;

* fix ServerRuntime agentskills issue

* move agnostic image test to test_runtime

* merge runtime tests in CI

* fix enable auto lint as env var

* update warning message

* update warning message

* test for different container images

* change parsing output as debug

* add exception handling for update_pwd_decorator

* fix unit test indentation

* add plugins as default input to Runtime class;
remove init_sandbox_plugins;
implement add_env_var (include jupyter) in the base class;

* fix server runtime auto lint

* Revert "add exception handling for update_pwd_decorator"

This reverts commit 2b668b1506.

* tries to print debugging info for agentskills

* explictly setting uid (try fix permission issue)

* Revert "tries to print debugging info for agentskills"

This reverts commit 8be4c86756.

* set sandbox user id during testing to hopefully fix the permission issue

* add browser tools for server runtime

* try to debug for old pwd

* update debug cmd

* only test agnostic runtime when TEST_RUNTIME is Server

* fix temp dir mkdir

* load TEST_RUNTIME at the beginning

* remove ipython tests

* only log to file when DEBUG

* default logging to project root

* temporarily remove log to file

* fix LLM logger dir

* fix logger

* make set pwd an optional aux action

* fix prev pwd

* fix infinity recursion

* simplify

* do not import the whole od library to avoid logger folder by jupyter

* fix browsing

* increase timeout

* attempt to fix agentskills yet again

* clean up in testcases, since CI maybe run as non-root

* add _cause attribute for event.id

* remove parent

* add a bunch of debugging statement again for CI :(

* fix temp_dir fixture

* change all temp dir to follow pytest's tmp_path_factory

* remove extra bracket

* clean up error printing a bit

* jupyter chdir to self.config.workspace_mount_path_in_sandbox on initialization

* jupyter chdir to self.config.workspace_mount_path_in_sandbox on initialization

* add typing for tmp dir fixture

* clear the directory before running the test to avoid weird CI temp dir

* remove agnostic test case for server runtime

* Revert "remove agnostic test case for server runtime"

This reverts commit 30e2181c3f.

* disable agnostic tests in CI

* fix test

* make sure plugin arg is not passed when no plugin is specified;
remove redundant on_event function;

* move mock prompt

* rename runtime

* remove extra logging

* refactor run_controller's interface;
support multiple runtime for integration test;
filter out hostname for prompt

* uncomment other tests

* pass the right runtime to controller

* log runtime when start

* uncomment tests

* improve symbol filters

* add intergration test prompts that seemd ok

* add integration test workflow

* add python3 to default ubuntu image

* symlink python and fix permission to jupyter pip

* add retry for jupyter execute server

* fix jupyter pip install;
add post-process for jupyter pip install;
simplify init by add agent_skills path to PYTHONPATH;
add testcase to tests jupyter pip install;

* fix bug

* use ubuntu:22.04 for eventstream integration tests

* add todo

* update testcase

* remove redundant code

* fix unit test

* reduce dependency for runtime

* try making llama-index an optional dependency that's not installed by default

* remove pip install since it seemd not needed

* log ipython execution;
await write message since it returns a future

* update ipy testcase

* do not install llama-index in CI

* do not install llama-index in the app docker as well

* set sandbox container image in the integration test script

* log plugins & env var for runtime

* update conftest for sha256

* add git

* remove all non-alphanumeric chalracters

* add working ipy module tests!

* default to use host network

* remove is_async from browser to make thing a little more reliable;
retry loading browser when error;

* add sleep to wait a bit for http server

* kill http server before regenerate browsing tests

* fix browsing

* only set sandbox container image if undefined

* skip empty config value

* update evaluation to use the latest run_controller

* revert logger in execute_server to be compatible with server runtime

* revert logging level to fix jupyter

* set logger level

* revert the logging

* chmod for workspace to fix permission

* support getting timeout from action

* update test for server runtime

* try to fix file permission

* fix test_cmd_run_action_serialization_deserialization test (added timeout)

* poetry: pip 24.2, torch 2.2.2

* revert adding pip to pyproject.toml

* add build to dependencies in pyproject.toml

* forgot poetry lock --no-update

* fix a DelegatorAgent prompt_002.log (timeout)

* fix a DelegatorAgent prompt_003.log (timeout)

* couple more timeout attribs in prompt files

* some more prompt files

* prompts galore

* add clarification comment for timeout

* default timeout to config

* add assert

* update integraton tests for eventstream

* update integration tests

* fix timeout for action<->dict

* remove redundant on_event

* fix action execution timeout

* updatelock

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: tobitege <tobitege@gmx.de>
2024-08-01 22:07:39 +00:00
Xingyao Wang
1d49ef253b [Runtime] Reduce dependency to speed up CI and reduce image size (#3195)
* reduce dependency for runtime

* try making llama-index an optional dependency that's not installed by default

* do not install llama-index in CI

* do not install llama-index in the app docker as well
2024-07-31 13:55:09 -04:00
Xingyao Wang
bd68249fba [Arch] Test EventStreamRuntime to ensure its feature parity with ServerRuntime (#3157)
* Remove global config from memory

* Remove runtime global config

* Remove from storage

* Remove global config

* Fix event stream tests

* Fix sandbox issue

* Change config

* Removed transferred tests

* Add swe env box

* Fixes on testing

* Fixed some tests

* Merge with stashed changes

* Fix typing

* Fix ipython test

* Revive function

* Make temp_dir fixture

* Remove test to avoid circular import

* fix eventstream filestore for test_runtime

* fix parse arg issue that cause integration test to fail

* support swebench pull from custom namespace

* add back simple tests for runtime

* move multi-line bash tests to test_runtime;
support multi-line bash for esruntime;

* add testcase to handle PS2 prompt

* use bashlex for bash parsing to handle multi-line commands;
add testcases for multi-line commands

* revert ghcr runtime change

* Apply stash

* fix run as other user;
make test async;

* fix test runtime for run as od

* add run-as-devin to all the runtime tests

* handle the case when username is root

* move all run-as-devin tests from sandbox;
only tests a few cases on different user to save time;

* move over multi-line echo related tests to test_runtime

* fix user-specific jupyter by fixing the pypoetry virtualenv folder

* make plugin's init async;
chdir at initialization of jupyter plugin;
move ipy simple testcase to test runtime;

* support agentskills import in
move tests for jupyter pwd tests;
overload `add_env_vars` for EventStreamRuntime to update env var also in Jupyter;
make agentskills read env var lazily, in case env var is updated;

* fix ServerRuntime agentskills issue

* move agnostic image test to test_runtime

* merge runtime tests in CI

* fix enable auto lint as env var

* update warning message

* update warning message

* test for different container images

* change parsing output as debug

* add exception handling for update_pwd_decorator

* fix unit test indentation

* add plugins as default input to Runtime class;
remove init_sandbox_plugins;
implement add_env_var (include jupyter) in the base class;

* fix server runtime auto lint

* Revert "add exception handling for update_pwd_decorator"

This reverts commit 2b668b1506.

* tries to print debugging info for agentskills

* explictly setting uid (try fix permission issue)

* Revert "tries to print debugging info for agentskills"

This reverts commit 8be4c86756.

* set sandbox user id during testing to hopefully fix the permission issue

* add browser tools for server runtime

* try to debug for old pwd

* update debug cmd

* only test agnostic runtime when TEST_RUNTIME is Server

* fix temp dir mkdir

* load TEST_RUNTIME at the beginning

* remove ipython tests

* only log to file when DEBUG

* default logging to project root

* temporarily remove log to file

* fix LLM logger dir

* fix logger

* make set pwd an optional aux action

* fix prev pwd

* fix infinity recursion

* simplify

* do not import the whole od library to avoid logger folder by jupyter

* fix browsing

* increase timeout

* attempt to fix agentskills yet again

* clean up in testcases, since CI maybe run as non-root

* add _cause attribute for event.id

* remove parent

* add a bunch of debugging statement again for CI :(

* fix temp_dir fixture

* change all temp dir to follow pytest's tmp_path_factory

* remove extra bracket

* clean up error printing a bit

* jupyter chdir to self.config.workspace_mount_path_in_sandbox on initialization

* jupyter chdir to self.config.workspace_mount_path_in_sandbox on initialization

* add typing for tmp dir fixture

* clear the directory before running the test to avoid weird CI temp dir

* remove agnostic test case for server runtime

* Revert "remove agnostic test case for server runtime"

This reverts commit 30e2181c3f.

* disable agnostic tests in CI

* fix test

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-07-31 04:30:59 +08:00
மனோஜ்குமார் பழனிச்சாமி
84a6e90dc2 Chore: Add line breaks in pull_request_template.md (#2988)
* Update pull_request_template.md

* Update pull_request_template.md
2024-07-29 15:10:33 -04:00
Xingyao Wang
1f6e86c932 Fix(test,CI): runtime build tests (#3126)
* fix runtime build test

* get runtime_build test to run in CI

* move test involving docker from `test_ipython` to `test_sandbox`
2024-07-26 22:53:01 +08:00
Xingyao Wang
99f6f8899d fix filename for image tar (#3121) 2024-07-26 02:38:41 +00:00
Xingyao Wang
f28a6db2c6 add missing ext (#3120) 2024-07-26 06:32:14 +08:00
tobitege
22c7bca556 (fix) colima: fix return code handling (followup to #3097) (#3106)
* colima: fix return code handling; added delay before retry; 4 retries

* moved docker context outside of function

* changed delete occurence; added logs output

* removed delete; trying to add more logging

* fix typo

* changed logging to github-style. maybe this finally shows up.

* reverted context; loop now with install+delete and alternating IP

* fix local keyword

* try limactl for creating an instance for IP

* revert IP change attempts

* actually return 0 in start_colima

* moved install out of loop again

* another to avoid duplicate start of colima via limactl

* added --init call for lima.yaml file creation

* dont trust an LLM to give you flags...

* Update run-unit-tests.yml
2024-07-26 03:16:02 +08:00
tobitege
b71dc38855 ghcr-runtime: no unzip, artifact downloads as-is, without extention (#3105) 2024-07-25 14:20:20 +02:00
tobitege
9576916a49 (fix) Runtime yml missing zip handling (fixes #3101) (#3104)
* fix ghcr_push use of image name

* ghcr-runtime: fix artifact download (zip); removed obsolete show of df
2024-07-25 08:53:27 +00:00
tobitege
690290697a fix ghcr_push use of image name (#3101) 2024-07-25 10:53:20 +08:00
tobitege
4862661732 (fix) colima: use a docker context specific to runner; prevent duplicate start (#3097)
* colima: use a docker context specific to runner; prevent duplicate start

* updated use of context (for docker, not colima)

* added --ssh to colima start to use TCP instead of socket

* replace --ssh with random port
2024-07-24 13:59:59 -04:00
Xingyao Wang
405c8a0456 [Arch] Add runtime image build CI & clean up runtime build using jinja2 template (#3055)
* test_runtime_client.py to test _execute_bash()

* runtime_build and runtime tweaks

* fix in docker script

* revert bash changes

* use sandbox_config.update_source_code to control source code update

* add od_version to the sandbox tag

* add doc instruction for update source code

* do not remove whole poetry folder;
add mamba clean

* add missing newlines

* cleanup runtime dockerfile into jinja template

* make prep temp file a separate function;
make that function accessible through cli

* modify `runtime_build.py` so it can generate directory for building docker img

* add dockerfile and sdist of runtime to gitignore since it will be dynamically generated

* add runtime to build

* do not rebuild new image when an `od_runtime` is provided

* use default container_image for testing if possible

* move runtime tests to ghcr runtime workflow

* update docker base dir for runtime

* fix unittest

* fix image name

* fix image name for test case

* rename to make it consistent

---------

Co-authored-by: tobitege <tobitege@gmx.de>
2024-07-24 21:56:12 +08:00