cornflow 2.0.0a19__py3-none-any.whl → 2.0.0a21__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.
@@ -175,9 +175,11 @@ class ExecutionEndpoint(BaseMetaResource):
175
175
  f"{AIRFLOW_ERROR_MSG} {err}"
176
176
  )
177
177
  continue
178
-
179
- data = response.json()
180
- state = self.orch_to_state_map.get(data["state"], EXEC_STATE_UNKNOWN)
178
+ if self.orch_type == DATABRICKS_BACKEND:
179
+ state = self.orch_to_state_map.get(response, EXEC_STATE_UNKNOWN)
180
+ else:
181
+ data = response.json()
182
+ state = self.orch_to_state_map.get(data["state"], EXEC_STATE_UNKNOWN)
181
183
  execution.update_state(state)
182
184
 
183
185
  return executions
@@ -300,7 +300,18 @@ class Auth:
300
300
  :rtype: dict
301
301
  """
302
302
  # Fetch keys from provider
303
- jwks_url = f"{provider_url.rstrip('/')}/.well-known/jwks.json"
303
+ # For Azure AD, we need to use the discovery endpoint to get the jwks_uri
304
+ if "microsoftonline.com" in provider_url:
305
+ tenant_id = provider_url.split("/")[
306
+ 3
307
+ ] # Extract tenant ID from provider URL
308
+ jwks_url = (
309
+ f"https://login.microsoftonline.com/{tenant_id}/discovery/v2.0/keys"
310
+ )
311
+ else:
312
+ # For other providers, use the standard well-known endpoint
313
+ jwks_url = f"{provider_url.rstrip('/')}/.well-known/jwks.json"
314
+
304
315
  try:
305
316
  response = requests.get(jwks_url)
306
317
  response.raise_for_status()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cornflow
3
- Version: 2.0.0a19
3
+ Version: 2.0.0a21
4
4
  Summary: cornflow is an open source multi-solver optimization server with a REST API built using flask.
5
5
  Home-page: https://github.com/baobabsoluciones/cornflow
6
6
  Author: baobab soluciones
@@ -14,7 +14,7 @@ Requires-Dist: alembic==1.9.2
14
14
  Requires-Dist: apispec<=6.3.0
15
15
  Requires-Dist: cachetools==5.3.3
16
16
  Requires-Dist: click<=8.1.7
17
- Requires-Dist: cornflow-client==2.0.0a19
17
+ Requires-Dist: cornflow-client==2.0.0a21
18
18
  Requires-Dist: cryptography<=44.0.1
19
19
  Requires-Dist: databricks-sdk==0.29.0
20
20
  Requires-Dist: disposable-email-domains>=0.0.86
@@ -46,7 +46,7 @@ cornflow/endpoints/case.py,sha256=7mopDXp8RJzOcEvokvTGhT5YYGl2gZlhKry5K8DNya4,18
46
46
  cornflow/endpoints/dag.py,sha256=nPBPQVxGzz7BrBFM_w-I2GYNW0wuhQte5lqnAeC6Szg,10092
47
47
  cornflow/endpoints/data_check.py,sha256=rSq_AxEF7mCArIkRkhtkUIO5ZRb85j6Np3eFOEM0Kag,13588
48
48
  cornflow/endpoints/example_data.py,sha256=OgTlUCcI5SiofaWvhMQ2ivVLQJxBVvekfToFJxEpsqo,4429
49
- cornflow/endpoints/execution.py,sha256=CjnzXYJtVzksX4Ko7p1FwwIwE12JdBiDGQpz5i3cGlo,37314
49
+ cornflow/endpoints/execution.py,sha256=Cq10cX48ANgFyDzw67RXKQ6r6rLUecbuDdpdfRc7p5s,37473
50
50
  cornflow/endpoints/health.py,sha256=xdFwPEg1dJ5xOdFA0f5HiHV0HHWEq6pSWdEVjEx2ZIA,2538
51
51
  cornflow/endpoints/instance.py,sha256=3iy0NngmR6tSb7FcaWNq53VmNpl0JZ-voCtnUg9uyzc,12743
52
52
  cornflow/endpoints/licenses.py,sha256=82hHWGYvVIiyw9mlwGtMwJMDJ-ShHOi9rvuM6KvfE4U,873
@@ -133,7 +133,7 @@ cornflow/shared/utils.py,sha256=g2ZsD3SwsqIHXZ7GWVAVB0F9gX7mT9dQkPgR2Ahsh6M,860
133
133
  cornflow/shared/utils_tables.py,sha256=JnyaQ-5d1alj230nir-6elC2i0QX-u-_32SAs2eDtC0,3298
134
134
  cornflow/shared/validators.py,sha256=Iy2jaGzS9ojqlTE_-vKH4oQKD89GN5C0EPEZMg6UZgc,4761
135
135
  cornflow/shared/authentication/__init__.py,sha256=cJIChk5X6hbA_16usEvfHr8g4JDFI6WKo0GPVOOiYHA,137
136
- cornflow/shared/authentication/auth.py,sha256=Am4981BchXnwGCUaBg6DlG50TDaT-900KAQ8V-F6umE,18220
136
+ cornflow/shared/authentication/auth.py,sha256=5YKZKC9XY77JYeCkDTKVMl1-pQ71wmKjTB9TCDIDYaM,18687
137
137
  cornflow/shared/authentication/decorators.py,sha256=_QpwOU1kYzpaK85Dl0Btdj5hG8Ps47PFgySp_gqhlgk,1276
138
138
  cornflow/shared/authentication/ldap.py,sha256=QfdC2X_ZMcIJabKC5pYWDGMhS5pIOJJvdZXuuiruq-M,4853
139
139
  cornflow/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -173,8 +173,8 @@ cornflow/tests/unit/test_tables.py,sha256=SW_K8LRLwR1nB0uH8CPQCjeN8Gei-TasAgkOin
173
173
  cornflow/tests/unit/test_token.py,sha256=PZ11b46UCQpCESsRiAPhpgWkGAsAwKCVNxVQai_kxXM,4199
174
174
  cornflow/tests/unit/test_users.py,sha256=N5tcF5nSncD0F_ZlBxGuS87p6kNS4hUzRLr3_AcnK-o,22802
175
175
  cornflow/tests/unit/tools.py,sha256=5LuIWqQ4dvnnWn1NiOtDJstRmwGIFRFy7GBFOdnqFEU,3752
176
- cornflow-2.0.0a19.dist-info/METADATA,sha256=mfRUrpOyl6Bcvj6_wW9zViygEvoYgjnGgmoNMJO0Ccg,9571
177
- cornflow-2.0.0a19.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
178
- cornflow-2.0.0a19.dist-info/entry_points.txt,sha256=q9cPKAFBsmHkERCqQ2JcOTM-tVBLHTl-DGxwCXowAWM,46
179
- cornflow-2.0.0a19.dist-info/top_level.txt,sha256=Qj9kLFJW1PLb-ZV2s_aCkQ-Wi5W6KC6fFR-LTBrx-rU,24
180
- cornflow-2.0.0a19.dist-info/RECORD,,
176
+ cornflow-2.0.0a21.dist-info/METADATA,sha256=HjxkwiSmpOWIwhjJiKxXf50Ccd_e1fOH1Jiv6xdvwI8,9571
177
+ cornflow-2.0.0a21.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
178
+ cornflow-2.0.0a21.dist-info/entry_points.txt,sha256=q9cPKAFBsmHkERCqQ2JcOTM-tVBLHTl-DGxwCXowAWM,46
179
+ cornflow-2.0.0a21.dist-info/top_level.txt,sha256=Qj9kLFJW1PLb-ZV2s_aCkQ-Wi5W6KC6fFR-LTBrx-rU,24
180
+ cornflow-2.0.0a21.dist-info/RECORD,,