genesis-flow 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: genesis-flow
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Genesis-Flow: MLflow v3.1.4 compatible fork for Genesis platform
5
5
  Maintainer-email: Databricks <mlflow-oss-maintainers@googlegroups.com>
6
6
  License: Copyright 2018 Databricks, Inc. All rights reserved.
@@ -1,4 +1,4 @@
1
- genesis_flow-1.0.3.dist-info/licenses/LICENSE.txt,sha256=Y5U1Xebzka__NZlqMPtBsYm0mRpMtUmTrONatpoL-ig,11382
1
+ genesis_flow-1.0.4.dist-info/licenses/LICENSE.txt,sha256=Y5U1Xebzka__NZlqMPtBsYm0mRpMtUmTrONatpoL-ig,11382
2
2
  mlflow/__init__.py,sha256=-_r__N5Afed81pLVtr2wKbHQIA0aj9u9n_7kWGxLWi4,11194
3
3
  mlflow/__main__.py,sha256=_PcdoxKehR_a2MI6GqBfzYzRCXZhVyDCSdbxDWVlWd4,39
4
4
  mlflow/cli.py,sha256=f1ObrWZ03HgRiRoVEE1Gffe-dGcSY7CxJyEFgb5VUMM,26137
@@ -23,8 +23,8 @@ mlflow/autogen/chat.py,sha256=UwuhppwnlSs4fuv5D2uaugrl5lPpyvTkaHzWMnqR5E0,4497
23
23
  mlflow/azure/__init__.py,sha256=3B0PXyQj_3CAhvvMU-siUSDr9Qpf5q6s2PMIlyAwzVQ,737
24
24
  mlflow/azure/auth_handler.py,sha256=oIlzPdhuZcyg-sKowGLpinP0KJOFfsKrUnEKe0Mj5j8,9171
25
25
  mlflow/azure/client.py,sha256=dUaMFj04OLrlyvYSRTHXF4CaLHCGUdSzhjM5u8ucv8g,11509
26
- mlflow/azure/config.py,sha256=R86GuPP-yFT2UfKJr7VwhBNtx_o2QA-kvdlWQZwqzwM,4259
27
- mlflow/azure/connection_factory.py,sha256=VGrrtw3TUfpqGCiJGOclG4RcbXUsjBhE9_ybaA2eUjE,11676
26
+ mlflow/azure/config.py,sha256=0DwiEYN3TefmdaGO9KogNNflX_-0wOeHwKt2hMxKEdU,4491
27
+ mlflow/azure/connection_factory.py,sha256=1hcwPmc5xpP_MS1t3CIlzYfJ_mzEn2GBxnz5TJ1sHOY,12391
28
28
  mlflow/azure/exceptions.py,sha256=3jQo_kimK4g94LmSCtzfRQqEOl6bDBtwAQ6utXbgw8k,494
29
29
  mlflow/azure/stores.py,sha256=dlmdDVZRINgJw2wxzLhEsnAp1W76bR3NhQ0MftH9T74,12732
30
30
  mlflow/azure/utils.py,sha256=uU4OWU9ffz3KhLf0IgGqabZTTiAskLrNGVH5bIcwKUU,5563
@@ -527,7 +527,7 @@ mlflow/tracking/_model_registry/utils.py,sha256=0oyWU_iKleLVeEaWLb-glhkJlArKX0U3
527
527
  mlflow/tracking/_tracking_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
528
528
  mlflow/tracking/_tracking_service/client.py,sha256=wkFfP8r8vDA0YPGdE8q8DHn0LY-BeeWgxqWBnAqi_ug,36067
529
529
  mlflow/tracking/_tracking_service/registry.py,sha256=o_mi4_MN8Cp3WSnqVThZwABAsJJVBneZmxyqqQEQAeI,2419
530
- mlflow/tracking/_tracking_service/utils.py,sha256=ryY_fChkUrrBLMjGsjZc1IJ7SrKNWYPBDlm3VWHAZQs,9549
530
+ mlflow/tracking/_tracking_service/utils.py,sha256=yHUYcsPoVz2tz0OYeFJ2aKaGw66PTnLh48Yz4voXF0o,10256
531
531
  mlflow/tracking/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
532
532
  mlflow/tracking/context/abstract_context.py,sha256=OrlpO7gd_y2UP4pEpvwMKtfHI8XjtmPxO_2SujthUnI,1060
533
533
  mlflow/tracking/context/databricks_cluster_context.py,sha256=EORKG7JPBCnFv2Dupqd7FYgsTtwh4ZHB05T9W704IFI,520
@@ -641,8 +641,8 @@ mlflow/utils/autologging_utils/metrics_queue.py,sha256=bwpMX7Go6xFxrpYROi6rDBdVt
641
641
  mlflow/utils/autologging_utils/safety.py,sha256=IwbTbusyE87Hc4qkhhvMikoaZqX9kpr972FWS2B8goc,51465
642
642
  mlflow/utils/autologging_utils/versioning.py,sha256=2hSN4KXFWEJCcopDdLG6BiPeqSoqjETeNMuUBsCCwlI,3762
643
643
  mlflow/utils/import_hooks/__init__.py,sha256=werje98Woelkbwrhtlb8wmRdt3RtiL--LqGru7Xh3YU,13589
644
- genesis_flow-1.0.3.dist-info/METADATA,sha256=aNXjmAeUTG0TkJzMp0BF4CFNJgcpMw8yuMeFQ2Eyh90,33401
645
- genesis_flow-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
646
- genesis_flow-1.0.3.dist-info/entry_points.txt,sha256=fwlE6mYWea9uCNIsmXdT5qMIOZ8rYbTvO6XcZR8fBbE,495
647
- genesis_flow-1.0.3.dist-info/top_level.txt,sha256=wm8UqYyUHI21EvrTDHb3eYICy0dOVDLBhAL-jp5zbuI,7
648
- genesis_flow-1.0.3.dist-info/RECORD,,
644
+ genesis_flow-1.0.4.dist-info/METADATA,sha256=0ZYCp0XfX9xral_05JfSsI8gh0jXigpbeHEANiP2EIM,33401
645
+ genesis_flow-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
646
+ genesis_flow-1.0.4.dist-info/entry_points.txt,sha256=fwlE6mYWea9uCNIsmXdT5qMIOZ8rYbTvO6XcZR8fBbE,495
647
+ genesis_flow-1.0.4.dist-info/top_level.txt,sha256=wm8UqYyUHI21EvrTDHb3eYICy0dOVDLBhAL-jp5zbuI,7
648
+ genesis_flow-1.0.4.dist-info/RECORD,,
mlflow/azure/config.py CHANGED
@@ -84,13 +84,19 @@ class AzureAuthConfig:
84
84
  or os.getenv("MLFLOW_AZURE_DEBUG", "false").lower() == "true"
85
85
  )
86
86
 
87
- # Additional environment variable checks
88
- # Only override auth method if not explicitly set
89
- if (os.getenv("MLFLOW_POSTGRES_USE_MANAGED_IDENTITY", "false").lower() == "true" and
90
- auth_method is None and
91
- os.getenv("MLFLOW_AZURE_AUTH_METHOD") is None):
92
- self.auth_enabled = True
93
- self.auth_method = AuthMethod.MANAGED_IDENTITY
87
+ # IMPORTANT: Do not automatically enable Managed Identity based on other env vars
88
+ # The auth_enabled flag should be the single source of truth
89
+ # This prevents unintended authentication attempts when Helm hasn't enabled it
90
+
91
+ # Log configuration decision for debugging
92
+ import logging
93
+ logger = logging.getLogger(__name__)
94
+ logger.debug(
95
+ "AzureAuthConfig initialized: auth_enabled=%s, auth_method=%s, source=%s",
96
+ self.auth_enabled,
97
+ self.auth_method.value,
98
+ "explicit" if auth_enabled is not None else "env_var"
99
+ )
94
100
 
95
101
  # Validate configuration
96
102
  self._validate()
@@ -33,9 +33,10 @@ class ConnectionFactory:
33
33
  )
34
34
 
35
35
  logger.info(
36
- "Initialized connection factory: azure_auth_enabled=%s, auth_method=%s",
36
+ "Initialized connection factory: azure_auth_enabled=%s, auth_method=%s, auth_flag=%s",
37
37
  self.config.should_use_azure_auth,
38
38
  self.config.auth_method.value if self.config.should_use_azure_auth else "sql_auth",
39
+ self.config.auth_enabled,
39
40
  )
40
41
 
41
42
  def create_engine(
@@ -56,11 +57,23 @@ class ConnectionFactory:
56
57
  ConnectionError: If connection configuration fails
57
58
  ConfigurationError: If the URI is invalid
58
59
  """
60
+ # Check if auth_method is in URI
61
+ has_auth_method_param = "auth_method=" in database_uri
62
+
59
63
  logger.info(
60
- "Creating database engine: connection_info=%s, azure_auth=%s",
64
+ "Creating database engine: connection_info=%s, azure_auth=%s, has_auth_param=%s, auth_enabled_env=%s",
61
65
  sanitize_connection_string_for_logging(database_uri),
62
66
  self.config.should_use_azure_auth,
67
+ has_auth_method_param,
68
+ self.config.auth_enabled,
63
69
  )
70
+
71
+ # Warn if there's a mismatch between URI parameter and configuration
72
+ if has_auth_method_param and not self.config.should_use_azure_auth:
73
+ logger.warning(
74
+ "Database URI contains auth_method parameter but Azure authentication is not enabled. "
75
+ "The auth_method parameter will be ignored. Enable Azure authentication in Helm values to use Managed Identity."
76
+ )
64
77
 
65
78
  try:
66
79
  # Parse and validate the URI
@@ -138,15 +138,27 @@ def _get_file_store(store_uri, **_):
138
138
  def _get_sqlalchemy_store(store_uri, artifact_uri):
139
139
  from mlflow.store.tracking.sqlalchemy_store import SqlAlchemyStore
140
140
 
141
- # Check if this is a PostgreSQL URI that should use Managed Identity
142
- if store_uri.startswith("postgresql://") and (
143
- "auth_method=managed_identity" in store_uri or
144
- os.getenv("MLFLOW_POSTGRES_USE_MANAGED_IDENTITY", "").lower() == "true"
145
- ):
141
+ # Check if Azure authentication is explicitly enabled
142
+ azure_auth_enabled = os.getenv("MLFLOW_AZURE_AUTH_ENABLED", "false").lower() == "true"
143
+
144
+ # Only use Managed Identity if explicitly enabled through configuration
145
+ # This prevents automatic authentication attempts based on URI parameters alone
146
+ if store_uri.startswith("postgresql://") and azure_auth_enabled:
147
+ _logger.info(
148
+ "Azure authentication is enabled for PostgreSQL. Using Managed Identity store."
149
+ )
146
150
  from mlflow.store.tracking.postgres_managed_identity import get_postgres_store_with_managed_identity
147
151
  if artifact_uri is None:
148
152
  artifact_uri = DEFAULT_LOCAL_FILE_AND_ARTIFACT_PATH
149
153
  return get_postgres_store_with_managed_identity(store_uri, artifact_uri)
154
+
155
+ # Log if auth_method is in URI but Azure auth is not enabled
156
+ if store_uri.startswith("postgresql://") and "auth_method=managed_identity" in store_uri:
157
+ if not azure_auth_enabled:
158
+ _logger.warning(
159
+ "URI contains 'auth_method=managed_identity' but MLFLOW_AZURE_AUTH_ENABLED is not 'true'. "
160
+ "Using standard SQL authentication. To use Managed Identity, enable it in your Helm configuration."
161
+ )
150
162
 
151
163
  if artifact_uri is None:
152
164
  artifact_uri = DEFAULT_LOCAL_FILE_AND_ARTIFACT_PATH