This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
airflow: add dag integrity test, clear warnings, fix tests
- Loading branch information
Showing
18 changed files
with
224 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,8 @@ jobs: | |
-v "$(pwd)"/tests:/opt/airflow/tests | ||
-v "$(pwd)"/requirements-test.txt:/opt/airflow/requirements-test.txt | ||
-v "$(pwd)"/data:/opt/airflow/data | ||
-v "$(pwd)"/scripts/connections/connections.json:/opt/airflow/connections.json | ||
-v "$(pwd)"/scripts/variables/variables.json:/opt/airflow/variables.json | ||
-e AIRFLOW__CORE__EXECUTOR=CeleryExecutor | ||
-e AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:[email protected]:5432/airflow | ||
-e AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://airflow:[email protected]:5432/airflow | ||
|
@@ -60,4 +62,4 @@ jobs: | |
-e AIRFLOW__CORE__LOAD_EXAMPLES="false" | ||
-e AIRFLOW__API__AUTH_BACKENDS="airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session" | ||
registry.cern.ch/cern-sis/inspire/workflows@${{ needs.build.outputs.image-id }} | ||
bash -c "pip install -r requirements-test.txt && airflow db init && pytest /opt/airflow/tests" | ||
bash -c "pip install -r requirements-test.txt && airflow db init && airflow connections import /opt/airflow/connections.json && airflow variables import /opt/airflow/variables.json && pytest /opt/airflow/tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
backoffice/backoffice/workflows/migrations/0009_decision.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Generated by Django 4.2.6 on 2024-08-15 12:25 | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("workflows", "0008_alter_workflow_status_alter_workflow_workflow_type"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Decision", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"action", | ||
models.CharField( | ||
choices=[ | ||
("accept", "author_create_approved_dag"), | ||
("reject", "author_create_rejected_dag"), | ||
("accept_curate", "author_create_approved_dag"), | ||
], | ||
max_length=30, | ||
), | ||
), | ||
("_created_at", models.DateTimeField(auto_now_add=True)), | ||
("_updated_at", models.DateTimeField(auto_now=True)), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
db_column="email", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to=settings.AUTH_USER_MODEL, | ||
to_field="email", | ||
), | ||
), | ||
( | ||
"workflow", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="workflows.workflow", | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.