influxdata / influxdata/influxdb

/telegrafs POST with config property not in TOML format can lead to HTTP 500

Open
#23,904 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. create a telegraf request body that contains only the properties name, description, orgID and config (Note that according to the OpenApi definitions this is a valid combination)
  2. POST the request to the /telegrafs endpoint

Expected behavior:
Either this is an invalid combination with missing required fields or illegal fields, in which case an HTTP 400 would be returned with a relevant error message, or this is a valid combination, in which case an HTTP 201 would be returned with a copy of the new object.

Actual behavior:
Returns HTTP 500 internal server error.

Environment info:
Testing against K8S-IDPE remocal.

commit d9ae58d52e827a111fe8dedbc125077742f1c61a (HEAD -> master, origin/master, origin/HEAD)
Author: Madu Mitha Ravi <63928819+MaduMitha-Ravi@users.noreply.github.com>
Date:   Thu Nov 10 22:09:40 2022 -0500

Related Issue
https://github.com/influxdata/openapi/issues/611

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported POST to the /telegrafs endpoint with only name, description, orgID, and config, then compare the behavior with the OpenAPI definitions and related issue 611. Done means the request is rejected with a relevant HTTP 400 when invalid, or succeeds with HTTP 201 and the new object when valid, rather than returning HTTP 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, rust
Domain
api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.