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

Return buffered text from log endpoint if decoding fails #15558

Merged
merged 1 commit into from
Jan 16, 2023

Commits on Jan 6, 2023

  1. Return buffered text from log endpoint if decoding fails

    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
    Ben Buzbee committed Jan 6, 2023
    Configuration menu
    Copy the full SHA
    024f7bb View commit details
    Browse the repository at this point in the history