Skip to content

Conversation

@fridex
Copy link
Contributor

@fridex fridex commented Jan 20, 2021

Related Issues and Dependencies

Fixes: #1089

This introduces a breaking change

  • No

@sesheta
Copy link
Member

sesheta commented Jan 20, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign fridex after the PR has been reviewed.
You can assign the PR to them by writing /assign @fridex in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fridex
Copy link
Contributor Author

fridex commented Jan 20, 2021

/hold

@sesheta sesheta added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 20, 2021
@fridex
Copy link
Contributor Author

fridex commented Jan 20, 2021

@4n4nd is there a way I can easily access the Loki instance to test integration with Thoth?

@4n4nd
Copy link

4n4nd commented Jan 20, 2021

@4n4nd is there a way I can easily access the Loki instance to test integration with Thoth?

@fridex we have some docs here. Please lmk if you need anything more

@sesheta
Copy link
Member

sesheta commented Jan 20, 2021

Pre-Commit Test failed! Click here
[INFO] Initializing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Initializing environment for https://gitlab.com/PyCQA/flake8:pep8-naming.
[INFO] Initializing environment for https://github.com/mgedmin/check-manifest.
[INFO] Installing environment for git://github.com/Lucas-C/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for git://github.com/pycqa/pydocstyle.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/PyCQA/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/mgedmin/check-manifest.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Tests should end in _test.py.............................................Passed
Check for added large files..............................................Passed
Check for byte-order marker..............................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Check python ast.........................................................Passed
Debug Statements (Python)................................................Passed
pydocstyle...............................................................Failed
- hook id: pydocstyle
- exit code: 1

thoth/common/logging.py:407 in public method `__init__`:
        D107: Missing docstring in __init__

Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

thoth/common/logging.py:393:28: error: Class cannot subclass 'LokiEmitterV1' (has type 'Any')  [misc]
thoth/common/logging.py:396:5: error: Function is missing a return type annotation  [no-untyped-def]
thoth/common/logging.py:404:29: error: Name 'logging.handlers.QueueHandler' is not defined  [name-defined]
thoth/common/logging.py:404:29: error: Class cannot subclass 'QueueHandler' (has type 'Any')  [misc]
thoth/common/logging.py:407:5: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]
thoth/common/logging.py:407:31: error: Missing type parameters for generic type "Queue"  [type-arg]
thoth/common/logging.py:410:25: error: Module has no attribute "handlers"; maybe "Handler"?  [attr-defined]
thoth/common/logging.py:414:24: error: Class cannot subclass 'LokiHandler' (has type 'Any')  [misc]
Found 8 errors in 1 file (checked 13 source files)

black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted /workspace/repo/thoth/common/logging.py
All done! ✨ 🍰 ✨
1 file reformatted, 17 files left unchanged.

flake8...................................................................Passed
check-manifest...........................................................Passed

@fridex
Copy link
Contributor Author

fridex commented Jan 20, 2021

@4n4nd is there a way I can easily access the Loki instance to test integration with Thoth?

@fridex we have some docs here. Please lmk if you need anything more

The PR implements integration with op1st Loki. As discussed on the private chat, headers are required to send the request. It's not nice, proposed changes directly upstream for this capability GreyZmeem/python-logging-loki#13 Marking as WIP once we get response from python-logging-loki upstream.

@fridex fridex changed the title Initialize and use Loki handler WIP: Initialize and use Loki handler Jan 20, 2021
@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2021
@sesheta sesheta added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2021
@sesheta
Copy link
Member

sesheta commented Feb 2, 2021

@fridex: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@fridex
Copy link
Contributor Author

fridex commented Apr 30, 2021

/close

@sesheta
Copy link
Member

sesheta commented Apr 30, 2021

@fridex: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sesheta sesheta closed this Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WIP: use operate-first Loki for logging

3 participants