influxdata / influxdata/influxdb

InfluxDB 2: Cannot find owner of TelegrafConfig

Open
#20,005 1 comment 0 reactions 0 assignees View on GitHub
area/2.x area/api
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

```bash
# Create TelegrafConfig
--> POST http://127.0.0.1:9999/api/v2/telegrafs
--> {
"name": "tc1605171465258-IT",
"description": "test-config",
"config": "[agent]\n interval = \"10s\"\n round_interval = true\n metric_batch_size = 1000\n metric_buffer_limit = 10000\n collection_jitter = \"0s\"\n flush_jitter = \"0s\"\n precision = \"\"\n omit_hostname = false\n\n#my instance\n[[outputs.influxdb_v2]]\n bucket = \"my-bucket\"\n urls = [\"http://127.0.0.1:9999\"]\n organization = \"my-org\"\n token = \"$INFLUX_TOKEN\"\n[[inputs.cpu]]\n totalcpu = true\n collect_cpu_time = false\n report_active = false\n percpu = true\n",
"orgID": "cf6cf88984580114"
}
<-- 201 Created http://127.0.0.1:9999/api/v2/telegrafs

### Find owners
--> GET http://127.0.0.1:9999/api/v2/telegrafs/069aea8c16a7c000/owners
<-- 200 OK http://127.0.0.1:9999/api/v2/telegrafs/069aea8c16a7c000/owners
<-- {"links":{"self":"/api/v2/telegrafs/069aea8c16a7c000/owners"},"users":[]}
```

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.

1. Create TelegrafConfig
2. List owners of TelegrafConfig

__Expected behavior:__
Return list with owner - user who created the TelegrafConfig

__Actual behavior:__
Return empty list.

__Environment info:__

* InfluxDB version: InfluxDB v2 nightly from 2020-11-12

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the POST /api/v2/telegrafs request followed by GET /api/v2/telegrafs/{id}/owners described in the issue. Trace the TelegrafConfig ownership handling and verify that the owners response includes the user who created the configuration.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.