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

refactor,fix: Improve manager CLI logging initialization #1581

Merged
merged 10 commits into from
Sep 17, 2023

Conversation

achimnol
Copy link
Member

@achimnol achimnol commented Sep 17, 2023

This PR is extracted from #887 to backport.

  • refactor: Simplify the manager CLI logging initialization
  • refactor: Ensure logger initialization done only when required
  • fix: click.Context.obj should not be None
  • fix: For CLI commands, use the local logger
  • fix: Now logging immediately flushes stderr
  • doc: Add news fragment
  • setup: Ensure Click to be the 8.x series

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue

* Prevent losing the file-based logging when the manager service is
  executed via `backend.ai mgr start-server`

* type-click is deprecated in the Click 8.x series. We need to use
  the original package only to correctly type some new arguments in
  `click.Path`.

Backported-from: #887
Backported-to: main
- When using `with_resource()`, our context manager should return the
  objecte to refer.

Backported-from: #887
Backported-to: main
Backported-from: #887
Backported-to: main
Backported-from: #887
Backported-to: main
@achimnol achimnol added this to the 23.03 milestone Sep 17, 2023
@achimnol achimnol added type:bug Reports about that are not working comp:manager Related to Manager component comp:cli Related to CLI component type:refactor Refactor codes or add tests. impact:invisible This change is invisible to users (internal changes). labels Sep 17, 2023
@achimnol achimnol self-assigned this Sep 17, 2023
@github-actions github-actions bot added the size:L 100~500 LoC label Sep 17, 2023
achimnol and others added 3 commits September 17, 2023 06:02
Backported-from: #887
Backported-to: main
Backported-from: #887
Backported-to: main
@github-actions github-actions bot added comp:storage-proxy Related to Storage proxy component comp:webserver Related to Web Server component size:XL 500~ LoC and removed size:L 100~500 LoC labels Sep 17, 2023
@achimnol achimnol added this pull request to the merge queue Sep 17, 2023
Merged via the queue into main with commit 0aef900 Sep 17, 2023
21 checks passed
@achimnol achimnol deleted the refactor/manager-cli branch September 17, 2023 06:20
achimnol added a commit that referenced this pull request Sep 17, 2023
Backported-from: main
Backported-to: 23.03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:cli Related to CLI component comp:manager Related to Manager component comp:storage-proxy Related to Storage proxy component comp:webserver Related to Web Server component impact:invisible This change is invisible to users (internal changes). size:XL 500~ LoC type:bug Reports about that are not working type:refactor Refactor codes or add tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant