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

Fix register_environment #139

Merged
merged 2 commits into from
Oct 20, 2021
Merged

Fix register_environment #139

merged 2 commits into from
Oct 20, 2021

Conversation

mebristo
Copy link
Member

Fix register_environment to return the correct environment object, and to register a new environment with the correct environment version if applicable

@mebristo mebristo requested a review from ant0nsc October 20, 2021 08:57
@mebristo mebristo linked an issue Oct 20, 2021 that may be closed by this pull request
Copy link
Collaborator

@ant0nsc ant0nsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are OK, but I think the test coverage could be improved to really detect the bug we have been hitting.

@@ -453,7 +454,7 @@ def test_create_python_environment(
def test_register_environment(
mock_workspace: mock.MagicMock,
mock_environment: mock.MagicMock,
caplog: CaptureFixture,
caplog: LogCaptureFixture,
) -> None:
env_name = "an environment"
env_version = "an environment"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe env_version should be a differen string than env_name, so that we can detect mixups more easily?

@mebristo mebristo merged commit e6e067e into main Oct 20, 2021
@mebristo mebristo deleted the mebristo/fix_aml_env_version branch October 20, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

register_environment returns wrong environment
2 participants