Creation of a new target succeeds despite empty name
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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"
- Vorherrschende Sprache
- Java
- Sterne
- 601
- Forks
- 228
- Ø Merge
- 15 Std. 58 Min.
- Gemergte PRs (30 T.)
- 62
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus eclipse-hawkbit/hawkbit
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
eclipse-hawkbit/hawkbit#3429 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
eclipse-hawkbit/hawkbit#3436 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
eclipse-hawkbit/hawkbit#3266 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Configurable automatic retries for failed actions (policy, backoff, rollout and auto-assignment support)Evtl. wieder frei @strailov hat das vor 78 Tagen übernommen, und es ist kein Pull Request offen. Offenfeature request
eclipse-hawkbit/hawkbit#3251 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
IN_SYNC and rollout success can be recorded while the device still runs the old imageEvtl. wieder frei @denislavprinov hat das vor 110 Tagen übernommen, und es ist kein Pull Request offen. Offen
eclipse-hawkbit/hawkbit#3185 · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in eclipse-hawkbit/hawkbit
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixEvtl. vergeben @ItsDeadlyProgrammer hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
appsmithorg/appsmith#42471 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
code-maintenance
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
carlos-emr/carlos#5258 ·
Maintainer antworten meist innerhalb von 1 Tag