Skip to content

Commit

Permalink
Release/v1.1.1 (#556)
Browse files Browse the repository at this point in the history
* Change the word problem for the better term 'issue' also wrote about a new issue on the scheduler logs (#544)

* Feature/workflows (#552)

* Changed branch name on the workflow files

* Fixed cornflow-dags requirements

* add AIRFLOW_HOME env variable (#551)

if not, airflow initializes in the user's root directory

Co-authored-by: Guillermo González-Santander de la Cruz <[email protected]>

* Modified codecov config file and coverage configuration file (#553)

* Modified codecov config file and coverage configuration file

* Updated more coverage configuration files

* Bump requests version due to securty reasons (#549)

* move pulp to version 2.9.0 (#550)

* move pulp to version 2.9.0

there are fixes and improvements for the HiGHS_CMD interface.

* we need to change the library version of all references to pulp

---------

Co-authored-by: Guillermo González-Santander de la Cruz <[email protected]>

* Bump versions

* Updated flask cors due to security reasons (#557)

---------

Co-authored-by: Daniel <[email protected]>
Co-authored-by: Franco Peschiera <[email protected]>
  • Loading branch information
3 people authored Sep 18, 2024
1 parent cc7ba3d commit 55a1710
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test_cornflow_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ on:
push:
branches:
- master
- development
- develop
paths:
- 'libs/client/**'
- '.github/workflows/test_cornflow_client.yml'
- '!libs/client/README.rst'
- '!libs/client/setup.py'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_cornflow_dags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ on:
push:
branches:
- master
- development
- develop
paths:
- 'cornflow-dags/**'
- '.github/workflows/test_cornflow_dags.yml'
- '!cornflow-dags/README.rst'

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_cornflow_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ on:
push:
branches:
- master
- development
- develop
paths:
- 'cornflow-server/**'
- '.github/workflows/test_cornflow_server.yml'
- '!cornflow-server/docs/**'
- '!cornflow-server/README.rst'

Expand Down
2 changes: 2 additions & 0 deletions cornflow-dags/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[run]
branch = True

omit =
*/tests/*

Expand Down
3 changes: 2 additions & 1 deletion cornflow-dags/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cornflow-client>=1.1.0
orloge<=0.17.2
PuLP<=2.7
PuLP<=2.9.0
pandas<=2.1.1
hackathonbaobab2020[solvers]
pytups<=0.86.2
Expand All @@ -9,3 +9,4 @@ xmltodict<=0.13.0
openpyxl<=3.1.2
pyomo<=6.6.2
tsplib95<=0.7.1
numpy<2.0.0
2 changes: 2 additions & 0 deletions cornflow-server/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[run]
branch = True

omit =
*/tests/*

Expand Down
11 changes: 11 additions & 0 deletions cornflow-server/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
version 1.1.1
--------------

- released: 2024-08-29
- description: small security fixes
- changelog:
- bump PuLP to version 2.9.0
- bump requests to version 2.32.3
- modified branch structure on repository.
- minor changes to documentation

version 1.1.0
--------------

Expand Down
6 changes: 3 additions & 3 deletions cornflow-server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Flask==2.3.2
flask-apispec<=0.11.4
Flask-Bcrypt<=1.0.1
Flask-Compress<=1.13
flask-cors<=4.0.1
flask-cors>=4.0.2
flask-inflate<=0.3
Flask-Migrate<=4.0.4
Flask-RESTful<=0.3.9
Expand All @@ -20,11 +20,11 @@ gunicorn<=22.0.0
jsonpatch<=1.32
ldap3<=2.9.1
marshmallow<=3.19.0
PuLP<=2.7.0
PuLP<=2.9.0
psycopg2<=2.95
PyJWT<=2.6.0
pytups>=0.86.2
requests<=2.31.0
requests<=2.32.3
SQLAlchemy==1.3.21
webargs<=8.2.0
Werkzeug<=3.0.3
2 changes: 1 addition & 1 deletion cornflow-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name="cornflow",
version="1.1.0",
version="1.1.1",
author="baobab soluciones",
author_email="[email protected]",
description="Cornflow is an open source multi-solver optimization server with a REST API built using flask.",
Expand Down
47 changes: 33 additions & 14 deletions docs/source/deploy/problems.rst → docs/source/deploy/issues.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Known problems
Known issues
------------------

When deploying cornflow through docker, you may run into one of the following problems. It is difficult to cover all the possibilities but we will try to update the documentation to include at least those that happen to us.
Expand All @@ -9,7 +9,7 @@ Situations
Development
^^^^^^^^^^^^^^^

Problem: Possible error with psycopg2
Issue: Possible error with psycopg2

Error: Error pg_config executable not found.

Expand All @@ -18,19 +18,19 @@ Problem: Possible error with psycopg2
Docker build
^^^^^^^^^^^^^^^

Problem: The volume airflow_config can´t be mounted.
Issue: The volume airflow_config can´t be mounted.

Error: Unable to prepare context: path "local_path_to_docker-compose.yml/airflow_config"

Possible solution: Start docker-compose.yml from root path of cloned corn repository.

Problem: The Dockerfile is not found by docker-compose.
Issue: The Dockerfile is not found by docker-compose.

Error: Not found or failed to solve with frontend dockerfile.v0: failed to read dockerfile

Possible solution: Start from the same path of Dockerfile or modify the location of it into the build section of docker-compose file.

Problem: The image is not installing any linux pkg.
Issue: The image is not installing any linux pkg.

Error: gcc exited code error 1

Expand All @@ -39,7 +39,7 @@ Problem: The image is not installing any linux pkg.
Cornflow database
^^^^^^^^^^^^^^^^^^^^^^

Problem: Cornflow can´t reach postgres internal database
Issue: Cornflow can´t reach postgres internal database

Error: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "host_database" to address: Name or service not known

Expand All @@ -48,7 +48,7 @@ Problem: Cornflow can´t reach postgres internal database
Running cornflow-server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Problem: Users were not created when cornflow started
Issue: Users were not created when cornflow started

Error: usage: flask [-?] {db,create_admin_user,create_service_user,access_init,register_base_assignations,register_actions,register_views,register_roles,update_views,clean_historic_data,shell,runserver} ...

Expand All @@ -57,16 +57,35 @@ Problem: Users were not created when cornflow started
Flower
^^^^^^^^^^

Problem: Can´t login to flower GUI
Issue: Can't login to flower GUI

Error: Access denied

Possible solution: The admin user and password is the same than airflow.

Scheduler
^^^^^^^^^^^
Issue: Can't find Scheduler logs.

Error:

.. code-block:: bash
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/airflow/logs/scheduler/2024-07-01'
PermissionError: [Errno 13] Permission denied: '/usr/local/airflow/logs/scheduler'
Possible solution: Both errors usually occur when using the root user and root group as the owner of the directory. One possible solution is:

.. code-block:: bash
sudo chown -R 1000:1000 cornflow/cornflow-server/airflow_config/logs
You should use 1000 because it is the UID and GID of the first user and group different from root.

Airflow
^^^^^^^^^^^

Problem: Can´t login to airflow GUI
Issue: Can't login to airflow GUI

Error: Bad Request The CSRF session token is missing

Expand All @@ -75,26 +94,26 @@ Problem: Can´t login to airflow GUI
Ldap docker
^^^^^^^^^^^^^^^^

Problem: Can´t login to flower GUI
Issue: Can't login to flower GUI

Error: Access denied

Possible solution: If airflow goes to ldap config, and you don´t give any values to AIRFLOW_USER and AIRFLOW_PWD, the default values are "admin/admin"

Problem: Can´t login to airflow GUI
Issue: Can't login to airflow GUI

Error: Access denied

Possible solution: User is not same as normal deployment

Problem: Openldap docker container don´t start
Issue: Openldap docker container don´t start

Error: Can't parse ldif entry on line 1

Possible solution: Some entry on ``*.ldif`` file has not properly defined and slapd can't start and populate the ldap server

Problem: Openldap does not show entries from ldif file
Issue: Openldap does not show entries from ldif file

Error: failed: bash ls -l not ldif on path

Possible solution: Try to mount openldap volume with full local path of ldif folder in your machine
Possible solution: Try to mount openldap volume with full local path of ldif folder in your machine
3 changes: 2 additions & 1 deletion docs/source/main/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Then we export the variables that we need to run airflow::
export AIRFLOW__API__AUTH_BACKEND=airflow.api.auth.backend.basic_auth
export AIRFLOW__WEBSERVER__SECRET_KEY=e9adafa751fd35adfc1fdd3285019be15eea0758f76e38e1e37a1154fb36
export AIRFLOW_CONN_CF_URI=http://service_user:Service_password1@localhost:5000
export AIRFLOW_HOME=./airflow_config/
airflow webserver -p 8080 &
airflow scheduler &

Expand Down Expand Up @@ -195,4 +196,4 @@ Troubleshooting

To install all the dependencies, additional packages may be needed. For example, in Ubuntu 20.04, the following packages are needed::

sudo apt-get install libpq-dev python3-dev python3.10-venv build-essential
sudo apt-get install libpq-dev python3-dev python3.10-venv build-essential
2 changes: 2 additions & 0 deletions libs/client/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[run]
branch = True

omit =
*/tests/*

Expand Down
11 changes: 11 additions & 0 deletions libs/client/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
version 1.1.1
--------------

- released: 2024-08-29
- description: small security fixes
- changelog:
- bump PuLP to version 2.9.0
- bump requests to version 2.32.3
- modified branch structure on repository.
- minor changes to documentation

version 1.1.0
--------------

Expand Down
4 changes: 2 additions & 2 deletions libs/client/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
requests<=2.31.0
requests<=2.32.3
genson<=1.2.2
jsonschema<=4.19.1
marshmallow<=3.19.0
pytups<=0.86.2
ortools<=9.8.3296
PuLP<=2.7.0
PuLP<=2.9.0
2 changes: 1 addition & 1 deletion libs/client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setuptools.setup(
name="cornflow-client",
version="1.1.0",
version="1.1.1",
author="baobab soluciones",
author_email="[email protected]",
description="Client to connect to a cornflow server",
Expand Down

0 comments on commit 55a1710

Please sign in to comment.