Skip to content

Commit

Permalink
#133 Fixed an error in the test_sagemaker_extension_wrapper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Oct 24, 2024
1 parent 2ed1de2 commit 5dd7d30
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

## Changes

### Bug fixing

* #143: itde_manager.bring_itde_up() fails if the container is not connected to the network
it is assumed to be connected to.
2 changes: 1 addition & 1 deletion exasol/nb_connector/itde_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _remove_current_container_from_db_network(conf: Secrets):
if not container:
return
network = _get_docker_network(docker_client, network_name)
if network:
if network and _is_container_connected_to_network(container, network):
network.disconnect(container.id)


Expand Down
6 changes: 6 additions & 0 deletions test/integration/test_itde_manager_in_docker_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ def run_test():
secrets.save(AILabConfig.disk_size.value, "4")

bring_itde_up(secrets)
# Remember the network name
network_name = secrets.get(AILabConfig.itde_network)
take_itde_down(secrets)
# Restore the network name. This simulates the situation when a new AI-Lab container
# replaces an old one. It is not connected to the network, but the network name is
# nonetheless present in the secret store.
secrets.save(AILabConfig.itde_network, network_name)
bring_itde_up(secrets)
take_itde_down(secrets)

Expand Down

0 comments on commit 5dd7d30

Please sign in to comment.