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

Expose failure output for apiclient #342

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

gthao313
Copy link
Member

The agent calls to the bottlerocket API and it could fail for any number of reasons. Currently we only return the status code, so we improve update API invoke functionality to return entire error output for easier debugging.

Issue number:
Closes: #335

Description of changes:

Author: Tianhao Geng <tianhg@amazon.com>
Date:   Thu Nov 17 19:23:43 2022 +0000

    Expose failure output for apiclient

    The agent calls to the bottlerocket API and it could fail for any number
    of reasons. Currently we only return the status code, so we improve
    update API invoke functionality to return entire error output for easier
    debugging.

Testing done:
✅ Integration test

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@gthao313
Copy link
Member Author

@jpmcb Since you create the issue, Can you take a look at this to verify if this change meet your expectation? Thanks! : )

statuscode: error_statuscode,
args: args,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to leave the status code there, which would make it easier to write code to handle the error elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Agree with Sean. I think it'd make sense to have all 3:

  • the command /args that were invoked
  • the error status code
  • the error contents

The agent calls to the bottlerocket API and it could fail for any number
of reasons. Currently we only return the status code, so we improve
update API invoke functionality to return entire error output for easier
debugging.
@gthao313 gthao313 merged commit 4cb1f71 into bottlerocket-os:develop Nov 21, 2022
@gthao313 gthao313 deleted the agent-log branch November 21, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose failure output for apiclient 🔄 agent interactions
4 participants