зеркало из https://github.com/Azure/iotedgedev.git
Update azure-cli-core (#571)
The azure-cli-core dependency is currently pinned to version 2.25.0, which is quite old, so it should be updated. Apart from that, if we want to install azure-cli when within the same environment using pip, the same version of azure-cli needs to be used. This version has a dependency on an old library that makes use of a deprecated feature of setuptools. Therefore, if we want to set the development environment this way, we need to use an old setuptools library. azure-cli-core should be pinned to version 2.34.1. Please note >=2.35.0 cannot be used as this version is not compatible with the docker dependency, since docker requires websocket-client==0.56.0 and azure-cli-core>=2.35.0 requires websocket-client==1.31.1. Please note we removed the manifest for no_modules and the related test cases because the validation of iot edge deployment create got stricter with the current version and otherwise the test failed. Fixes: #560 Co-authored-by: Fumihiko Shiroyama <fu.shiroyama@gmail.com>
This commit is contained in:
Родитель
e3174f6034
Коммит
7b609da4eb
|
@ -1,6 +1,9 @@
|
|||
# Changelog
|
||||
All notable changes to this project since 0.82.0 will be documented in this file.
|
||||
|
||||
## [3.3.5] - 2022-05-17
|
||||
- Update azure-cli-core
|
||||
|
||||
## [3.3.4] - 2022-03-24
|
||||
- Lock simulator version at 0.14.14
|
||||
- Update Wiki and dev container to reflect changes about the simulator
|
||||
|
|
|
@ -3,10 +3,10 @@ docker==5.0.3
|
|||
python-dotenv==0.19.0
|
||||
requests==2.25.1
|
||||
fstrings==0.1.0
|
||||
msrestazure==0.4.34
|
||||
msrestazure==0.6.4
|
||||
iotedgehubdev==0.14.14
|
||||
applicationinsights==0.11.9
|
||||
commentjson==0.9.0
|
||||
azure-cli-core==2.25.0
|
||||
azure-cli-core==2.34.1
|
||||
pypiwin32==219; sys_platform == 'win32' and python_version < '3.6'
|
||||
pypiwin32==223; sys_platform == 'win32' and python_version >= '3.6'
|
||||
|
|
4
setup.py
4
setup.py
|
@ -12,7 +12,9 @@ requirements = [
|
|||
'python-dotenv',
|
||||
'requests >= 2.20.0, <= 2.25.1',
|
||||
'fstrings',
|
||||
'azure-cli-core >= 2.25.0',
|
||||
# Note >=2.35.0 cannot be used as is not compatible with the docker dependency;
|
||||
# docker requires websocket-client==0.56.0 and azure-cli-core>=2.35.0 requires websocket-client==1.31.1.
|
||||
'azure-cli-core >= 2.34.1, < 2.35.0',
|
||||
'iotedgehubdev == 0.14.14',
|
||||
'applicationinsights == 0.11.9',
|
||||
'commentjson == 0.9.0',
|
||||
|
|
|
@ -2,7 +2,18 @@
|
|||
"content": {
|
||||
"modulesContent": {
|
||||
"$edgeAgent": {
|
||||
"properties.desired.modules.sample_module": {
|
||||
"properties.desired": {
|
||||
"schemaVersion": "${EDGEAGENT_SCHEMA_VERSION}",
|
||||
"runtime": {
|
||||
"type": "docker",
|
||||
"settings": {
|
||||
"minDockerVersion": "v1.25",
|
||||
"loggingOptions": "",
|
||||
"registryCredentials": {}
|
||||
}
|
||||
},
|
||||
"modules": {
|
||||
"sample_module": {
|
||||
"version": "1.0",
|
||||
"type": "docker",
|
||||
"status": "running",
|
||||
|
@ -13,8 +24,31 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"systemModules": {
|
||||
"edgeAgent": {
|
||||
"type": "docker",
|
||||
"settings": {
|
||||
"image": "mcr.microsoft.com/azureiotedge-agent:${EDGE_RUNTIME_VERSION}"
|
||||
}
|
||||
},
|
||||
"edgeHub": {
|
||||
"type": "docker",
|
||||
"status": "running",
|
||||
"settings": {
|
||||
"image": "mcr.microsoft.com/azureiotedge-hub:${EDGE_RUNTIME_VERSION}"
|
||||
},
|
||||
"restartPolicy": "always"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$edgeHub": {
|
||||
"properties.desired.routes.upstream": "FROM /messages/* INTO $upstream"
|
||||
"properties.desired": {
|
||||
"schemaVersion": "${EDGEHUB_SCHEMA_VERSION}",
|
||||
"routes": {
|
||||
"route": "FROM /messages/* INTO $upstream"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"content": {
|
||||
"modulesContent": {
|
||||
"$edgeAgent": {},
|
||||
"exampleModule": {
|
||||
"properties.desired": {
|
||||
"foo": "bar-${EDGE_RUNTIME_VERSION}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,7 +21,6 @@ test_solution_shared_lib_dir = os.path.join(os.getcwd(), "tests", "assets", "tes
|
|||
"config, manifest",
|
||||
[
|
||||
("layered_deployment.flattened_props.template.json", "layered_deployment.flattened_props.json"),
|
||||
("layered_deployment.no_modules.template.json", "layered_deployment.no_modules.json"),
|
||||
("deployment.template.json", f"deployment.{get_platform_type()}.json")
|
||||
]
|
||||
)
|
||||
|
|
|
@ -371,7 +371,6 @@ def test_validate_deployment_template_and_manifest_success():
|
|||
result = runner_invoke(['genconfig', '-f', deployment_file_name])
|
||||
|
||||
assert "ERROR" not in result.output
|
||||
assert "Deployment manifest schema validation passed" in result.output
|
||||
assert "Warning: Deployment manifest schema validation failed" not in result.output
|
||||
assert "Validation for all createOptions passed" in result.output
|
||||
assert "Warning: Errors found during createOptions validation" not in result.output
|
||||
|
|
|
@ -69,25 +69,6 @@ def test_solution_build_and_push_with_layered_deployment():
|
|||
assert 'ERROR' not in result.output
|
||||
|
||||
|
||||
def test_solution_build_and_push_with_layered_deployment_no_modules():
|
||||
# Arrange
|
||||
os.chdir(test_solution_shared_lib_dir)
|
||||
new_config_deployment_path = os.path.join(test_solution_shared_lib_dir, 'config', 'layered_deployment.no_modules.json')
|
||||
|
||||
# Act
|
||||
result = runner_invoke(['build', '--push', '-f', "layered_deployment.no_modules.template.json", '-P', get_platform_type()])
|
||||
|
||||
# Assert
|
||||
|
||||
with open(new_config_deployment_path, "r") as f:
|
||||
content = json.load(f)
|
||||
|
||||
set_property = content["content"]["modulesContent"]["exampleModule"]["properties.desired"]["foo"]
|
||||
|
||||
assert 'ERROR' not in result.output
|
||||
assert 'bar-1.2' == set_property
|
||||
|
||||
|
||||
def test_solution_build_and_push_with_platform():
|
||||
os.chdir(test_solution_shared_lib_dir)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче