Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored sandbox config #2455

Merged
merged 44 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1bf5f07
Refactored sandbox config and added fastboot
SmartManoj Jun 15, 2024
2f67131
added tests
SmartManoj Jun 16, 2024
7079b64
fixed tests
SmartManoj Jun 16, 2024
90702e4
fixed tests
SmartManoj Jun 16, 2024
a35a6e5
intimate user about breaking change
SmartManoj Jun 21, 2024
de57c58
remove default config from eval
SmartManoj Jun 25, 2024
55729c4
check for lowercase env
SmartManoj Jun 25, 2024
ae02fcd
Merge branch 'main' into fastboot
SmartManoj Jun 25, 2024
75e2677
add test
SmartManoj Jun 25, 2024
09bfcef
Revert Migration
SmartManoj Jun 25, 2024
139b1a3
Merge branch 'fastboot' of https://github.com/SmartManoj/Kevin into f…
SmartManoj Jun 25, 2024
a4d18ad
migrate old sandbox configs
SmartManoj Jun 25, 2024
1f340a8
resolve merge conflict
SmartManoj Jun 25, 2024
8b84541
revert migration 2
SmartManoj Jun 25, 2024
522d6e4
Merge branch 'main' into fastboot
SmartManoj Jun 28, 2024
4d9cad2
Revert "remove default config from eval"
SmartManoj Jun 29, 2024
9335342
Merge branch 'main' into fastboot
SmartManoj Jun 29, 2024
d00a426
change type to box_type
SmartManoj Jul 1, 2024
964304b
Merge branch 'main' into fastboot
SmartManoj Jul 1, 2024
000b80f
fix var name
SmartManoj Jul 1, 2024
ea991e8
linted
SmartManoj Jul 1, 2024
bfa6046
Merge branch 'main' into fastboot
SmartManoj Jul 1, 2024
9d172ed
lint
SmartManoj Jul 1, 2024
5dfb93c
Merge branch 'fastboot' of https://github.com/SmartManoj/Kevin into f…
SmartManoj Jul 1, 2024
c605641
lint comments
SmartManoj Jul 1, 2024
6b3e5d3
Merge branch 'main' into fastboot
SmartManoj Jul 1, 2024
f7e8f24
fix tests
SmartManoj Jul 1, 2024
461d655
fix tests
SmartManoj Jul 2, 2024
dab8f00
Merge branch 'main' into fastboot
SmartManoj Jul 2, 2024
6b9dd3a
fix typo
SmartManoj Jul 3, 2024
fd95205
Merge branch 'main' into fastboot
SmartManoj Jul 3, 2024
d67518c
Merge branch 'main' of github.com:OpenDevin/OpenDevin into fastboot
enyst Jul 4, 2024
61fd15f
fix box_type, remove fast_boot
enyst Jul 4, 2024
0f2e7ab
Merge branch 'main' of github.com:OpenDevin/OpenDevin into fastboot
enyst Jul 4, 2024
f039c7c
add tests for sandbox config
enyst Jul 4, 2024
a645759
fix test
enyst Jul 4, 2024
0a9fb94
update eval docs
enyst Jul 4, 2024
2c1b402
small removal comments
enyst Jul 4, 2024
a35e5b7
adapt toml template
enyst Jul 4, 2024
243f451
old fields shouldn't be in the app dataclass
enyst Jul 5, 2024
2a45d60
Merge branch 'main' of github.com:OpenDevin/OpenDevin into fastboot
enyst Jul 5, 2024
8ec0223
fix old keys in app config
enyst Jul 5, 2024
4c68841
clean up exec box
enyst Jul 5, 2024
84c2d27
Merge branch 'main' of github.com:OpenDevin/OpenDevin into fastboot
enyst Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions opendevin/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,22 +348,9 @@ def set_attr_from_env(sub_config: Any, prefix=''):
nested_sub_config = getattr(sub_config, field_name)

# the agent field: the env var for agent.name is just 'AGENT'
if field_name == 'agent' and env_var_name in env_or_toml_dict:
if field_name == 'agent' and 'AGENT' in env_or_toml_dict:
setattr(nested_sub_config, 'name', env_or_toml_dict[env_var_name])

# As suggested, commented for a separate PR
# old_configs = ['INITIALIZE_PLUGINS']
# if field_name == 'sandbox':
# for old_config in old_configs:
# if (
# old_config.lower() in nested_sub_config.__annotations__
# and (old_config in env_or_toml_dict or old_config.lower() in env_or_toml_dict)
# ):
# suggested_name = f'{field_name}_{old_config}'.upper()
# logger.error(
# f'Please migrate {old_config} config to {suggested_name} = {env_or_toml_dict[old_config]}'
# )
# exit(1)
set_attr_from_env(nested_sub_config, prefix=field_name + '_')
elif env_var_name in env_or_toml_dict:
# convert the env var to the correct type and set it
Expand Down