-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add multiple env support #232
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
base: main
Are you sure you want to change the base?
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| description="Helm repository name for the environment" | ||
|
|
||
| kubernetes: AgentKubernetesConfig | None = Field(default=None, description="Kubernetes deployment configuration") | ||
| environment: str | None = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the only change in the file
| return self.environments[env_name] | ||
|
|
||
|
|
||
| def get_configs_for_env(self, env: str) -> List[AgentEnvironmentConfig]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new method added
| ) | ||
|
|
||
|
|
||
| class TestAgentEnvironmentsConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a tests file for this new functionality
5927953 to
f2e47c5
Compare
| from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse | ||
| from .task_retrieve_by_name_params import TaskRetrieveByNameParams as TaskRetrieveByNameParams | ||
| from .message_list_paginated_params import MessageListPaginatedParams as MessageListPaginatedParams | ||
| from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing linter error
e2aa69e to
5259f20
Compare
|
|
||
| return TrackerResource(self) | ||
|
|
||
| @cached_property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a valid linter error that was being ignored but that we should support in the SDK
2f8c94b to
7881ec2
Compare
c55c9e4 to
0c3a8c2
Compare
| return self.environments[env_name] | ||
|
|
||
|
|
||
| def get_configs_for_env(self, env_target: str) -> dict[str, AgentEnvironmentConfig]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New Addition
| ) | ||
|
|
||
|
|
||
| # if environment mappings are set, you cannot have a top-level env_name that maps to an `environment: value` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this is worth removing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a reasonable sanity check to keep especially as we migrate to this new format
| missing_envs: List[str] = [] | ||
| environment_mappings = [env.environment for env in environments_config.environments.values() if env.environment] | ||
| top_level_envs = [env for env in environments_config.environments] | ||
| all_envs = set(environment_mappings + top_level_envs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be a breaking change because we are still adding the same [env for env in environments_config.environments] in the check but we have just moved it above.
| @@ -1,6 +0,0 @@ | |||
| name: Test AgentEx Tutorials | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a drive-by removal: Removing this because its not used and just errors on every workflow
This PR introduces a new naming convention to support multiple environment deployments:
Why we need this distinction:
env-namethat is the same as the deployment target (i.e. anenv-nameofdevand a deployment targetdev) it will automatically deploy to that environment.This supports the desired config change of having different environments that map to a single "environment":
Backwards compatability:
Tests against internal scale agents:
N.B. There was a large diff generated by linter for some reason