open-nomad/api
Benjamin Buzbee 13cc30ebeb
Return buffered text from log endpoint if decoding fails (#15558)
To see why I think this is a good change lets look at why I am making it

My disk was full, which means GC was happening agressively. So by the
time I called the logging endpoint from the SDK, the logs were GC'd

The error I was getting before was:
```
invalid character 'i' in literal false (expecting 'l')
```

Now the error I get is:
```
failed to decode log endpoint response as JSON: "failed to list entries: open /tmp/nomad.data.4219353875/alloc/f11fee50-2b66-a7a2-d3ec-8442cb3d557a/alloc/logs: no such file or directory"
```

Still not super descriptive but much more debugable
2023-01-16 10:39:56 +01:00
..
contexts rename SecureVariables to Variables throughout 2022-08-26 16:06:24 -04:00
internal/testutil deps: update shoenig/test to v0.6.0 (#15715) 2023-01-09 09:37:08 -06:00
acl.go ACL: add ACL binding rule RPC and HTTP API handlers. (#15529) 2022-12-15 09:18:55 +01:00
acl_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
agent.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
agent_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
allocations.go Task lifecycle restart (#14127) 2022-08-24 17:43:07 -04:00
allocations_exec.go cleanup: prevent leaks from time.After 2022-02-02 14:32:26 -06:00
allocations_test.go test: wait for node in api tests that register job (#15677) 2023-01-03 16:11:35 -06:00
api.go api: trim space of error response output 2022-08-16 15:00:38 -05:00
api_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
compose_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
constraint.go Tag Job spec with HCLv2 tags 2020-10-21 14:05:46 -04:00
constraint_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
consul.go consul/connect: use block not optional for opaque map (#15765) 2023-01-12 10:39:10 -06:00
consul_test.go consul/connect: support for proxy upstreams opaque config (#15761) 2023-01-12 08:20:54 -06:00
csi.go CSI: failed allocation should not block its own controller unpublish (#14484) 2022-09-08 13:30:05 -04:00
csi_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
deployments.go cli: do not import structs, use API package only. (#13938) 2022-08-02 16:33:08 +02:00
evaluations.go eval delete: move batching of deletes into RPC handler and state (#15117) 2022-11-14 14:08:13 -05:00
evaluations_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
event_stream.go api: add convenience string func to Topic type. (#14843) 2022-10-19 14:12:23 +02:00
event_stream_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
fs.go Return buffered text from log endpoint if decoding fails (#15558) 2023-01-16 10:39:56 +01:00
fs_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
go.mod Return buffered text from log endpoint if decoding fails (#15558) 2023-01-16 10:39:56 +01:00
go.sum Return buffered text from log endpoint if decoding fails (#15558) 2023-01-16 10:39:56 +01:00
ioutil.go api: use errors.New not fmt.Errorf when error doesn't have format. (#14027) 2022-08-05 17:05:47 +02:00
ioutil_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
jobs.go [ui] Adds meta to job list stub and displays a pack logo on the jobs index (#14833) 2022-11-02 16:58:24 -04:00
jobs_test.go tests: fix assertion for slice length (#15672) 2023-01-03 15:40:38 -06:00
keyring.go api: update keyring comment to reflect correct feature name. (#14558) 2022-09-13 10:05:03 -04:00
keyring_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
namespace.go core: allow deleting of evaluations (#13492) 2022-07-06 16:30:11 +02:00
namespace_test.go api: make api tests fast and more concurrency safe (#15543) 2022-12-16 12:25:28 -06:00
nodes.go Add os to NodeListStub struct. (#12497) 2022-04-15 17:22:45 -07:00
nodes_test.go api: cleanup use of deprecated waiter functions (#15608) 2022-12-22 08:21:00 -06:00
operator.go core: allow pausing and un-pausing of leader broker routine (#13045) 2022-07-06 16:13:48 +02:00
operator_autopilot.go implement MinQuorum 2020-02-16 16:04:59 -06:00
operator_ent_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
operator_metrics.go Metrics gotemplate support, debug bundle features (#9067) 2020-10-14 15:16:10 -04:00
operator_metrics_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
operator_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
quota.go rename SecureVariables to Variables throughout 2022-08-26 16:06:24 -04:00
quota_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
raw.go core: allow deleting of evaluations (#13492) 2022-07-06 16:30:11 +02:00
recommendations.go added new policy capabilities for recommendations API 2020-10-28 14:32:16 +00:00
regions.go cli: ensure `-stale` flag is respected by `nomad operator debug` (#11678) 2021-12-15 10:44:03 -05:00
regions_test.go api: cleanup use of deprecated waiter functions (#15608) 2022-12-22 08:21:00 -06:00
resources.go api: remove `mapstructure` tags from`Port` struct (#12916) 2022-11-08 11:26:28 +01:00
resources_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
scaling.go cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
scaling_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
search.go api: implement fuzzy search API 2021-04-16 16:36:07 -06:00
search_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
sentinel.go api: use errors.New not fmt.Errorf when error doesn't have format. (#14027) 2022-08-05 17:05:47 +02:00
sentinel_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
services.go cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
services_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
status.go display server leaders per region 2016-03-17 16:04:09 -07:00
status_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
system.go Add missing ReconcileSummaries API method 2017-08-24 11:55:10 +02:00
system_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
tasks.go template: error on missing key (#15141) 2022-11-04 13:23:01 -04:00
tasks_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
util_test.go api: make api tests fast and more concurrency safe (#15543) 2022-12-16 12:25:28 -06:00
utils.go cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
utils_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00
variables.go [vars:api] Return fake QueryMeta on 403s with Peek() (#14661) 2022-09-22 13:15:05 -04:00
variables_test.go api: purge testify and pretty dependencies (#15627) 2023-01-01 12:57:26 -06:00