dataflow-core 2.1.14__tar.gz → 2.1.14rc2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/PKG-INFO +1 -1
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/dataflowairflowauthenticator.py +9 -3
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/__init__.py +1 -1
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/environment.py +43 -2
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/PKG-INFO +1 -1
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/setup.py +1 -1
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/README.md +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/dataflowhubauthenticator.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/dataflowsupersetauthenticator.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/configuration.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/database_manager.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/dataflow.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/db.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/environment.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/app_types.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/blacklist_library.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/connection.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/dataflow_zone.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/environment_status.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/git_ssh.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/pinned_projects.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/pod_activity.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/pod_session_history.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/project_details.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/recent_project_studio.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/recent_projects.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/role.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/role_server.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/role_zone.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/server_config.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/session.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/team.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/user.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/user_environment.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/user_team.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/models/variables.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/schemas/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/schemas/connection.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/schemas/git_ssh.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/schemas/secret.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/scripts/clone_environment.sh +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/scripts/create_environment.sh +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/scripts/update_environment.sh +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/factory.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/interface.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/aws_manager.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/azure_manager.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/service.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/utils/__init__.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/utils/exceptions.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/utils/get_current_user.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/utils/logger.py +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/SOURCES.txt +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/dependency_links.txt +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/entry_points.txt +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/requires.txt +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/top_level.txt +0 -0
- {dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/setup.cfg +0 -0
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/dataflowairflowauthenticator.py
RENAMED
|
@@ -4,7 +4,7 @@ from flask_appbuilder.security.views import expose
|
|
|
4
4
|
from flask_login import login_user
|
|
5
5
|
from airflow.www.security import FabAirflowSecurityManagerOverride
|
|
6
6
|
from dataflow.dataflow import Dataflow
|
|
7
|
-
import logging
|
|
7
|
+
import logging, os
|
|
8
8
|
|
|
9
9
|
logging.basicConfig(
|
|
10
10
|
level=logging.INFO,
|
|
@@ -29,9 +29,15 @@ class DataflowAuthDBView(AuthDBView):
|
|
|
29
29
|
|
|
30
30
|
user_details = dataflow.auth(session_id)
|
|
31
31
|
logger.info(f"User details retrieved for: {user_details['user_name']}")
|
|
32
|
+
if os.getenv("RUNTIME"):
|
|
33
|
+
role = self.appbuilder.sm.find_role(user_details.get("base_role", "user").title())
|
|
34
|
+
else:
|
|
35
|
+
role = self.appbuilder.sm.find_role("Admin")
|
|
32
36
|
user = self.appbuilder.sm.find_user(username=user_details['user_name'])
|
|
33
37
|
if user:
|
|
34
|
-
|
|
38
|
+
# Update user role
|
|
39
|
+
user.role = role
|
|
40
|
+
self.appbuilder.sm.update_user(user=user)
|
|
35
41
|
login_user(user, remember=False)
|
|
36
42
|
else:
|
|
37
43
|
user = self.appbuilder.sm.add_user(
|
|
@@ -39,7 +45,7 @@ class DataflowAuthDBView(AuthDBView):
|
|
|
39
45
|
first_name=user_details.get("first_name", ""),
|
|
40
46
|
last_name=user_details.get("last_name", ""),
|
|
41
47
|
email=user_details.get("email", ""),
|
|
42
|
-
role=
|
|
48
|
+
role=role,
|
|
43
49
|
)
|
|
44
50
|
logger.info(f"New user created: {user}")
|
|
45
51
|
if user:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from .role import Role
|
|
4
4
|
from .user import User
|
|
5
5
|
from .team import Team
|
|
6
|
-
from .environment import (Environment, LocalEnvironment, ArchivedEnvironment, JobLogs)
|
|
6
|
+
from .environment import (Environment, LocalEnvironment, ArchivedEnvironment, JobLogs, PipSource)
|
|
7
7
|
from .project_details import ProjectDetails
|
|
8
8
|
from .recent_projects import RecentProjects
|
|
9
9
|
from .pinned_projects import PinnedProject
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
from sqlalchemy import
|
|
1
|
+
from sqlalchemy import (
|
|
2
|
+
Column, Integer, String, Boolean, Text,
|
|
3
|
+
ForeignKey, DateTime, UniqueConstraint, CheckConstraint
|
|
4
|
+
)
|
|
5
|
+
from sqlalchemy.orm import relationship, Session
|
|
2
6
|
from sqlalchemy.orm import relationship
|
|
3
7
|
from sqlalchemy.sql import func
|
|
4
8
|
from datetime import datetime, timezone
|
|
@@ -79,4 +83,41 @@ class LocalEnvironment(Base):
|
|
|
79
83
|
|
|
80
84
|
class EnvType(str, Enum):
|
|
81
85
|
dataflow = "dataflow"
|
|
82
|
-
local = "local"
|
|
86
|
+
local = "local"
|
|
87
|
+
|
|
88
|
+
class PipSource(Base):
|
|
89
|
+
__tablename__ = "PIP_SOURCE"
|
|
90
|
+
|
|
91
|
+
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
92
|
+
|
|
93
|
+
user_name = Column(String, ForeignKey("USER.user_name", ondelete="CASCADE"), nullable=True, index=True)
|
|
94
|
+
|
|
95
|
+
name = Column(String, nullable=False)
|
|
96
|
+
url = Column(String, nullable=False)
|
|
97
|
+
is_index = Column(Boolean, default=False, nullable=False, server_default='false')
|
|
98
|
+
|
|
99
|
+
created_at = Column(DateTime, default=datetime.now(timezone.utc), nullable=False)
|
|
100
|
+
updated_at = Column(DateTime, default=datetime.now(timezone.utc), onupdate=datetime.now(timezone.utc), nullable=False)
|
|
101
|
+
|
|
102
|
+
__table_args__ = (
|
|
103
|
+
UniqueConstraint("name", "user_name", name="uq_pip_source_per_user"),
|
|
104
|
+
CheckConstraint("NOT (is_index = TRUE AND user_name IS NOT NULL)", name="check_no_user_index_url"),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def get_admin_sources(cls, session: Session):
|
|
109
|
+
"""
|
|
110
|
+
Returns all admin/system-wide sources (user_name is NULL).
|
|
111
|
+
"""
|
|
112
|
+
return session.query(cls).filter(
|
|
113
|
+
cls.user_name == None
|
|
114
|
+
).all()
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def get_user_sources(cls, session: Session, user_name: str):
|
|
118
|
+
"""
|
|
119
|
+
Returns merged sources for a user (admin-level + user-level personal sources).
|
|
120
|
+
"""
|
|
121
|
+
return session.query(cls).filter(
|
|
122
|
+
(cls.user_name == None) | (cls.user_name == user_name)
|
|
123
|
+
).all()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/authenticator/dataflowsupersetauthenticator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/__init__.py
RENAMED
|
File without changes
|
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/aws_manager.py
RENAMED
|
File without changes
|
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow/secrets_manager/providers/azure_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.14 → dataflow_core-2.1.14rc2}/dataflow_core.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|