Commit dc83bda
Support wait_for_status and timeout query params on root endpoint (#18377)
* Support wait_for_status query param on root endpoint
* Use Java::OrgLogstashHealth::Status enum values for status constant
* Add docs for root api including new query params
* Be consistent with return statuses definition in specs
* Use org.logstash.health.Status for constant and in tests
* Return http status code 503 when timeout and support target status or better
* Update docs with note about returning status code 503
* Use Timeout instead while waiting for the status
* Only use green, yellow, and red statuses in constant (exclude unknown)
* Handle non integer timeout string
* Add the loop back in to timeout block
* Update tests
* Refactor and fix tests
* Not necessary to handle status code in app helpers anymore
* Rename method to reflect time units
* Use shared examples in specs
* Small update to comment
* Change variables names for clarity
* No need to check for nil, the method is called only if the variable is not nil
* Fix shared examples name
* Update docs/static/spec/openapi/logstash-api.yaml
Co-authored-by: Rye Biesemeyer <[email protected]>
* Update docs/static/spec/openapi/logstash-api.yaml
Co-authored-by: Rye Biesemeyer <[email protected]>
* Use deadline instead of Timeout
* Be more explicit about class being Float
* No need for timeout
* Test timeout units in ms
* Minor updates to specs
* Update comment
* Use status code 408 when the request times out
* Require timeout along with wait_for_status
* Update docs to be clearer about timeout being required with wait_for_status
* Move before block to shared examples
* Update logstash-core/lib/logstash/api/modules/root.rb
Co-authored-by: Rye Biesemeyer <[email protected]>
* Limit the sleep time to max timeout
* Update logstash-core/lib/logstash/api/modules/root.rb
Co-authored-by: Rye Biesemeyer <[email protected]>
* Updates to docs
* Add build_date, build_sha, build_snapshot to docs
* Update docs to say timeout status code is 408
* Fix linting errors in logstash-api.yaml
* Use common schema for root response descriptions
* Sort tags by displayname
* Handle the case when the current status is unknown
* Update docs/static/spec/openapi/logstash-api.yaml
Co-authored-by: Lisa Cawley <[email protected]>
---------
Co-authored-by: Rye Biesemeyer <[email protected]>
Co-authored-by: lcawl <[email protected]>1 parent e0acfe7 commit dc83bda
File tree
5 files changed
+529
-1
lines changed- docs/static/spec/openapi
- logstash-core
- lib/logstash/api
- modules
- spec
- logstash/api/modules
- support
5 files changed
+529
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
69 | 150 | | |
70 | 151 | | |
71 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
43 | 63 | | |
44 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
23 | 97 | | |
24 | | - | |
| 98 | + | |
25 | 99 | | |
26 | 100 | | |
27 | 101 | | |
| |||
0 commit comments