cornflow 2.0.0rc1__tar.gz → 2.0.0rc2__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.
Files changed (189) hide show
  1. {cornflow-2.0.0rc1/cornflow.egg-info → cornflow-2.0.0rc2}/PKG-INFO +2 -2
  2. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/app.py +264 -239
  3. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/views.py +16 -2
  4. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/auth.py +6 -1
  5. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/const.py +1 -1
  6. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2/cornflow.egg-info}/PKG-INFO +2 -2
  7. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/requires.txt +1 -1
  8. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/requirements.txt +1 -1
  9. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/setup.py +1 -1
  10. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/MANIFEST.in +0 -0
  11. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/README.rst +0 -0
  12. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/__init__.py +0 -0
  13. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/airflow_local_settings.py +0 -0
  14. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/XCom/__init__.py +0 -0
  15. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/XCom/gce_xcom_backend.py +0 -0
  16. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/plugins/__init__.py +0 -0
  17. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/airflow_config/webserver_ldap.py +0 -0
  18. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/__init__.py +0 -0
  19. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/__init__.py +0 -0
  20. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/actions.py +0 -0
  21. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/arguments.py +0 -0
  22. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/config.py +0 -0
  23. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/migrations.py +0 -0
  24. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/permissions.py +0 -0
  25. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/roles.py +0 -0
  26. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/schemas.py +0 -0
  27. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/service.py +0 -0
  28. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/__init__.py +0 -0
  29. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/api_generator.py +0 -0
  30. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/endpoint_tools.py +0 -0
  31. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/models_tools.py +0 -0
  32. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/schema_generator.py +0 -0
  33. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/schemas_tools.py +0 -0
  34. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/tools/tools.py +0 -0
  35. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/users.py +0 -0
  36. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/utils.py +0 -0
  37. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/cli/views.py +0 -0
  38. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/__init__.py +0 -0
  39. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/access.py +0 -0
  40. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/actions.py +0 -0
  41. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/auxiliar.py +0 -0
  42. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/cleanup.py +0 -0
  43. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/dag.py +0 -0
  44. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/permissions.py +0 -0
  45. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/roles.py +0 -0
  46. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/schemas.py +0 -0
  47. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/commands/users.py +0 -0
  48. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/config.py +0 -0
  49. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/__init__.py +0 -0
  50. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/action.py +0 -0
  51. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/alarms.py +0 -0
  52. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/apiview.py +0 -0
  53. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/case.py +0 -0
  54. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/dag.py +0 -0
  55. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/data_check.py +0 -0
  56. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/example_data.py +0 -0
  57. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/execution.py +0 -0
  58. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/health.py +0 -0
  59. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/instance.py +0 -0
  60. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/licenses.py +0 -0
  61. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/login.py +0 -0
  62. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/main_alarms.py +0 -0
  63. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/meta_resource.py +0 -0
  64. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/permission.py +0 -0
  65. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/roles.py +0 -0
  66. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/schemas.py +0 -0
  67. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/signup.py +0 -0
  68. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/tables.py +0 -0
  69. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/token.py +0 -0
  70. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/user.py +0 -0
  71. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/endpoints/user_role.py +0 -0
  72. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/gunicorn.py +0 -0
  73. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/README +0 -0
  74. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/alembic.ini +0 -0
  75. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/env.py +0 -0
  76. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/script.py.mako +0 -0
  77. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/00757b557b02_.py +0 -0
  78. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/1af47a419bbd_.py +0 -0
  79. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/4aac5e0c6e66_.py +0 -0
  80. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/7c3ea5ab5501_.py +0 -0
  81. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/991b98e24225_.py +0 -0
  82. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/999b98e24225.py +0 -0
  83. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/a472b5ad50b7_.py +0 -0
  84. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/c2db9409cb5f_.py +0 -0
  85. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/c8a6c762e818_.py +0 -0
  86. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/ca449af8034c_.py +0 -0
  87. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/cef1df240b27_.py +0 -0
  88. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/d0e0700dcd8e_.py +0 -0
  89. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/d1b5be1f0549_.py +0 -0
  90. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/e1a50dae1ac9_.py +0 -0
  91. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/e937a5234ce4_.py +0 -0
  92. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/ebdd955fcc5e_.py +0 -0
  93. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/migrations/versions/f3bee20314a2_.py +0 -0
  94. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/__init__.py +0 -0
  95. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/action.py +0 -0
  96. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/alarms.py +0 -0
  97. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/base_data_model.py +0 -0
  98. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/case.py +0 -0
  99. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/dag.py +0 -0
  100. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/dag_permissions.py +0 -0
  101. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/execution.py +0 -0
  102. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/instance.py +0 -0
  103. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/main_alarms.py +0 -0
  104. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/meta_models.py +0 -0
  105. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/permissions.py +0 -0
  106. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/role.py +0 -0
  107. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/user.py +0 -0
  108. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/user_role.py +0 -0
  109. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/models/view.py +0 -0
  110. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/__init__.py +0 -0
  111. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/action.py +0 -0
  112. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/alarms.py +0 -0
  113. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/case.py +0 -0
  114. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/common.py +0 -0
  115. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/dag.py +0 -0
  116. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/example_data.py +0 -0
  117. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/execution.py +0 -0
  118. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/health.py +0 -0
  119. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/instance.py +0 -0
  120. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/main_alarms.py +0 -0
  121. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/model_json.py +0 -0
  122. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/patch.py +0 -0
  123. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/permissions.py +0 -0
  124. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/query.py +0 -0
  125. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/role.py +0 -0
  126. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/schemas.py +0 -0
  127. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/solution_log.py +0 -0
  128. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/tables.py +0 -0
  129. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/user.py +0 -0
  130. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/user_role.py +0 -0
  131. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/schemas/view.py +0 -0
  132. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/__init__.py +0 -0
  133. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/__init__.py +0 -0
  134. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/decorators.py +0 -0
  135. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/authentication/ldap.py +0 -0
  136. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/compress.py +0 -0
  137. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/email.py +0 -0
  138. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/exceptions.py +0 -0
  139. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/licenses.py +0 -0
  140. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/log_config.py +0 -0
  141. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/query_tools.py +0 -0
  142. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/utils.py +0 -0
  143. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/utils_tables.py +0 -0
  144. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/shared/validators.py +0 -0
  145. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/__init__.py +0 -0
  146. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/base_test_execution.py +0 -0
  147. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/const.py +0 -0
  148. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/custom_liveServer.py +0 -0
  149. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/custom_test_case.py +0 -0
  150. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/__init__.py +0 -0
  151. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/test_commands.py +0 -0
  152. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/integration/test_cornflowclient.py +0 -0
  153. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/ldap/__init__.py +0 -0
  154. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/ldap/test_ldap_authentication.py +0 -0
  155. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/__init__.py +0 -0
  156. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_actions.py +0 -0
  157. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_alarms.py +0 -0
  158. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_apiview.py +0 -0
  159. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_application.py +0 -0
  160. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_cases.py +0 -0
  161. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_cli.py +0 -0
  162. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_commands.py +0 -0
  163. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_dags.py +0 -0
  164. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_data_checks.py +0 -0
  165. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_example_data.py +0 -0
  166. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_executions.py +0 -0
  167. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_external_role_creation.py +0 -0
  168. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_generate_from_schema.py +0 -0
  169. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_get_resources.py +0 -0
  170. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_health.py +0 -0
  171. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_instances.py +0 -0
  172. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_instances_file.py +0 -0
  173. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_licenses.py +0 -0
  174. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_log_in.py +0 -0
  175. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_main_alarms.py +0 -0
  176. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_permissions.py +0 -0
  177. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_roles.py +0 -0
  178. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_schema_from_models.py +0 -0
  179. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_schemas.py +0 -0
  180. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_sign_up.py +0 -0
  181. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_tables.py +0 -0
  182. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_token.py +0 -0
  183. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/test_users.py +0 -0
  184. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow/tests/unit/tools.py +0 -0
  185. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/SOURCES.txt +0 -0
  186. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/dependency_links.txt +0 -0
  187. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/entry_points.txt +0 -0
  188. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/cornflow.egg-info/top_level.txt +0 -0
  189. {cornflow-2.0.0rc1 → cornflow-2.0.0rc2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cornflow
3
- Version: 2.0.0rc1
3
+ Version: 2.0.0rc2
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.0rc1
17
+ Requires-Dist: cornflow-client==2.0.0rc2
18
18
  Requires-Dist: cryptography==46.0.5
19
19
  Requires-Dist: disposable-email-domains==0.0.162
20
20
  Requires-Dist: Flask==2.3.2
@@ -1,239 +1,264 @@
1
- """
2
- Main file with the creation of the app logic
3
- """
4
-
5
- # Full imports
6
- import os
7
- from logging.config import dictConfig
8
-
9
- import click
10
-
11
- # Partial imports
12
- from flask import Flask
13
- from flask.cli import with_appcontext
14
- from flask_apispec.extension import FlaskApiSpec
15
- from flask_cors import CORS
16
- from flask_migrate import Migrate
17
- from flask_restful import Api
18
- from werkzeug.exceptions import NotFound
19
- from werkzeug.middleware.dispatcher import DispatcherMiddleware
20
-
21
- # Module imports
22
- from cornflow.commands import (
23
- create_service_user_command,
24
- create_admin_user_command,
25
- create_planner_user_command,
26
- register_roles_command,
27
- register_actions_command,
28
- register_views_command,
29
- register_base_permissions_command,
30
- access_init_command,
31
- register_deployed_dags_command,
32
- register_dag_permissions_command,
33
- )
34
- from cornflow.config import app_config
35
- from cornflow.endpoints import resources, alarms_resources
36
- from cornflow.endpoints.login import LoginEndpoint, LoginOpenAuthEndpoint
37
- from cornflow.endpoints.signup import SignUpEndpoint
38
- from cornflow.shared import db, bcrypt
39
- from cornflow.shared.compress import init_compress
40
- from cornflow.shared.const import (
41
- AUTH_DB,
42
- AUTH_LDAP,
43
- AUTH_OID,
44
- CONDITIONAL_ENDPOINTS,
45
- SIGNUP_WITH_AUTH,
46
- SIGNUP_WITH_NO_AUTH,
47
- )
48
- from cornflow.shared.exceptions import initialize_errorhandlers, ConfigurationError
49
- from cornflow.shared.log_config import log_config
50
-
51
-
52
- def create_app(env_name="development", dataconn=None):
53
- """
54
-
55
- :param str env_name: 'testing' or 'development' or 'production'
56
- :param str dataconn: string to connect to the database
57
- :return: the application that is going to be running :class:`Flask`
58
- :rtype: :class:`Flask`
59
- """
60
- dictConfig(log_config(app_config[env_name].LOG_LEVEL))
61
-
62
- # Note: Explicit CSRF protection is not configured as the application uses
63
- # JWT for authentication via headers, mitigating standard CSRF vulnerabilities.
64
- app = Flask(__name__)
65
- app.json.sort_keys = False
66
- app.logger.setLevel(app_config[env_name].LOG_LEVEL)
67
-
68
- app.config.from_object(app_config[env_name])
69
- # initialization for init_cornflow_service.py
70
- if dataconn is not None:
71
- app.config["SQLALCHEMY_DATABASE_URI"] = dataconn
72
- CORS(app)
73
- bcrypt.init_app(app)
74
- db.init_app(app)
75
- Migrate(app=app, db=db)
76
-
77
- if "sqlite" in app.config["SQLALCHEMY_DATABASE_URI"]:
78
-
79
- def _fk_pragma_on_connect(dbapi_con, _con_record):
80
- dbapi_con.execute("pragma foreign_keys=ON")
81
-
82
- with app.app_context():
83
- from sqlalchemy import event
84
-
85
- event.listen(db.engine, "connect", _fk_pragma_on_connect)
86
-
87
- api = Api(app)
88
- for res in resources:
89
- api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
90
- if app.config["ALARMS_ENDPOINTS"]:
91
- for res in alarms_resources:
92
- api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
93
-
94
- docs = FlaskApiSpec(app)
95
- for res in resources:
96
- docs.register(target=res["resource"], endpoint=res["endpoint"])
97
- if app.config["ALARMS_ENDPOINTS"]:
98
- for res in alarms_resources:
99
- docs.register(target=res["resource"], endpoint=res["endpoint"])
100
-
101
- # Resource for the log-in
102
- auth_type = app.config["AUTH_TYPE"]
103
-
104
- if auth_type == AUTH_DB:
105
- signup_activated = int(app.config["SIGNUP_ACTIVATED"])
106
- if signup_activated in [SIGNUP_WITH_AUTH, SIGNUP_WITH_NO_AUTH]:
107
- api.add_resource(
108
- SignUpEndpoint, CONDITIONAL_ENDPOINTS["signup"], endpoint="signup"
109
- )
110
- api.add_resource(
111
- LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
112
- )
113
- elif auth_type == AUTH_LDAP:
114
- api.add_resource(
115
- LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
116
- )
117
- elif auth_type == AUTH_OID:
118
- api.add_resource(
119
- LoginOpenAuthEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
120
- )
121
- else:
122
- raise ConfigurationError(
123
- error="Invalid authentication type",
124
- log_txt="Error while configuring authentication. The authentication type is not valid.",
125
- )
126
-
127
- initialize_errorhandlers(app)
128
- init_compress(app)
129
-
130
- app.cli.add_command(create_service_user)
131
- app.cli.add_command(create_admin_user)
132
- app.cli.add_command(register_roles)
133
- app.cli.add_command(create_base_user)
134
- app.cli.add_command(register_actions)
135
- app.cli.add_command(register_views)
136
- app.cli.add_command(register_base_assignations)
137
- app.cli.add_command(access_init)
138
- app.cli.add_command(register_deployed_dags)
139
- app.cli.add_command(register_dag_permissions)
140
-
141
- if app.config["APPLICATION_ROOT"] != "/" and app.config["EXTERNAL_APP"] == 0:
142
- app.wsgi_app = DispatcherMiddleware(
143
- NotFound(), {app.config["APPLICATION_ROOT"]: app.wsgi_app}
144
- )
145
-
146
- from importlib.metadata import entry_points
147
- for ep in entry_points(group="cornflow.plugins"):
148
- ep.load()().init_app(app)
149
-
150
- return app
151
-
152
-
153
- @click.command("create_service_user")
154
- @click.option("-u", "--username", required=True, type=str)
155
- @click.option("-e", "--email", required=True, type=str)
156
- @click.option("-p", "--password", required=True, type=str)
157
- @click.option("-v", "--verbose", is_flag=True, default=False)
158
- @with_appcontext
159
- def create_service_user(username, email, password, verbose):
160
- create_service_user_command(username, email, password, verbose)
161
-
162
-
163
- @click.command("create_admin_user")
164
- @click.option("-u", "--username", required=True, type=str)
165
- @click.option("-e", "--email", required=True, type=str)
166
- @click.option("-p", "--password", required=True, type=str)
167
- @click.option("-v", "--verbose", is_flag=True, default=False)
168
- @with_appcontext
169
- def create_admin_user(username, email, password, verbose):
170
- create_admin_user_command(username, email, password, verbose)
171
-
172
-
173
- @click.command("create_base_user")
174
- @click.option("-u", "--username", required=True, type=str)
175
- @click.option("-e", "--email", required=True, type=str)
176
- @click.option("-p", "--password", required=True, type=str)
177
- @click.option("-v", "--verbose", is_flag=True, default=False)
178
- @with_appcontext
179
- def create_base_user(username, email, password, verbose):
180
- create_planner_user_command(username, email, password, verbose)
181
-
182
-
183
- @click.command("register_roles")
184
- @click.option("-v", "--verbose", is_flag=True, default=False)
185
- @with_appcontext
186
- def register_roles(verbose):
187
- register_roles_command(verbose=verbose)
188
-
189
-
190
- @click.command("register_actions")
191
- @click.option("-v", "--verbose", is_flag=True, default=False)
192
- @with_appcontext
193
- def register_actions(verbose):
194
- register_actions_command(verbose)
195
-
196
-
197
- @click.command("register_views")
198
- @click.option("-v", "--verbose", is_flag=True, default=False)
199
- @with_appcontext
200
- def register_views(verbose):
201
- register_views_command(verbose=verbose)
202
-
203
-
204
- @click.command("register_base_assignations")
205
- @click.option("-v", "--verbose", is_flag=True, default=False)
206
- @with_appcontext
207
- def register_base_assignations(verbose):
208
- register_base_permissions_command(verbose=verbose)
209
-
210
-
211
- @click.command("access_init")
212
- @click.option("-v", "--verbose", is_flag=True, default=False)
213
- @with_appcontext
214
- def access_init(verbose):
215
- access_init_command(verbose=verbose)
216
-
217
-
218
- @click.command("register_deployed_dags")
219
- @click.option("-r", "--url", type=str)
220
- @click.option("-u", "--username", type=str)
221
- @click.option("-p", "--password", type=str)
222
- @click.option("-v", "--verbose", is_flag=True, default=False)
223
- @with_appcontext
224
- def register_deployed_dags(url, username, password, verbose):
225
- register_deployed_dags_command(url, username, password, verbose)
226
-
227
-
228
- @click.command("register_dag_permissions")
229
- @click.option("-o", "--open_deployment", default=0, type=int)
230
- @click.option("-v", "--verbose", is_flag=True, default=False)
231
- @with_appcontext
232
- def register_dag_permissions(open_deployment, verbose):
233
- register_dag_permissions_command(open_deployment=open_deployment, verbose=verbose)
234
-
235
-
236
- if __name__ == "__main__":
237
- environment_name = os.getenv("FLASK_ENV", "development")
238
- flask_app = create_app(environment_name)
239
- flask_app.run()
1
+ """
2
+ Main file with the creation of the app logic
3
+ """
4
+
5
+ # Full imports
6
+ import os
7
+ from logging.config import dictConfig
8
+
9
+ import click
10
+
11
+ # Partial imports
12
+ from flask import Flask, Blueprint
13
+ from flask.cli import with_appcontext
14
+ from flask_apispec.extension import FlaskApiSpec
15
+ from flask_cors import CORS
16
+ from flask_migrate import Migrate
17
+ from flask_restful import Api
18
+ from werkzeug.exceptions import NotFound
19
+ from werkzeug.middleware.dispatcher import DispatcherMiddleware
20
+
21
+ # Module imports
22
+ from cornflow.commands import (
23
+ create_service_user_command,
24
+ create_admin_user_command,
25
+ create_planner_user_command,
26
+ register_roles_command,
27
+ register_actions_command,
28
+ register_views_command,
29
+ register_base_permissions_command,
30
+ access_init_command,
31
+ register_deployed_dags_command,
32
+ register_dag_permissions_command,
33
+ )
34
+ from cornflow.config import app_config
35
+ from cornflow.endpoints import resources, alarms_resources
36
+ from cornflow.endpoints.login import LoginEndpoint, LoginOpenAuthEndpoint
37
+ from cornflow.endpoints.signup import SignUpEndpoint
38
+ from cornflow.shared import db, bcrypt
39
+ from cornflow.shared.compress import init_compress
40
+ from cornflow.shared.const import (
41
+ AUTH_DB,
42
+ AUTH_LDAP,
43
+ AUTH_OID,
44
+ CONDITIONAL_ENDPOINTS,
45
+ SIGNUP_WITH_AUTH,
46
+ SIGNUP_WITH_NO_AUTH,
47
+ )
48
+ from cornflow.shared.exceptions import initialize_errorhandlers, ConfigurationError
49
+ from cornflow.shared.log_config import log_config
50
+
51
+
52
+ def create_app(env_name="development", dataconn=None):
53
+ """
54
+
55
+ :param str env_name: 'testing' or 'development' or 'production'
56
+ :param str dataconn: string to connect to the database
57
+ :return: the application that is going to be running :class:`Flask`
58
+ :rtype: :class:`Flask`
59
+ """
60
+ dictConfig(log_config(app_config[env_name].LOG_LEVEL))
61
+
62
+ # Note: Explicit CSRF protection is not configured as the application uses
63
+ # JWT for authentication via headers, mitigating standard CSRF vulnerabilities.
64
+ app = Flask(__name__)
65
+ app.json.sort_keys = False
66
+ app.logger.setLevel(app_config[env_name].LOG_LEVEL)
67
+
68
+ app.config.from_object(app_config[env_name])
69
+ # initialization for init_cornflow_service.py
70
+ if dataconn is not None:
71
+ app.config["SQLALCHEMY_DATABASE_URI"] = dataconn
72
+ CORS(app)
73
+ bcrypt.init_app(app)
74
+ db.init_app(app)
75
+ Migrate(app=app, db=db)
76
+
77
+ if "sqlite" in app.config["SQLALCHEMY_DATABASE_URI"]:
78
+
79
+ def _fk_pragma_on_connect(dbapi_con, _con_record):
80
+ dbapi_con.execute("pragma foreign_keys=ON")
81
+
82
+ with app.app_context():
83
+ from sqlalchemy import event
84
+
85
+ event.listen(db.engine, "connect", _fk_pragma_on_connect)
86
+
87
+ # Rutas del Core bajo /cornflow/ via Blueprint (URLs canónicas)
88
+ cornflow_bp = Blueprint("cornflow", __name__, url_prefix="/cornflow")
89
+ api = Api(cornflow_bp)
90
+ for res in resources:
91
+ api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
92
+ if app.config["ALARMS_ENDPOINTS"]:
93
+ for res in alarms_resources:
94
+ api.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"])
95
+
96
+ # Resource for the log-in
97
+ auth_type = app.config["AUTH_TYPE"]
98
+
99
+ if auth_type == AUTH_DB:
100
+ signup_activated = int(app.config["SIGNUP_ACTIVATED"])
101
+ if signup_activated in [SIGNUP_WITH_AUTH, SIGNUP_WITH_NO_AUTH]:
102
+ api.add_resource(
103
+ SignUpEndpoint, CONDITIONAL_ENDPOINTS["signup"], endpoint="signup"
104
+ )
105
+ api.add_resource(
106
+ LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
107
+ )
108
+ elif auth_type == AUTH_LDAP:
109
+ api.add_resource(
110
+ LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
111
+ )
112
+ elif auth_type == AUTH_OID:
113
+ api.add_resource(
114
+ LoginOpenAuthEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login"
115
+ )
116
+ else:
117
+ raise ConfigurationError(
118
+ error="Invalid authentication type",
119
+ log_txt="Error while configuring authentication. The authentication type is not valid.",
120
+ )
121
+
122
+ app.register_blueprint(cornflow_bp)
123
+
124
+ # Alias de compatibilidad: mismas rutas sin prefijo (URLs legacy)
125
+ api_compat = Api(app)
126
+ for res in resources:
127
+ api_compat.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"] + "_compat")
128
+ if app.config["ALARMS_ENDPOINTS"]:
129
+ for res in alarms_resources:
130
+ api_compat.add_resource(res["resource"], res["urls"], endpoint=res["endpoint"] + "_compat")
131
+ if auth_type == AUTH_DB:
132
+ _signup_activated = int(app.config["SIGNUP_ACTIVATED"])
133
+ if _signup_activated in [SIGNUP_WITH_AUTH, SIGNUP_WITH_NO_AUTH]:
134
+ api_compat.add_resource(SignUpEndpoint, CONDITIONAL_ENDPOINTS["signup"], endpoint="signup_compat")
135
+ api_compat.add_resource(LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
136
+ elif auth_type == AUTH_LDAP:
137
+ api_compat.add_resource(LoginEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
138
+ elif auth_type == AUTH_OID:
139
+ api_compat.add_resource(LoginOpenAuthEndpoint, CONDITIONAL_ENDPOINTS["login"], endpoint="login_compat")
140
+
141
+ docs = FlaskApiSpec(app)
142
+ for res in resources:
143
+ docs.register(target=res["resource"], endpoint=res["endpoint"], blueprint="cornflow")
144
+ if app.config["ALARMS_ENDPOINTS"]:
145
+ for res in alarms_resources:
146
+ docs.register(target=res["resource"], endpoint=res["endpoint"], blueprint="cornflow")
147
+
148
+ initialize_errorhandlers(app)
149
+ init_compress(app)
150
+
151
+ app.cli.add_command(create_service_user)
152
+ app.cli.add_command(create_admin_user)
153
+ app.cli.add_command(register_roles)
154
+ app.cli.add_command(create_base_user)
155
+ app.cli.add_command(register_actions)
156
+ app.cli.add_command(register_views)
157
+ app.cli.add_command(register_base_assignations)
158
+ app.cli.add_command(access_init)
159
+ app.cli.add_command(register_deployed_dags)
160
+ app.cli.add_command(register_dag_permissions)
161
+
162
+ if int(app.config["EXTERNAL_APP"]) == 1:
163
+ # Legacy mode: DispatcherMiddleware mounts cornflow under APPLICATION_ROOT.
164
+ # The external app is responsible for combining both apps via wsgi.py.
165
+ if app.config["APPLICATION_ROOT"] != "/":
166
+ app.wsgi_app = DispatcherMiddleware(
167
+ NotFound(), {app.config["APPLICATION_ROOT"]: app.wsgi_app}
168
+ )
169
+ else:
170
+ # Plugin mode: autodiscover and mount plugins registered under cornflow.plugins.
171
+ from importlib.metadata import entry_points
172
+ for ep in entry_points(group="cornflow.plugins"):
173
+ ep.load()().init_app(app)
174
+
175
+ return app
176
+
177
+
178
+ @click.command("create_service_user")
179
+ @click.option("-u", "--username", required=True, type=str)
180
+ @click.option("-e", "--email", required=True, type=str)
181
+ @click.option("-p", "--password", required=True, type=str)
182
+ @click.option("-v", "--verbose", is_flag=True, default=False)
183
+ @with_appcontext
184
+ def create_service_user(username, email, password, verbose):
185
+ create_service_user_command(username, email, password, verbose)
186
+
187
+
188
+ @click.command("create_admin_user")
189
+ @click.option("-u", "--username", required=True, type=str)
190
+ @click.option("-e", "--email", required=True, type=str)
191
+ @click.option("-p", "--password", required=True, type=str)
192
+ @click.option("-v", "--verbose", is_flag=True, default=False)
193
+ @with_appcontext
194
+ def create_admin_user(username, email, password, verbose):
195
+ create_admin_user_command(username, email, password, verbose)
196
+
197
+
198
+ @click.command("create_base_user")
199
+ @click.option("-u", "--username", required=True, type=str)
200
+ @click.option("-e", "--email", required=True, type=str)
201
+ @click.option("-p", "--password", required=True, type=str)
202
+ @click.option("-v", "--verbose", is_flag=True, default=False)
203
+ @with_appcontext
204
+ def create_base_user(username, email, password, verbose):
205
+ create_planner_user_command(username, email, password, verbose)
206
+
207
+
208
+ @click.command("register_roles")
209
+ @click.option("-v", "--verbose", is_flag=True, default=False)
210
+ @with_appcontext
211
+ def register_roles(verbose):
212
+ register_roles_command(verbose=verbose)
213
+
214
+
215
+ @click.command("register_actions")
216
+ @click.option("-v", "--verbose", is_flag=True, default=False)
217
+ @with_appcontext
218
+ def register_actions(verbose):
219
+ register_actions_command(verbose)
220
+
221
+
222
+ @click.command("register_views")
223
+ @click.option("-v", "--verbose", is_flag=True, default=False)
224
+ @with_appcontext
225
+ def register_views(verbose):
226
+ register_views_command(verbose=verbose)
227
+
228
+
229
+ @click.command("register_base_assignations")
230
+ @click.option("-v", "--verbose", is_flag=True, default=False)
231
+ @with_appcontext
232
+ def register_base_assignations(verbose):
233
+ register_base_permissions_command(verbose=verbose)
234
+
235
+
236
+ @click.command("access_init")
237
+ @click.option("-v", "--verbose", is_flag=True, default=False)
238
+ @with_appcontext
239
+ def access_init(verbose):
240
+ access_init_command(verbose=verbose)
241
+
242
+
243
+ @click.command("register_deployed_dags")
244
+ @click.option("-r", "--url", type=str)
245
+ @click.option("-u", "--username", type=str)
246
+ @click.option("-p", "--password", type=str)
247
+ @click.option("-v", "--verbose", is_flag=True, default=False)
248
+ @with_appcontext
249
+ def register_deployed_dags(url, username, password, verbose):
250
+ register_deployed_dags_command(url, username, password, verbose)
251
+
252
+
253
+ @click.command("register_dag_permissions")
254
+ @click.option("-o", "--open_deployment", default=0, type=int)
255
+ @click.option("-v", "--verbose", is_flag=True, default=False)
256
+ @with_appcontext
257
+ def register_dag_permissions(open_deployment, verbose):
258
+ register_dag_permissions_command(open_deployment=open_deployment, verbose=verbose)
259
+
260
+
261
+ if __name__ == "__main__":
262
+ environment_name = os.getenv("FLASK_ENV", "development")
263
+ flask_app = create_app(environment_name)
264
+ flask_app.run()
@@ -120,6 +120,20 @@ def get_views_to_update(
120
120
  ]
121
121
 
122
122
 
123
+ def _get_url_from_map(endpoint):
124
+ """Return the real URL rule from Flask's URL map (includes Blueprint prefix)."""
125
+ try:
126
+ rules_map = current_app.url_map._rules_by_endpoint
127
+ # Try exact match first, then with blueprint prefix (e.g. "cornflow.instance")
128
+ for key in (endpoint, f"cornflow.{endpoint}"):
129
+ rules = list(rules_map.get(key, []))
130
+ if rules:
131
+ return rules[0].rule
132
+ except Exception:
133
+ pass
134
+ return None
135
+
136
+
123
137
  def get_views_to_update_and_delete(
124
138
  resources_to_register, views_registered_urls_all_attributes
125
139
  ):
@@ -130,7 +144,7 @@ def get_views_to_update_and_delete(
130
144
  """
131
145
  all_resources_to_register_views_endpoints = {
132
146
  view["endpoint"]: {
133
- "url_rule": view["urls"],
147
+ "url_rule": _get_url_from_map(view["endpoint"]) or view["urls"],
134
148
  "description": view["resource"].DESCRIPTION,
135
149
  }
136
150
  for view in resources_to_register
@@ -157,7 +171,7 @@ def get_views_to_register(resources_to_register, views_registered_urls_all_attri
157
171
  ViewModel(
158
172
  {
159
173
  "name": view["endpoint"],
160
- "url_rule": view["urls"],
174
+ "url_rule": _get_url_from_map(view["endpoint"]) or view["urls"],
161
175
  "description": view["resource"].DESCRIPTION,
162
176
  }
163
177
  )
@@ -403,8 +403,13 @@ class Auth:
403
403
  )
404
404
 
405
405
  action_id = PERMISSION_METHOD_MAP[method]
406
+ # Try the URL as-is first; if not found try with /cornflow/ prefix for
407
+ # requests arriving via the legacy (unprefixed) routes.
408
+ view = ViewModel.query.filter_by(url_rule=url).first()
409
+ if view is None and not url.startswith("/cornflow/"):
410
+ view = ViewModel.query.filter_by(url_rule="/cornflow" + url).first()
406
411
  try:
407
- view_id = ViewModel.query.filter_by(url_rule=url).first().id
412
+ view_id = view.id
408
413
  except AttributeError:
409
414
  current_app.logger.error(
410
415
  "The permission for this endpoint is not in the database."
@@ -7,7 +7,7 @@ AIRFLOW_BACKEND = 1
7
7
  DATABRICKS_BACKEND = 2
8
8
 
9
9
 
10
- CORNFLOW_VERSION = "2.0.0rc1"
10
+ CORNFLOW_VERSION = "2.0.0rc2"
11
11
  INTERNAL_TOKEN_ISSUER = "cornflow"
12
12
 
13
13
  # endpoints responses for health check
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cornflow
3
- Version: 2.0.0rc1
3
+ Version: 2.0.0rc2
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.0rc1
17
+ Requires-Dist: cornflow-client==2.0.0rc2
18
18
  Requires-Dist: cryptography==46.0.5
19
19
  Requires-Dist: disposable-email-domains==0.0.162
20
20
  Requires-Dist: Flask==2.3.2
@@ -2,7 +2,7 @@ alembic==1.9.2
2
2
  apispec==6.3.0
3
3
  cachetools==5.3.3
4
4
  click==8.1.7
5
- cornflow-client==2.0.0rc1
5
+ cornflow-client==2.0.0rc2
6
6
  cryptography==46.0.5
7
7
  disposable-email-domains==0.0.162
8
8
  Flask==2.3.2
@@ -2,7 +2,7 @@ alembic==1.9.2
2
2
  apispec==6.3.0
3
3
  cachetools==5.3.3
4
4
  click==8.1.7
5
- cornflow-client==2.0.0rc1
5
+ cornflow-client==2.0.0rc2
6
6
  cryptography==46.0.5
7
7
  disposable-email-domains==0.0.162
8
8
  Flask==2.3.2
@@ -9,7 +9,7 @@ with open("requirements.txt", "r") as fh:
9
9
 
10
10
  setuptools.setup(
11
11
  name="cornflow",
12
- version="2.0.0rc1",
12
+ version="2.0.0rc2",
13
13
  author="baobab soluciones",
14
14
  author_email="cornflow@baobabsoluciones.es",
15
15
  description="cornflow is an open source multi-solver optimization server with a REST API built using flask.",
File without changes
File without changes