influxdata / influxdata/influxdb

InfluxDB 2: Cannot find logs after update organization

Open
#18,048 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I want to find logs for organization, user and bucket... nothing is found

# Create organization
--> POST http://127.0.0.1:9999/api/v2/orgs
--> {"name":"Constant Pro1589269264922-IT","status":"active"}
<-- 201 Created http://127.0.0.1:9999/api/v2/orgs
<-- {
	"links": {
		"buckets": "/api/v2/buckets?org=Constant Pro1589269430511-IT",
		"dashboards": "/api/v2/dashboards?org=Constant Pro1589269430511-IT",
		"labels": "/api/v2/orgs/05adf51940ecf000/labels",
		"logs": "/api/v2/orgs/05adf51940ecf000/logs",
		"members": "/api/v2/orgs/05adf51940ecf000/members",
		"owners": "/api/v2/orgs/05adf51940ecf000/owners",
		"secrets": "/api/v2/orgs/05adf51940ecf000/secrets",
		"self": "/api/v2/orgs/05adf51940ecf000",
		"tasks": "/api/v2/tasks?org=Constant Pro1589269430511-IT"
	},
	"id": "05adf51940ecf000",
	"name": "Constant Pro1589269430511-IT",
	"description": "",
	"createdAt": "2020-05-12T09:43:50.531295+02:00",
	"updatedAt": "2020-05-12T09:43:50.531295+02:00"
}

### Update organization
--> PATCH http://127.0.0.1:9999/api/v2/orgs/05adf51940ecf000
--> {
	"links": {
		"self": "/api/v2/orgs/05adf51940ecf000",
		"members": "/api/v2/orgs/05adf51940ecf000/members",
		"owners": "/api/v2/orgs/05adf51940ecf000/owners",
		"labels": "/api/v2/orgs/05adf51940ecf000/labels",
		"secrets": "/api/v2/orgs/05adf51940ecf000/secrets",
		"buckets": "/api/v2/buckets?org=Constant Pro1589269430511-IT",
		"tasks": "/api/v2/tasks?org=Constant Pro1589269430511-IT",
		"dashboards": "/api/v2/dashboards?org=Constant Pro1589269430511-IT",
		"logs": "/api/v2/orgs/05adf51940ecf000/logs"
	},
	"id": "05adf51940ecf000",
	"name": "Changed name1589269430594-IT",
	"description": "",
	"createdAt": "2020-05-12T09:43:50.531295+02:00",
	"updatedAt": "2020-05-12T09:43:50.531295+02:00",
	"status": "active"
}
<-- 200 OK http://127.0.0.1:9999/api/v2/orgs/05adf51940ecf000

# Find logs
--> GET http://127.0.0.1:9999/api/v2/orgs/05adf51940ecf000/logs
<-- 200 OK http://127.0.0.1:9999/api/v2/orgs/05adf51940ecf000/logs 
<-- {
	"links": {
		"self": "/api/v2/orgs/05adf51940ecf000/logs"
	},
	"logs": []
}

Steps to reproduce:

  1. Create organization
  2. Update this organization
  3. Find Logs for this organization

Expected behavior:
Return logs with info about created and updated event.

Actual behavior:
Return empty array.

Environment info:

  • InfluxDB version: docker v2.0.0-beta.10, latest nightly build

The same problem is also for users and buckets.

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

Reproduce the organization update and logs requests shown in the issue, then trace the organization, user, and bucket event paths behind these API endpoints. Done means the logs endpoint returns entries for creation and update events after the related resource changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.