Azure / Azure/azure-libraries-for-java

[BUG] Container Instance cannot update due to secure value env

Đang mở
#856 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Container Instances Service Attention
Ngôn ngữ chính
Java
Star
97
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**
This is the service problem. When updating the container instance, if there is secure value in any container environment, it could only be updated successfully for setting a new secure value or deleting the secure environment.

***Code Snippet***
example:
* create a container
```json
{
"name": "nginx",
"properties": {
"image": "nginx",
"ports": [
{
"protocol": "TCP",
"port": 80
}
],
"environmentVariables": [
{
"name": "env",
"secureValue": "val"
}
],
"resources": {
"requests": {
"memoryInGB": 1.5,
"cpu": 1.0
}
}
}
}
```
* return json
```json
{
"name": "nginx",
"properties": {
"image": "nginx",
"ports": [
{
"protocol": "TCP",
"port": 80
}
],
"environmentVariables": [
{
"name": "env"
}
],
"resources": {
"requests": {
"memoryInGB": 1.5,
"cpu": 1.0
}
}
}
}
```
* for updating:
* If I use original return json, it would throw the cloud exception about:
```
The environment variable 'env' in container 'nginx' of container group 'cgtest' is invalid. One and only one property of 'value' and 'secureValue' can be specified in an environment variable.
```
* If I delete the 'environmentVariables' parameter, it would return with empty environment for nginx, but actually I need the environment.
* Only if I set the secureValue with same value (or a new value), I can update other parameters.

**Expected behavior**
I can send with the following 'environmentVariables' to update other parameters for container instance.
```json
"environmentVariables": [
{
"name": "env"
}
]
```

**For Example**
I send the following json and it could update cpu and memory, while the environments stay same as it would be.
```json
{
"name": "nginx",
"properties": {
"image": "nginx",
"ports": [
{
"protocol": "TCP",
"port": 80
}
],
"environmentVariables": [
{
"name": "env"
}
],
"resources": {
"requests": {
"memoryInGB": 2.0,
"cpu": 2.0
}
}
}
}
```

**Information Checklist**
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x] Bug Description Added
- [x] Repro Steps Added
- [x] Setup information Added

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện việc cập nhật container với JSON trong issue, bao gồm một biến môi trường bảo mật và CPU hoặc bộ nhớ đã thay đổi. Theo dõi đường dẫn cập nhật của phiên bản container Java và cách xử lý các biến môi trường; được xem là hoàn tất khi secureValue bị bỏ qua vẫn giữ nguyên môi trường hiện có trong khi các tham số khác được cập nhật thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, java
Lĩnh vực
cloud
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.