Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of Return buffered text from log endpoint if decoding fails into release/1.4.x #15796

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #15558 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

The below text is copied from the body of the original PR.


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

@hashicorp-cla
Copy link

hashicorp-cla commented Jan 16, 2023

CLA assistant check
All committers have signed the CLA.

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
@jrasell jrasell force-pushed the backport/benbuz/log-error/highly-smart-pup branch from d1377ae to b9831fc Compare January 16, 2023 09:53
@jrasell jrasell merged commit d720bc4 into release/1.4.x Jan 16, 2023
@jrasell jrasell deleted the backport/benbuz/log-error/highly-smart-pup branch January 16, 2023 10:15
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants