Azure / Azure/azure-libraries-for-java

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

オープン
#856 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
Container Instances Service Attention
主要言語
Java
スター
97
フォーク
102
PR マージ指標
30日以内にマージされた PR はありません

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、issue の JSON を使ってコンテナ更新を再現します。安全な環境変数と、変更した CPU またはメモリを含めてください。Java コンテナインスタンスの更新パスと環境変数の処理を追跡します。secureValue を省略した場合に既存の環境が保持され、その他のパラメータが正常に更新されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, java
領域
cloud
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。