Skip to content

Commit 7c3d1a5

Browse files
authored
Merge pull request #731 from lupko/flight-fixes
RELATED: CQ-555 - Tweaks & fixes in the new package
2 parents 56c44ca + f237c1b commit 7c3d1a5

File tree

5 files changed

+38
-24
lines changed

5 files changed

+38
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
11
# (C) 2024 GoodData Corporation
2+
3+
from gooddata_flight_server.config.config import (
4+
AuthenticationMethod,
5+
OtelConfig,
6+
OtelExporterType,
7+
ServerConfig,
8+
)
9+
from gooddata_flight_server.errors.error_code import ErrorCode
10+
from gooddata_flight_server.errors.error_info import ErrorInfo, RetryInfo
11+
from gooddata_flight_server.flexfun.flex_fun import FlexFun
12+
from gooddata_flight_server.health.server_health_monitor import ModuleHealthStatus, ServerHealthMonitor
13+
from gooddata_flight_server.server.auth.auth_middleware import TokenAuthMiddleware
14+
from gooddata_flight_server.server.auth.token_verifier import TokenVerificationStrategy
15+
from gooddata_flight_server.server.base import FlightServerMethodsFactory, ServerContext
16+
from gooddata_flight_server.server.flight_rpc.flight_middleware import (
17+
CallFinalizer,
18+
CallInfo,
19+
)
20+
from gooddata_flight_server.server.flight_rpc.server_methods import FlightServerMethods
21+
from gooddata_flight_server.tasks.base import TaskWaitTimeoutError
22+
from gooddata_flight_server.tasks.task import Task
23+
from gooddata_flight_server.tasks.task_error import TaskError
24+
from gooddata_flight_server.tasks.task_executor import (
25+
TaskExecutor,
26+
)
27+
from gooddata_flight_server.tasks.task_result import (
28+
FlightDataTaskResult,
29+
ListFlightsTaskResult,
30+
TaskExecutionResult,
31+
TaskResult,
32+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Mark package as supporting typing. See https://www.python.org/dev/peps/pep-0561/ for details.

gooddata-flight-server/gooddata_flight_server/tasks/task.py

+1-23
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import threading
44
import uuid
55
from concurrent.futures import CancelledError
6-
from typing import Dict, List, Literal, Optional, Union, final
6+
from typing import Optional, Union, final
77

88
from gooddata_flight_server.tasks.task_error import TaskError
99
from gooddata_flight_server.tasks.task_result import TaskResult
@@ -191,25 +191,3 @@ def run(self) -> Union[TaskResult, TaskError]:
191191
:raise CancelledError: when the task's run was cancelled
192192
"""
193193
raise NotImplementedError
194-
195-
196-
class TaskFactory(abc.ABC):
197-
"""
198-
Interface for factories that create concrete implementations of tasks.
199-
"""
200-
201-
def create_task(
202-
self,
203-
cmd: bytes,
204-
headers: Dict[str, List[str]],
205-
method: Union[Literal["get-flight-info", "list-flights"], str] = "get-flight-info",
206-
) -> Task:
207-
"""
208-
Creates a new task to execute a particular command.
209-
210-
:param cmd: command included in the FlightDescriptor
211-
:param headers: headers provided with the request
212-
:param method: flight RPC method / action through which the request to create this task was invoked
213-
:return: new instance of task
214-
"""
215-
raise NotImplementedError

gooddata-flight-server/setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
"Documentation": "https://gooddata-flight-server.readthedocs.io/en/v1.21.0",
3636
"Source": "https://github.com/gooddata/gooddata-python-sdk",
3737
},
38+
scripts=[
39+
"bin/gooddata-flight-server",
40+
],
3841
classifiers=[
39-
"Development Status :: 5 - Production/Stable",
42+
"Development Status :: 4 - Beta",
4043
"Environment :: Console",
4144
"License :: OSI Approved :: MIT License",
4245
"Programming Language :: Python :: 3.8",

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ lint.ignore = [
3434
"gooddata-sdk/gooddata_sdk/__init__.py" = ["F401"]
3535
"gooddata-dbt/gooddata_dbt/__init__.py" = ["F401"]
3636
"gooddata-fdw/gooddata_fdw/__init__.py" = ["F401"]
37+
"gooddata-flight-server/gooddata_flight_server/__init__.py" = ["F401"]
3738

3839
[tool.ruff.format]
3940
exclude = ['(gooddata-api-client|.*\.snapshot\..*)']

0 commit comments

Comments
 (0)