433 Commits

Author SHA1 Message Date
tobitege
1c9b4ad78a fix regression in fork artifact upload in ghcr_runtime (#3807) 2024-09-10 17:36:36 +02:00
tobitege
2b7517e542 (enh) add caching@v4 action in workflows (#3780)
* dummy test change

* regen yml: 1st install python 3.11, then poetry

* fix caching for poetry; old entry for python was rather useless

* fix steps order (cache before poetry)

* add poetry caching to ghcr_runtime; fix fork conditions

* ghcr_runtime: more caching actions; condition fixes

* fix interim action error (order of steps)

* cache@v4 instead of v3

* fixed interim typo for 2 fork conditions

* runtime/test_env_vars: compacted multiple tests into one to reduce time

* ugh if fork condition changes again
2024-09-09 10:49:49 +02:00
Robert Brennan
ab3851593d Support interactive commands (#3653)
* hacky solution for interactive commands

* add more behavior

* debug

* fix continue functionality

* remove prints

* refactor a bit

* reduce test sleep

* fix python version

* fix pre-commit issue

* Regenerate integration tests

* Update openhands/runtime/client/client.py

* revert some prompt stuff

* several integration mock files regenerated

* execute_action: remove duplicate exception logging

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
2024-09-08 21:45:51 +02:00
tobitege
bc31fb15fe (fix) CodeActAgent: fix issues with vision support in prompts (#3665)
* CodeActAgent: fix message prep if prompt caching is not supported

* fix python version in regen tests workflow

* fix in conftest "mock_completion" method

* add disable_vision to LLMConfig; revert change in message parsing in llm.py

* format messages in several files for completion

* refactored message(s) formatting (llm.py); added vision_is_active()

* fix a unit test

* regenerate: added LOG_TO_FILE and FORCE_REGENERATE env flags

* try to fix path to logs folder in workflow

* llm: prevent index error

* try FORCE_USE_LLM in regenerate

* tweaks everywhere...

* fix 2 random unit test errors :(

* added FORCE_REGENERATE_TESTS=true to regenerate CLI

* fix test_lint_file_fail_typescript again

* double-quotes for env vars in workflow; llm logger set to debug

* fix typo in regenerate

* regenerate iterations now 20; applied iteration counter fix by Li

* regenerate: pass FORCE_REGENERATE flag into env

* fixes for int tests. several mock files updated.

* browsing_agent: fix response_parser.py adding ) to empty response

* test_browse_internet: fix skipif and revert obsolete mock files

* regenerate: fi bracketing for http server start/kill conditions

* disable test_browse_internet for CodeAct*Agents; mock files updated after merge

* missed to include more mock files earlier

* reverts after review feedback from Li

* forgot one

* browsing agent test, partial fixes and updated mock files

* test_browse_internet works in my WSL now!

* adapt unit test test_prompt_caching.py

* add DEBUG to regenerate workflow command

* convert regenerate workflow params to inputs

* more integration test mock files updated

* more files

* test_prompt_caching: restored test_prompt_caching_headers purpose

* file_ops: fix potential exception, like "cross device copy"; fixed mock files accordingly

* reverts/changes wrt feedback from xingyao

* updated docs and config template

* code cleanup wrt review feedback
2024-09-04 17:58:30 +02:00
mamoodi
1b66f2e777 Revert "Create a reusable workflow for building, testing and publishing runti…" (#3725)
This reverts commit d1a741792f.
2024-09-04 11:47:01 -04:00
mamoodi
d1a741792f Create a reusable workflow for building, testing and publishing runtime images and use it (#3717)
* Test resuable workflow

* fix path for reusable workflow

* Fix workflow typo

* fix reusable workflow

* input typo

* Add secrets to reusable workflow

* Make token required

* Fix secret indentation

* Fix image with tag
2024-09-04 08:58:59 -04:00
Graham Neubig
99139e9c72 Release to pypi (#3667)
* Release to pypi

* Change to match our actual versioning
2024-08-30 15:08:25 +00:00
Robert Brennan
b0e52f121c fix build for fork (#3660) 2024-08-29 21:49:38 +00:00
Robert Brennan
ece8fef739 implement GitHub action for integration regeneration (#3659)
* modify readme

* Regenerate integration tests

* actually run the integration tests

* fix python version

* add diff check

* remove colima

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 21:46:41 +00:00
Robert Brennan
09cfcfbee9 add (placeholder) workflow for regenerating the integration tests (#3657)
* add workflow

* add todo
2024-08-29 20:12:11 +00:00
tobitege
8fca5a5354 linter and test_aider_linter extensions for eslint (#3543)
* linter and test_aider_linter extensions for eslint

* linter tweaks

* try enabling verbose output in linter test

* one more option for linter test

* try conftest.py for tests/unit folder

* enable verbose mode in workflow; remove conftest.py again

* debug print statements of linter results

* skip some tests if eslint is not installed at all

* more tweaks

* final test skip setups

* code quality revisions

* fix test again

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-08-29 10:40:43 +02:00
mamoodi
813b5a2c62 Added stale exemption for tracked issues (#3638) 2024-08-28 20:27:50 -04:00
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