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

feat: Workflow refactoring, only async #2878

Open
wants to merge 75 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
48b60c8
feat: Workflow refactoring, only async
Matvey-Kuk Dec 22, 2024
317c9d3
Fix
Matvey-Kuk Dec 22, 2024
c363c08
Fix imports
Matvey-Kuk Dec 22, 2024
1068568
Fix
Matvey-Kuk Dec 22, 2024
8a251b5
Async connection string
Matvey-Kuk Dec 22, 2024
fb56fdd
aiosqlite
Matvey-Kuk Dec 22, 2024
779b69b
poetry.lock
Matvey-Kuk Dec 22, 2024
a2b8de2
Fix docs
Matvey-Kuk Dec 22, 2024
f19aa04
fix
Matvey-Kuk Dec 22, 2024
6ea1a77
Fix docs
Matvey-Kuk Dec 22, 2024
8e2701e
fix tests
Matvey-Kuk Dec 22, 2024
995d1e9
Tests
Matvey-Kuk Dec 22, 2024
dcd7216
So...
Matvey-Kuk Dec 24, 2024
fafba1a
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 24, 2024
ce6f807
Fix tests
Matvey-Kuk Dec 24, 2024
be41f41
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 24, 2024
077fb52
asyncio_default_fixture_loop_scope
Matvey-Kuk Dec 24, 2024
84028ed
Fix
Matvey-Kuk Dec 24, 2024
f210edf
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 24, 2024
5810e9c
Session...
Matvey-Kuk Dec 24, 2024
e1bac08
Fix
Matvey-Kuk Dec 24, 2024
956d5f8
@pytest.mark.asyncio
Matvey-Kuk Dec 24, 2024
3db5d51
function
Matvey-Kuk Dec 24, 2024
881e5cf
mock_session.db_session = db_session
Matvey-Kuk Dec 24, 2024
87ad9f6
Unbelievable
Matvey-Kuk Dec 24, 2024
da66c68
fix more
Matvey-Kuk Dec 24, 2024
f82b86b
More fixes.
Matvey-Kuk Dec 24, 2024
8be0a68
All???!!
Matvey-Kuk Dec 24, 2024
aeef731
FIx.
Matvey-Kuk Dec 24, 2024
0f9f092
Fix
Matvey-Kuk Dec 24, 2024
0811007
Fix?
Matvey-Kuk Dec 24, 2024
18c297b
Fix?
Matvey-Kuk Dec 24, 2024
182933b
Fix
Matvey-Kuk Dec 25, 2024
a7e7dca
Please?
Matvey-Kuk Dec 25, 2024
294da80
Fix?
Matvey-Kuk Dec 25, 2024
8629ed6
Fix?
Matvey-Kuk Dec 25, 2024
7e9f104
Fix
Matvey-Kuk Dec 25, 2024
be5e818
No "api-ref/root",
Matvey-Kuk Dec 25, 2024
a3adc06
Skip?
Matvey-Kuk Dec 25, 2024
fd74522
More timeout?
Matvey-Kuk Dec 25, 2024
361465e
fix
Matvey-Kuk Dec 25, 2024
2b66a89
Fix
Matvey-Kuk Dec 25, 2024
0f38b77
60 sec?
Matvey-Kuk Dec 25, 2024
9528c9f
Meow
Matvey-Kuk Dec 25, 2024
33b89a5
Fix
Matvey-Kuk Dec 25, 2024
7edae22
Un-skip
Matvey-Kuk Dec 25, 2024
7c0a54a
Fix
Matvey-Kuk Dec 25, 2024
8a63919
Fix?
Matvey-Kuk Dec 25, 2024
aa67e52
Fix?
Matvey-Kuk Dec 25, 2024
06e3fdb
Fix
Matvey-Kuk Dec 25, 2024
177800d
Docs
Matvey-Kuk Dec 25, 2024
3331e14
Lock
Matvey-Kuk Dec 25, 2024
802e22c
Fix
Matvey-Kuk Dec 25, 2024
1db3309
Fix
Matvey-Kuk Dec 25, 2024
ae82b42
Fix
Matvey-Kuk Dec 25, 2024
e3c8dff
fix
Matvey-Kuk Dec 25, 2024
9655032
Fix
Matvey-Kuk Dec 25, 2024
e278dbb
lock
Matvey-Kuk Dec 25, 2024
e4e00cf
Fix
Matvey-Kuk Dec 25, 2024
c1bb9bb
Fix
Matvey-Kuk Dec 25, 2024
57edee7
Sync back
Matvey-Kuk Dec 25, 2024
80fe298
Extra import
Matvey-Kuk Dec 25, 2024
7a819e1
Vladimir's fix
Matvey-Kuk Dec 25, 2024
8522df9
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 25, 2024
2663341
Fix
Matvey-Kuk Dec 25, 2024
42abec3
poetry lock
Matvey-Kuk Dec 25, 2024
7efd63d
Fix
Matvey-Kuk Dec 26, 2024
78ec00b
Polishing
Matvey-Kuk Dec 26, 2024
d42a1ee
Fix
Matvey-Kuk Dec 26, 2024
1c1da2f
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 26, 2024
62f1ad9
Merge branch 'main' into Matvey-Kuk/workflow-refactoring-v2
Matvey-Kuk Dec 30, 2024
efbbb0e
Fix
Matvey-Kuk Dec 30, 2024
5e5bd2c
Fix
Matvey-Kuk Dec 30, 2024
0554ab8
Fix
Matvey-Kuk Dec 30, 2024
daca2e9
Fix
Matvey-Kuk Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
LOG_LEVEL: DEBUG
SQLALCHEMY_WARN_20: 1
run: |
poetry run coverage run --branch -m pytest --timeout 20 -n auto --non-integration --ignore=tests/e2e_tests/
poetry run coverage run --branch -m pytest -n auto --non-integration --ignore=tests/e2e_tests/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving timeout to the pyproject.toml

- name: Run integration tests and report coverage
run: |
Expand Down
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"providers/documentation/checkmk-provider",
"providers/documentation/cilium-provider",
"providers/documentation/clickhouse-provider",
"providers/documentation/clickhouse-http-provider",
"providers/documentation/cloudwatch-provider",
"providers/documentation/console-provider",
"providers/documentation/coralogix-provider",
Expand Down
7 changes: 7 additions & 0 deletions docs/providers/documentation/clickhouse-http-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 'ClickHouse HTTP'
sidebarTitle: 'ClickHouse HTTP Provider'
description: 'ClickHouse HTTP provider allows you to interact with ClickHouse database.'
---

This provider is an async (more performant) analog of [clickhouse-provider](providers/documentation/clickhouse-provider.mdx). It's using HTTP protocol to interact to the Clickhouse.
6 changes: 6 additions & 0 deletions docs/providers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ By leveraging Keep Providers, users are able to deeply integrate Keep with the t
}
></Card>

<Card
title="ClickHouse HTTP"
href="/providers/documentation/clickhouse-http-provider"
icon={ <img src="https://img.logo.dev/clickhouse.com?token=pk_dfXfZBoKQMGDTIgqu7LvYg" /> }
></Card>

<Card
title="ClickHouse"
href="/providers/documentation/clickhouse-provider"
Expand Down
4 changes: 3 additions & 1 deletion keep/api/bl/incidents_bl.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
import logging
import os
import pathlib
Expand Down Expand Up @@ -153,7 +154,7 @@ def update_client_on_incident_change(self, incident_id: Optional[UUID] = None):
def send_workflow_event(self, incident_dto: IncidentDto, action: str) -> None:
try:
workflow_manager = WorkflowManager.get_instance()
workflow_manager.insert_incident(self.tenant_id, incident_dto, action)
asyncio.run(workflow_manager.insert_incident(self.tenant_id, incident_dto, action))
except Exception:
self.logger.exception(
"Failed to run workflows based on incident",
Expand Down Expand Up @@ -231,6 +232,7 @@ def delete_incident(self, incident_id: UUID) -> None:
self.update_client_on_incident_change()
self.send_workflow_event(incident_dto, "deleted")


def update_incident(
self,
incident_id: UUID,
Expand Down
Loading
Loading