Creation of a new target succeeds despite empty name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start at the POST /rest/v1/targets endpoint and trace how target creation handles the name field. Reproduce the request from the issue's shell example; done means an empty name is rejected instead of creating a target named after its controller ID.
索引モデルが issue の本文から書いたものです。
説明
I'm working on a library providing Go bindings for Eclipse Hawkbit. As a part of the process I created integration tests that interrogate a real Hawkbit installation to see how it behaves.
According to the documentation at https://www.eclipse.org/hawkbit/rest-api/targets-api-guide/#_create_list_of_targets the name fields is mandatory when creating a target. Providing an empty value unexpectedly succeeds, with the name being set to the controller ID.
See the sample shell test program I created.
# We should not be able to create a target with an empty name
# https://www.eclipse.org/hawkbit/rest-api/targets-api-guide/#_create_list_of_targets
curl \
--verbose \
--dump-header resp.head \
--output resp.body \
-H "$TEST_HAWKBIT_AUTH" \
-H 'Accept: application/hal+json' \
-H 'Content-Type: application/json;charset=UTF-8' \
"${TEST_HAWKBIT_URL}/rest/v1/targets" \
-d '[{"controllerId": "1001", "name": "", "description": "First test device", "securityToken": "9999", "address": "https://localhost:8001"}]'
# The request unexpected succeeds.
fromdos resp.head
GREP -qFx 'HTTP/1.1 201 Created' < resp.head
# The returned data is sane.
jq '.[0].controllerId' -r < resp.body | GREP -qFx 1001
# The name seems to default to the value of the controllerId.
jq '.[0].name' -r < resp.body | GREP -qFx "1001"
jq '.[0].description' -r < resp.body | GREP -qFx "First test device"
jq '.[0].createdBy' -r < resp.body | GREP -qFx admin
jq '.[0].lastModifiedBy' -r < resp.body | GREP -qFx admin
jq '.[0].updateStatus' -r < resp.body | GREP -qFx unknown
jq '.[0]._links.self.href' -r < resp.body | GREP -qFx "${TEST_HAWKBIT_URL}/rest/v1/targets/1001"
- 主要言語
- Java
- スター
- 601
- フォーク
- 228
- 平均マージ
- 18時間 20分
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-hawkbit/hawkbit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
eclipse-hawkbit/hawkbit#3429 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
eclipse-hawkbit/hawkbit#3266 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Configurable automatic retries for failed actions (policy, backoff, rollout and auto-assignment support)再び着手できるかも @strailov が 76 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature request
eclipse-hawkbit/hawkbit#3251 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
IN_SYNC and rollout success can be recorded while the device still runs the old image再び着手できるかも @denislavprinov が 108 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
eclipse-hawkbit/hawkbit#3185 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
doumentation: openapi.json is not updated after recent Hawkbit releases再び着手できるかも @denislavprinov が 73 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
eclipse-hawkbit/hawkbit#3035 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
eclipse-hawkbit/hawkbit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Vakore/ZappierGames#184 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
lugassawan/swe-workbench#823 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cassiancc/Raspberry-Core#69 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
checkstyle/checkstyle#22145 ·
メンテナーはふだん 1 日以内に返信