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

http-api: T6326: return full warning/error output through api #4090

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented Sep 20, 2024

Change Summary

Remove 'workaround' of writing vyos-configd output directly to the CLI session tty; return output directly to the shim for output in CLI session or ConfigSession instance. This corrects the lack of full error/warning output to the http-api.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

Proposed changes

How to test

Smoketest result

DEBUG - OK
DEBUG - vyos@vyos:~$ echo EXITCODE:$?
DEBUG - echo EXITCODE:$?
DEBUG - EXITCODE:0
 INFO - Smoketest finished successfully!
DEBUG - OK
DEBUG - vyos@vyos:~$ echo EXITCODE:$?
DEBUG - echo EXITCODE:$?
 INFO - Configtest finished successfully!

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Configuration error output is not returned in full to the http-api when
running under vyos-configd, due to an early implementation 'workaround'
of vyos-configd writing directly to the session tty. This is corrected
to return all ambient stdout (notably vyos.base.Warning) and error
messages directly to the originating caller, which may be from a session
tty or a ConfigSession instance. As the http-api runs in the latter
case, the full output is returned.
@jestabro jestabro self-assigned this Sep 20, 2024
@jestabro jestabro requested a review from a team as a code owner September 20, 2024 16:39
Copy link

github-actions bot commented Sep 20, 2024

👍
No issues in PR Title / Commit Title

Copy link

✅ No issues found in unused-imports check.. Please refer the workflow run

@c-po c-po merged commit 936b3ac into vyos:current Sep 20, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants