influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.21k stars 3.51k forks source link

InfluxDB 2.x Swagger: POST `/packages/stacks` returns 200 instead of 201 in OSS and Cloud 2 #19378

Open stephanie-engel opened 3 years ago

stephanie-engel commented 3 years ago

@stephanie-engel commented on Tue Aug 11 2020

Description: When referencing the swagger spec for /packages/stacks, the POST method returns a response of 200 OK instead of a 201 Created for OSS

Steps: 1) While running an influxdb 2.x instance, create a stack:

curl -o /dev/null -s -w "%{http_code}\n" --request POST 'http://localhost:9999/api/v2/packages/stacks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token myToken' \
--data-raw '{
    "orgID": "55c3aa7ac37ba306",
    "name": "new stack 123",
    "description": "this describes the new stack"
}'

2) Look at the response code:

200

This issue is also happening on Cloud 2. On 8/17/20, I deleted a re-created my fenv cloud 2 cluster se-cluster and now I'm also seeing a 200 response instead if 201.

karel-rehor commented 2 years ago

We're looking at reactivating grace tests for the /stacks path. Is fixing this issue in anybody's backlog?